Advertisement
Guest User

Untitled

a guest
Oct 3rd, 2013
3,411
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1. package YOUR.PACKAGE.NAME;
  2.  
  3. import org.bukkit.Bukkit;
  4. import org.bukkit.command.Command;
  5. import org.bukkit.command.CommandExecutor;
  6. import org.bukkit.command.CommandSender;
  7. import org.bukkit.event.EventHandler;
  8. import org.bukkit.event.Listener;
  9. import org.bukkit.event.player.PlayerQuitEvent;
  10.  
  11. /**
  12. *
  13. * @Author Jake
  14. */
  15. class Both implements CommandExecutor, Listener{
  16.  
  17.  
  18. public boolean onCommand(CommandSender cs, Command cmnd, String string, String[] strings) {
  19. if (string.equalsIgnoreCase("hello")) {
  20. cs.sendMessage("hello");
  21. }
  22. return false;
  23. }
  24.  
  25. @EventHandler
  26. public void onQuit(PlayerQuitEvent event) {
  27. Bukkit.broadcastMessage("Someone quit!");
  28. }
  29.  
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement