Guest User

Untitled

a guest
May 8th, 2020
100
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import net.md_5.bungee.api.connection.ProxiedPlayer;
  2. import net.md_5.bungee.api.event.TabCompleteEvent;
  3. import net.md_5.bungee.api.plugin.Listener;
  4. import net.md_5.bungee.event.EventHandler;
  5.  
  6. import java.util.Arrays;
  7. import java.util.List;
  8.  
  9. public class listener implements Listener {
  10.  
  11.     @EventHandler
  12.     public void onTab(TabCompleteEvent e){
  13.         List<String> list = Arrays.asList("tpa", "tpyes", "tpaccept", "tpdeny", "tpno", "tpcancel", "spawn", "hub", "lobby");
  14.         ProxiedPlayer p = (ProxiedPlayer) e.getSender();
  15.         if(!p.hasPermission("wmc.interact")){
  16.             e.getSuggestions().clear();
  17.             e.getSuggestions().addAll(list);
  18.         }
  19.     }
  20. }
RAW Paste Data