Advertisement
Guest User

Untitled

a guest
Jan 15th, 2021
36
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package de.flashbasti.cmd;
  2.  
  3.  
  4.  
  5. import org.bukkit.Bukkit;
  6. import org.bukkit.command.Command;
  7. import org.bukkit.command.CommandExecutor;
  8. import org.bukkit.command.CommandSender;
  9. import org.bukkit.entity.Player;
  10.  
  11. import de.flashbasti.main.Main;
  12.  
  13.  
  14.  
  15.  
  16. public class Rang implements CommandExecutor {
  17.  
  18. @Override
  19. public boolean onCommand(CommandSender cs, Command cmd, String label, String[] args) {
  20. Player p = (Player)cs;
  21. if(cmd.getName().equalsIgnoreCase("rang")) {
  22. if(args.length == 0 ) {
  23. if(p.hasPermission("ranginfo.admin")) {
  24. p.sendMessage(Main.pr + "Du hast aktuell den §4Administrator §7Rang.");
  25. } else if (p.hasPermission("ranginfo.sup")) {
  26. p.sendMessage(Main.pr + "Du hast aktuell den §eSupporter §7Rang.");
  27.  
  28. } else if (p.hasPermission("ranginfo.yt")) {
  29. p.sendMessage(Main.pr + "Du hast aktuell den §5YouTuber §7Rang.");
  30. } else
  31. p.sendMessage(Main.pr + "Du hast aktuell den §7Spieler §7Rang.");
  32. } else if(args.length == 1) {
  33. Player t = Bukkit.getPlayer(args[0]);
  34. if(t != null) {
  35. if(t.hasPermission("ranginfo.admin")) {
  36. p.sendMessage(Main.pr + "§4"+ t.getPlayer().getName() + " §7hat aktuell den §4Administrator §7Rang.");
  37. } else if (t.hasPermission("ranginfo.sup")) {
  38. p.sendMessage(Main.pr +"§e"+ t.getPlayer().getName() + " §7hat aktuell den §eSupporter §7Rang.");
  39.  
  40. } else if (t.hasPermission("lobby.vip")) {
  41. p.sendMessage(Main.pr + "§5" + t.getPlayer().getName() + "§7 hat aktuell den §5YouTuber §7Rang.");
  42. } else
  43. p.sendMessage(Main.pr + t.getPlayer().getName() + " §7hat aktuell den Spieler Rang.");
  44. } else
  45. p.sendMessage(Main.pr +"§cDieser Spieler ist nicht online.");
  46.  
  47. }
  48.  
  49.  
  50.  
  51. }
  52. return false;
  53. }
  54. }
  55.  
  56.  
  57.  
  58.  
  59.  
Advertisement
RAW Paste Data Copied
Advertisement