Cleanup CTZ/ServerStore
This commit is contained in:
@@ -263,7 +263,7 @@ public final class ChaosTunnelZone extends MapZone implements Plugin<Object> {
|
||||
* @param player The player.
|
||||
*/
|
||||
private void commenceBorkBattle(Player player) {
|
||||
if (ServerStore.INSTANCE.getBoolean(getStoreFile(), player.getUsername().toLowerCase()) && GameWorld.getSettings().isHosted()) {
|
||||
if (ServerStore.getBoolean(getStoreFile(), player.getUsername().toLowerCase()) && GameWorld.getSettings().isHosted()) {
|
||||
player.getPacketDispatch().sendMessage("The portal's magic is too weak to teleport you right now.");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -100,14 +100,17 @@ object ServerStore {
|
||||
}
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
fun JSONObject.getString(key: String): String {
|
||||
return this[key] as? String ?: "nothing"
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
fun JSONObject.getLong(key: String): Long {
|
||||
return this[key] as? Long ?: 0L
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
fun JSONObject.getBoolean(key: String): Boolean {
|
||||
return this[key] as? Boolean ?: false
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user