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:
Ursprung
d23a45081a
Commit
95438c1861
@ -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()
|
||||||
));
|
));
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren