From 8225daf6f1f164288b3e89039c579370a9f0385a Mon Sep 17 00:00:00 2001 From: speed <43330808+speedxx@users.noreply.github.com> Date: Sun, 10 Jan 2021 16:23:20 -0500 Subject: [PATCH] permission changes & remove massmurder resolves FS-69, FS-70, FS-71 --- .../command/Command_cleardiscordqueue.java | 4 +- .../command/Command_health.java | 2 +- .../command/Command_massmurder.java | 42 ------------------- 3 files changed, 3 insertions(+), 45 deletions(-) delete mode 100644 src/main/java/me/totalfreedom/totalfreedommod/command/Command_massmurder.java diff --git a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_cleardiscordqueue.java b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_cleardiscordqueue.java index 8346fb70..205ceffb 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_cleardiscordqueue.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_cleardiscordqueue.java @@ -5,7 +5,7 @@ import org.bukkit.command.Command; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; -@CommandPermissions(level = Rank.SENIOR_ADMIN, source = SourceType.ONLY_CONSOLE) +@CommandPermissions(level = Rank.ADMIN, source = SourceType.ONLY_CONSOLE) @CommandParameters(description = "Clear the discord message queue.", usage = "/") public class Command_cleardiscordqueue extends FreedomCommand { @@ -17,4 +17,4 @@ public class Command_cleardiscordqueue extends FreedomCommand msg("Cleared the discord message queue."); return true; } -} +} \ No newline at end of file diff --git a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_health.java b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_health.java index 512acb11..5fbd19ee 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_health.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_health.java @@ -13,7 +13,7 @@ import org.bukkit.entity.Player; import org.bukkit.scheduler.BukkitRunnable; import org.bukkit.scheduler.BukkitTask; -@CommandPermissions(level = Rank.ADMIN, source = SourceType.BOTH) +@CommandPermissions(level = Rank.OP, source = SourceType.BOTH) @CommandParameters(description = "View server health, such as ticks-per-second, memory, etc.", usage = "/") public class Command_health extends FreedomCommand { diff --git a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_massmurder.java b/src/main/java/me/totalfreedom/totalfreedommod/command/Command_massmurder.java deleted file mode 100644 index e5ed5857..00000000 --- a/src/main/java/me/totalfreedom/totalfreedommod/command/Command_massmurder.java +++ /dev/null @@ -1,42 +0,0 @@ -package me.totalfreedom.totalfreedommod.command; - -import me.totalfreedom.totalfreedommod.config.ConfigEntry; -import me.totalfreedom.totalfreedommod.rank.Rank; -import org.bukkit.command.Command; -import org.bukkit.command.CommandSender; -import org.bukkit.entity.Player; - -@CommandPermissions(level = Rank.SENIOR_ADMIN, source = SourceType.BOTH) -@CommandParameters(description = "seth's personal command", usage = "/ ", aliases = "genocide") -public class Command_massmurder extends FreedomCommand -{ - - @Override - public boolean run(CommandSender sender, Player playerSender, Command cmd, String commandLabel, String[] args, boolean senderIsConsole) - { - if (!ConfigEntry.SERVER_OWNERS.getStringList().contains(playerSender.getName())) - { - return noPerms(); - } - - if (args.length < 1) - { - return false; - } - - int count = 0; - for (String name : args) - { - Player player = getPlayer(name); - if (player != null) - { - player.setHealth(0); - count++; - } - } - - msg("Mass murdered a school of " + count); - - return true; - } -}