Archiviert
13
0

Don't print messages to the console without a plugin prefix.

It's bad practice.
Dieser Commit ist enthalten in:
Kristian S. Stangeland 2012-10-23 00:54:41 +02:00
Ursprung 7536815e58
Commit 4e9b5009c8
3 geänderte Dateien mit 4 neuen und 4 gelöschten Zeilen

Datei anzeigen

@ -117,7 +117,7 @@ public class ProtocolLibrary extends JavaPlugin {
public void onPacketReceiving(PacketEvent event) { public void onPacketReceiving(PacketEvent event) {
Object handle = event.getPacket().getHandle(); Object handle = event.getPacket().getHandle();
System.out.println(String.format( logger.info(String.format(
"RECEIVING %s@%s from %s.", "RECEIVING %s@%s from %s.",
handle.getClass().getSimpleName(), handle.hashCode(), event.getPlayer().getName() handle.getClass().getSimpleName(), handle.hashCode(), event.getPlayer().getName()
)); ));
@ -126,7 +126,7 @@ public class ProtocolLibrary extends JavaPlugin {
public void onPacketSending(PacketEvent event) { public void onPacketSending(PacketEvent event) {
Object handle = event.getPacket().getHandle(); Object handle = event.getPacket().getHandle();
System.out.println(String.format( logger.info(String.format(
"SENDING %s@%s from %s.", "SENDING %s@%s from %s.",
handle.getClass().getSimpleName(), handle.hashCode(), event.getPlayer().getName() handle.getClass().getSimpleName(), handle.hashCode(), event.getPlayer().getName()
)); ));

Datei anzeigen

@ -205,7 +205,7 @@ class PacketSendingQueue {
} catch (PlayerLoggedOutException e) { } catch (PlayerLoggedOutException e) {
System.out.println(String.format( System.out.println(String.format(
"Warning: Dropped packet index %s of ID %s", "[ProtocolLib] Warning: Dropped packet index %s of ID %s",
marker.getOriginalSendingIndex(), event.getPacketID() marker.getOriginalSendingIndex(), event.getPacketID()
)); ));

Datei anzeigen

@ -198,7 +198,7 @@ public class PlayerInjectionHandler {
if (injector != null) { if (injector != null) {
return injector.getPlayer(); return injector.getPlayer();
} else { } else {
System.out.println("Unable to find stream: " + inputStream); logger.warning("Unable to find stream: " + inputStream);
return null; return null;
} }