Advertisement
NiRoXz

ban-Methode Spigot

Mar 3rd, 2016
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     ByteArrayOutputStream b = new ByteArrayOutputStream();
  2.     DataOutputStream out = new DataOutputStream(b);
  3.  
  4.     try {
  5.         out.writeUTF("subchannel");
  6.         out.writeUTF("sendMessage"); // Subchannel
  7.         out.writeUTF("bansystemmsg");
  8.         out.writeUTF("ban");
  9.        
  10.        
  11.          ByteArrayOutputStream msgbytes = new ByteArrayOutputStream();
  12.          DataOutputStream msgout = new DataOutputStream(msgbytes);
  13.          msgout.writeUTF(BanSystem.prefix_ban+"/*/*/="+playername+"/*/*/="+reason+"/*/*/="+creater); // Deine Pluginnachricht
  14.          msgout.writeShort(123);
  15.          
  16.         out.writeShort(msgbytes.toByteArray().length);
  17.         out.write(msgbytes.toByteArray());
  18.     } catch (IOException e) {
  19.         BanSystem.console.sendMessage(BanSystem.prefix_warn+ e.getStackTrace());
  20.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement