Advertisement
Guest User

Untitled

a guest
Aug 6th, 2014
195
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.10 KB | None | 0 0
  1. package me.eml.phl.commands;
  2.  
  3. import me.eml.phl.PlayerHitlist;
  4. import me.eml.phl.utils.HitlistManager;
  5.  
  6. import org.bukkit.ChatColor;
  7. import org.bukkit.command.Command;
  8. import org.bukkit.command.CommandExecutor;
  9. import org.bukkit.command.CommandSender;
  10. import org.bukkit.entity.Player;
  11.  
  12. public class C_List implements CommandExecutor {
  13. private PlayerHitlist phl;
  14. private HitlistManager hlm;
  15.  
  16. public C_List(PlayerHitlist phl) {
  17. this.phl = phl;
  18. hlm = new HitlistManager();
  19. }
  20.  
  21. @Override
  22. public boolean onCommand(CommandSender sender, Command cmd, String label,
  23. String[] args) {
  24. Player player = (Player) sender;
  25. if (cmd.getName().equalsIgnoreCase("phl")) {
  26. if (args[0].equalsIgnoreCase("list")) {
  27. if (player.hasPermission("phl.list")) {
  28. if (args.length == 1) {
  29. hlm.listPlayersOnHitlist(player);
  30. } else {
  31. player.sendMessage(phl.prefix + ChatColor.RED
  32. + "Usage: /phl list");
  33. }
  34. } else {
  35. player.sendMessage(phl.prefix + ChatColor.RED
  36. + "You do not have permission to use this command.");
  37. }
  38. }
  39. }
  40. return true;
  41. }
  42. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement