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

It's bad practice.
This commit is contained in:
Kristian S. Stangeland 2012-10-23 00:54:41 +02:00
parent 7536815e58
commit 4e9b5009c8
3 changed files with 4 additions and 4 deletions

View File

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

View File

@ -205,7 +205,7 @@ class PacketSendingQueue {
} catch (PlayerLoggedOutException e) {
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()
));

View File

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