Merge branch 'clans-beta' of ssh://184.154.0.242:7999/min/Mineplex into clans-beta

This commit is contained in:
NewGarbo 2015-11-25 00:55:37 +00:00
commit bbdbb209c5

View File

@ -33,7 +33,7 @@ public class PacketHandler extends MiniPlugin
@EventHandler(priority = EventPriority.MONITOR)
public void onPlayerJoin(PlayerJoinEvent event)
{
{
_playerVerifierMap.put(event.getPlayer(), new PacketVerifier(event.getPlayer(), this));
((CraftPlayer) event.getPlayer()).getHandle().playerConnection.PacketVerifier.setPacketVerifier(_playerVerifierMap
@ -41,11 +41,11 @@ public class PacketHandler extends MiniPlugin
}
public boolean handlePacket(Player player, Packet packet)
{
{
if (!_playerVerifierMap.containsKey(player))
{
{
return true;
}
}
PacketVerifier verifier = _playerVerifierMap.get(player);
@ -56,7 +56,7 @@ public class PacketHandler extends MiniPlugin
{
if (!_packetHandlers.containsKey(packetInfo.getPacket().getClass()))
{
// aSystem.err.print("Received packet " + packetInfo.getPacket().getClass() + " but am not listening for it!");
System.err.print("Received packet " + packetInfo.getPacket().getClass() + " but am not listening for it!");
return true;
}
@ -66,11 +66,11 @@ public class PacketHandler extends MiniPlugin
{
handler.handle(packetInfo);
}
catch (Exception ex)
{
ex.printStackTrace();
catch (Exception ex)
{
ex.printStackTrace();
}
}
}
return !packetInfo.isCancelled();
}
@ -106,7 +106,7 @@ public class PacketHandler extends MiniPlugin
if (packetsToListen.length == 0)
{
throw new IllegalArgumentException("When registering a new packet listener, add the packets its going to listen to");
}
}
for (Class c : packetsToListen)
{
@ -123,7 +123,7 @@ public class PacketHandler extends MiniPlugin
if (!_packetHandlers.containsKey(c))
{
_packetHandlers.put(c, new ArrayList());
}
}
_packetHandlers.get(c).add(packetHandler);
PacketProcessor.addPacket(c, forceMainThread || _forceMainThread.containsKey(c));