Archiviert
13
0

Throw an exception the caller can handle instead of a warning message.

This should prevent possible spam by plugins that are not aware that a 
player has either logged out, or is not injected due to a bug in
ProtocolLib.
Dieser Commit ist enthalten in:
Kristian S. Stangeland 2013-01-17 12:26:39 +01:00
Ursprung d23a45081a
Commit 95438c1861

Datei anzeigen

@ -486,7 +486,7 @@ public class PlayerInjectionHandler {
if (injector != null) if (injector != null)
injector.sendServerPacket(packet.getHandle(), filters); injector.sendServerPacket(packet.getHandle(), filters);
else else
reporter.reportWarning(this, String.format( throw new PlayerLoggedOutException(String.format(
"Unable to send packet %s (%s): Player %s has logged out.", "Unable to send packet %s (%s): Player %s has logged out.",
packet.getID(), packet, reciever.getName() packet.getID(), packet, reciever.getName()
)); ));
@ -507,7 +507,7 @@ public class PlayerInjectionHandler {
if (injector != null) if (injector != null)
injector.processPacket(mcPacket); injector.processPacket(mcPacket);
else else
reporter.reportWarning(this, String.format( throw new PlayerLoggedOutException(String.format(
"Unable to receieve packet %s. Player %s has logged out.", "Unable to receieve packet %s. Player %s has logged out.",
mcPacket, player.getName() mcPacket, player.getName()
)); ));