Advertisement
Guest User

Untitled

a guest
Apr 22nd, 2019
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.80 KB | None | 0 0
  1. package net.hermanos.utils;
  2.  
  3. import org.bukkit.plugin.*;
  4. import org.bukkit.*;
  5. import org.bukkit.entity.*;
  6. import com.google.common.io.*;
  7.  
  8. public class BungeeTeleportation
  9. {
  10. private static Plugin plugin;
  11.  
  12. static {
  13. BungeeTeleportation.plugin = null;
  14. }
  15.  
  16. public static void init(final Plugin pl) {
  17. BungeeTeleportation.plugin = pl;
  18. Bukkit.getMessenger().registerOutgoingPluginChannel(BungeeTeleportation.plugin, "BungeeCord");
  19. }
  20.  
  21. public static void changeServer(final Player p, final String serveur) {
  22. final ByteArrayDataOutput out = ByteStreams.newDataOutput();
  23. out.writeUTF("Connect");
  24. out.writeUTF(serveur);
  25. p.sendPluginMessage(BungeeTeleportation.plugin, "BungeeCord", out.toByteArray());
  26. }
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement