From d1e90d8a6cc646951414a397e3745c09e9ee8483 Mon Sep 17 00:00:00 2001 From: yoyosource Date: Wed, 27 Apr 2022 10:08:54 +0200 Subject: [PATCH] Speed BrandListener up --- src/de/steamwar/bungeecore/listeners/BrandListener.java | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/de/steamwar/bungeecore/listeners/BrandListener.java b/src/de/steamwar/bungeecore/listeners/BrandListener.java index 26d1080..db3bcf2 100644 --- a/src/de/steamwar/bungeecore/listeners/BrandListener.java +++ b/src/de/steamwar/bungeecore/listeners/BrandListener.java @@ -47,21 +47,17 @@ public class BrandListener extends BasicListener { @EventHandler public void onServerSwitch(PluginMessageEvent event) { - long time = System.currentTimeMillis(); if(!event.getTag().equals("minecraft:brand") && !event.getTag().equals("MC|Brand")) { return; } - System.out.println("TIME Check brand: " + (System.currentTimeMillis() - time)); if (isLocalHost(event.getReceiver().getAddress().getAddress())) { return; } - System.out.println("TIME Check localhost: " + (System.currentTimeMillis() - time)); if (!(event.getReceiver() instanceof ProxiedPlayer)) { return; } - System.out.println("TIME Was proxiedplayer: " + (System.currentTimeMillis() - time)); event.setCancelled(true); ProxiedPlayer player = (ProxiedPlayer) event.getReceiver(); @@ -71,6 +67,5 @@ public class BrandListener extends BasicListener { DefinedPacket.writeString(brandString, brand); player.sendData(event.getTag(), DefinedPacket.toArray(brand)); brand.release(); - System.out.println("TIME finish: " + (System.currentTimeMillis() - time)); } }