forked from MagicBane/Server
realm override
This commit is contained in:
@@ -76,9 +76,15 @@ public class Realm {
|
|||||||
this.mapG = (float) (mapColor.getGreen() * 0.00392156863);
|
this.mapG = (float) (mapColor.getGreen() * 0.00392156863);
|
||||||
this.mapB = (float) (mapColor.getBlue() * 0.00392156863);
|
this.mapB = (float) (mapColor.getBlue() * 0.00392156863);
|
||||||
this.mapA = 1;
|
this.mapA = 1;
|
||||||
this.canBeClaimed = rs.getBoolean("canBeClaimed");
|
if(overridePlacement(rs.getString("realmName"))){
|
||||||
this.canPlaceCities = rs.getBoolean("canPlaceCities");
|
this.canBeClaimed = false;
|
||||||
this.numCities = rs.getInt("numCities");
|
this.canPlaceCities = false;
|
||||||
|
this.numCities = 0;
|
||||||
|
}else {
|
||||||
|
this.canBeClaimed = rs.getBoolean("canBeClaimed");
|
||||||
|
this.canPlaceCities = rs.getBoolean("canPlaceCities");
|
||||||
|
this.numCities = rs.getInt("numCities");
|
||||||
|
}
|
||||||
this.realmName = rs.getString("realmName");
|
this.realmName = rs.getString("realmName");
|
||||||
this.rulingCityUUID = rs.getInt("rulingCityUID");
|
this.rulingCityUUID = rs.getInt("rulingCityUID");
|
||||||
this.charterType = rs.getInt("charterType");
|
this.charterType = rs.getInt("charterType");
|
||||||
@@ -100,6 +106,20 @@ public class Realm {
|
|||||||
this.hash = rs.getString("hash");
|
this.hash = rs.getString("hash");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static boolean overridePlacement(String realm){
|
||||||
|
switch(realm.toLowerCase()) {
|
||||||
|
case "neshraa":
|
||||||
|
case "adduram":
|
||||||
|
case "letharuun":
|
||||||
|
case "kralgaard":
|
||||||
|
case "ecklund":
|
||||||
|
case "nordenthol":
|
||||||
|
case "thollmar":
|
||||||
|
case "haldorn isles":
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
public static void configureAllRealms() {
|
public static void configureAllRealms() {
|
||||||
|
|
||||||
for (Realm realm : Realm._realms.values()) {
|
for (Realm realm : Realm._realms.values()) {
|
||||||
|
|||||||
Reference in New Issue
Block a user