SHARE
TWEET

detect home command

a guest Feb 24th, 2020 76 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     @EventHandler
  2.     public void onPlayerCommandPreprocessEvent(PlayerCommandPreprocessEvent event) {
  3.         Player p = event.getPlayer();
  4.         if(event.getMessage().equalsIgnoreCase("/" + "home")) {
  5.             p.sendMessage("detected home command");
  6.         } else {
  7.             p.sendMessage("did not detect home command");
  8.         }
  9.     }
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