SHARE
TWEET

Untitled

a guest Nov 17th, 2019 66 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package Commands;
  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.entity.Player;
  8.  
  9. import me.mel.de.main;
  10.  
  11. public class report
  12.   implements CommandExecutor
  13. {
  14.   public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args)
  15.   {
  16.     Player p = (Player)sender;
  17.     if (cmd.getName().equalsIgnoreCase("report")) {
  18.       if (args.length >= 2)
  19.       {
  20.         if (Bukkit.getPlayer(args[0]) != null)
  21.         {
  22.           String grund = "";
  23.           for (int i = 1; i < args.length; i++) {
  24.             grund = grund + args[i] + " ";
  25.           }
  26.           for (Player players : Bukkit.getOnlinePlayers()) {
  27.             if (players.hasPermission("system.report"))
  28.             {
  29.               players.sendMessage("§7•●•●•●•●•●•●•●•●•●•●§8<§e§lReport§8>§7•●•●•●•●•●•●•●•●•●•●•●•");
  30.               players.sendMessage("");
  31.               players.sendMessage("§8➤ §7Reporteter Spieler§8: §e" + args[0]);
  32.               players.sendMessage("§8➤ §7Reportet von§8: §e" + p.getName());
  33.               players.sendMessage("§8➤ §7Grund§8: §e" + grund);
  34.               players.sendMessage("");
  35.               players.sendMessage("§7•●•●•●•●•●•●•●•●•●•●§8<§e§lReport§8>§7•●•●•●•●•●•●•●•●•●•●•●•");
  36.             }
  37.           }
  38.           p.sendMessage(main.prefix + "§7Dein Report wurde §eerstellt");
  39.         }
  40.         else
  41.         {
  42.           p.sendMessage(main.prefix + "§cDieser Spieler ist nicht §eonline");
  43.         }
  44.       }
  45.       else {
  46.         p.sendMessage(main.prefix + "§7/report <Name> <Grund>");
  47.       }
  48.     }
  49.     return true;
  50.   }
  51. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top