Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @EventHandler
- public void onPlayerInteractAtEntity(PlayerInteractAtEntityEvent e){
- Player p = e.getPlayer();
- for(String a : npc.getConfig().getKeys(false)){
- String bungee = npc.getConfig().getString(a+".bungee");
- if (e.getRightClicked() instanceof ArmorStand){
- e.setCancelled(true);
- ByteArrayOutputStream b = new ByteArrayOutputStream();
- DataOutputStream out = new DataOutputStream(b);
- try
- {
- out.writeUTF("Connect");
- //out.writeUTF("survival");
- out.writeUTF(bungee);
- }
- catch (IOException e1)
- {
- e1.printStackTrace();
- }
- p.sendPluginMessage(pl, "BungeeCord", b.toByteArray());
- }
- }
- }
Add Comment
Please, Sign In to add comment