Advertisement
Guest User

Untitled

a guest
Aug 6th, 2014
11
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 = new HitlistManager();
  15.  
  16. public C_List(PlayerHitlist phl) {
  17. this.phl = phl;
  18. }
  19.  
  20. @Override
  21. public boolean onCommand(CommandSender sender, Command cmd, String label,
  22. String[] args) {
  23. Player player = (Player) sender;
  24. if (cmd.getName().equalsIgnoreCase("phl")) {
  25. if (args[0].equalsIgnoreCase("list")) {
  26. if (player.hasPermission("phl.list")) {
  27. if (args.length == 1) {
  28. hlm.listPlayersOnHitlist(player);
  29. } else {
  30. player.sendMessage(phl.prefix + ChatColor.RED
  31. + "Usage: /phl list");
  32. }
  33. } else {
  34. player.sendMessage(phl.prefix + ChatColor.RED
  35. + "You do not have permission to use this command.");
  36. }
  37. }
  38. }
  39. return true;
  40. }
  41. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement