Advertisement
Guest User

detect home command

a guest
Feb 24th, 2020
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  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. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement