mirror of
https://github.com/NoCheatPlus/NoCheatPlus.git
synced 2024-10-03 00:47:25 +02:00
Make sure the player is in a world, and if not, fall back to default
configuration.
This commit is contained in:
parent
c3a429ca10
commit
1eefa59640
@ -119,11 +119,17 @@ public class NoCheat extends JavaPlugin {
|
||||
}
|
||||
|
||||
public ConfigurationCacheStore getConfig(Player player) {
|
||||
return conf.getConfigurationCacheForWorld(player.getWorld().getName());
|
||||
if(player != null)
|
||||
return getConfig(player.getWorld());
|
||||
else
|
||||
return conf.getConfigurationCacheForWorld(null);
|
||||
}
|
||||
|
||||
public ConfigurationCacheStore getConfig(World world) {
|
||||
return conf.getConfigurationCacheForWorld(world.getName());
|
||||
if(world != null)
|
||||
return conf.getConfigurationCacheForWorld(world.getName());
|
||||
else
|
||||
return conf.getConfigurationCacheForWorld(null);
|
||||
}
|
||||
|
||||
public void log(LogLevel level, String message, ConfigurationCacheStore cc) {
|
||||
|
Loading…
Reference in New Issue
Block a user