We need to catch some rares exceptions !
This commit is contained in:
@@ -38,6 +38,8 @@ public class FileCache {
|
||||
public void createCache(Player player, DataFileCache playerData,
|
||||
String group, boolean operator, boolean flying) {
|
||||
String path = "";
|
||||
if (player == null)
|
||||
return;
|
||||
try {
|
||||
path = player.getUniqueId().toString();
|
||||
} catch (Exception e) {
|
||||
|
||||
@@ -48,9 +48,14 @@ public class LimboCache {
|
||||
inv = null;
|
||||
arm = null;
|
||||
}
|
||||
playerGroup = playerData.readCache(player).getGroup();
|
||||
operator = playerData.readCache(player).getOperator();
|
||||
flying = playerData.readCache(player).isFlying();
|
||||
try {
|
||||
playerGroup = playerData.readCache(player).getGroup();
|
||||
operator = playerData.readCache(player).getOperator();
|
||||
flying = playerData.readCache(player).isFlying();
|
||||
} catch (Exception e)
|
||||
{
|
||||
ConsoleLogger.showError("Some error on reading cache of " + name);
|
||||
}
|
||||
} else {
|
||||
StoreInventoryEvent event = new StoreInventoryEvent(player);
|
||||
Bukkit.getServer().getPluginManager().callEvent(event);
|
||||
|
||||
Reference in New Issue
Block a user