Some changes to error handlng for clans regions

This commit is contained in:
phobia 2016-04-23 16:40:39 +10:00
parent 4227e24ae0
commit b21939444c
3 changed files with 24 additions and 5 deletions

View File

@ -351,7 +351,10 @@ public class ClansManager extends MiniClientPlugin<ClientClan>implements IRelati
{
loadClan(token);
}
Bukkit.getMessenger().registerOutgoingPluginChannel(plugin, "Replay|Restrict");
// new ClaimVisualizer(plugin, this);
// RedisDataRepository(ConnectionData writeConn, ConnectionData
@ -404,7 +407,6 @@ public class ClansManager extends MiniClientPlugin<ClientClan>implements IRelati
hologram.start();
}
Bukkit.getMessenger().registerOutgoingPluginChannel(plugin, "Replay|Restrict");
_siegeManager = new SiegeManager(this);
// _netherManager = new NetherManager(this);

View File

@ -423,8 +423,15 @@ public class ItemMapManager extends MiniPlugin
}
}
Byte color = Iterables.getFirst(Multisets.copyHighestCountFirst(hashmultiset), (byte) 0);
Byte color;
try
{
color = Iterables.getFirst(Multisets.copyHighestCountFirst(hashmultiset), (byte) 0);
}
catch (Exception e)
{
color = (byte) 0;
}
second[(x + _halfMapSize) / zoom][(z + _halfMapSize) / zoom] = color;
}
}

View File

@ -197,7 +197,17 @@ public class ClansRegions extends MiniPlugin
{
int x = chunkX + xOffset;
int z = chunkZ + zOffset;
Chunk chunk = location.getWorld().getChunkAt(x, z);
Chunk chunk;
try
{ //Corrupted chunk will hold up whole server
chunk = location.getWorld().getChunkAt(x, z);
}
catch(Exception e)
{
System.out.println("UNABLE TO LOAD CHUNK AT " + x + " , " + z);
e.printStackTrace();
continue;
}
String chunkStr = UtilWorld.chunkToStr(chunk);
if (addNegative)