sneaky plugin message

This commit is contained in:
DNx5 2015-09-20 15:58:16 +07:00
parent 297e41e9bd
commit ec1e0527ec

View File

@ -1,5 +1,8 @@
package fr.xephi.authme.listener; package fr.xephi.authme.listener;
import com.google.common.io.ByteArrayDataInput;
import com.google.common.io.ByteArrayDataOutput;
import com.google.common.io.ByteStreams;
import fr.xephi.authme.AuthMe; import fr.xephi.authme.AuthMe;
import fr.xephi.authme.ConsoleLogger; import fr.xephi.authme.ConsoleLogger;
import fr.xephi.authme.Utils; import fr.xephi.authme.Utils;
@ -349,14 +352,9 @@ public class AuthMePlayerListener implements Listener {
if (event.getResult() == PlayerLoginEvent.Result.ALLOWED) { if (event.getResult() == PlayerLoginEvent.Result.ALLOWED) {
checkAntiBotMod(player); checkAntiBotMod(player);
if (Settings.bungee) { if (Settings.bungee) {
try { ByteArrayDataOutput out = ByteStreams.newDataOutput();
final ByteArrayOutputStream b = new ByteArrayOutputStream(); out.writeUTF("IP");
DataOutputStream out = new DataOutputStream(b); player.sendPluginMessage(plugin, "BungeeCord", out.toByteArray());
out.writeUTF("IP");
player.sendPluginMessage(plugin, "BungeeCord", b.toByteArray());
} catch (IOException e) {
ConsoleLogger.writeStackTrace(e);
}
} }
return; return;
} }