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.
|
* @param player The player.
|
||||||
*/
|
*/
|
||||||
private void commenceBorkBattle(Player 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.");
|
player.getPacketDispatch().sendMessage("The portal's magic is too weak to teleport you right now.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -100,14 +100,17 @@ object ServerStore {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@JvmStatic
|
||||||
fun JSONObject.getString(key: String): String {
|
fun JSONObject.getString(key: String): String {
|
||||||
return this[key] as? String ?: "nothing"
|
return this[key] as? String ?: "nothing"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@JvmStatic
|
||||||
fun JSONObject.getLong(key: String): Long {
|
fun JSONObject.getLong(key: String): Long {
|
||||||
return this[key] as? Long ?: 0L
|
return this[key] as? Long ?: 0L
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@JvmStatic
|
||||||
fun JSONObject.getBoolean(key: String): Boolean {
|
fun JSONObject.getBoolean(key: String): Boolean {
|
||||||
return this[key] as? Boolean ?: false
|
return this[key] as? Boolean ?: false
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user