Advertisement
Guest User

Simple Staff List

a guest
Aug 22nd, 2013
111
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.58 KB | None
  1. package net.minestrosity.MinestrosityStaff;
  2.  
  3. import org.bukkit.Bukkit;
  4. import org.bukkit.ChatColor;
  5. import org.bukkit.command.Command;
  6. import org.bukkit.command.CommandSender;
  7. import org.bukkit.entity.Player;
  8. import org.bukkit.plugin.java.JavaPlugin;
  9.  
  10. public class Main extends JavaPlugin{
  11.  
  12. public void onEnable() {
  13. getLogger().info(ChatColor.AQUA + "Enabling MinestrosityStaff plugin.");
  14. }
  15.  
  16. public void onDisable () {
  17. getLogger().info(ChatColor.DARK_AQUA + "Disabling MinestrosityStaff plugin.");
  18. }
  19.  
  20. public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
  21. if(sender instanceof Player) {
  22. Player player = (Player) sender;
  23. if(args.length == 0) {
  24. if(cmd.getName().equalsIgnoreCase("admins")) {
  25. if(player.hasPermission("mcore.admins")) {
  26. player.sendMessage(ChatColor.GOLD + "Current staff: Qaman6, Jdzag24, MangekyoS, Ruqiee, Moyaboya, kingcards, and Skylord_Kason");
  27. } else {
  28. player.sendMessage(ChatColor.DARK_RED + "You don't have permission! You need the following permission: mcore.admins");
  29. }
  30. }
  31. if(args.length == 1) {
  32. if(cmd.getName().equalsIgnoreCase("moderators")) {
  33. if(player.hasPermission("mcore.moderators")) {
  34. player.sendMessage(ChatColor.GOLD + "Current moderators: Jdzag24, MangekyoS, Ruqiee, Moyaboya, kingcards, and Skylord_Kason");
  35. } else {
  36. player.sendMessage(ChatColor.DARK_RED + "You don't have permission! You need the following permission: mcore.moderators");
  37. }
  38.  
  39. }
  40. }
  41. }
  42. }
  43. return false;
  44. }
  45. }
Advertisement
RAW Paste Data Copied
Advertisement