forked from 2009Scape/Server
Cleanup CTZ/ServerStore
This commit is contained in:
parent
edf5b0738c
commit
7859c87565
2 changed files with 4 additions and 1 deletions
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue