diff --git a/Plugins/Mineplex.Core/src/mineplex/core/account/command/UpdateRank.java b/Plugins/Mineplex.Core/src/mineplex/core/account/command/UpdateRank.java index 4a408a958..21f0ee4c9 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/account/command/UpdateRank.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/account/command/UpdateRank.java @@ -60,9 +60,9 @@ public class UpdateRank extends CommandBase final Rank rank = tempRank; - if (!testServer && (rank == Rank.ADMIN || rank == Rank.YOUTUBE || rank == Rank.TWITCH || rank == Rank.MODERATOR || rank == Rank.HELPER || rank == Rank.ALL || rank == Rank.MAPDEV || rank == Rank.SNR_MODERATOR)) + if (rank == Rank.ADMIN || rank == Rank.YOUTUBE || rank == Rank.TWITCH || rank == Rank.MODERATOR || rank == Rank.HELPER || rank == Rank.ALL || rank == Rank.MAPDEV || rank == Rank.SNR_MODERATOR || rank == Rank.JNR_DEV || rank == Rank.DEVELOPER) { - if (rank == Rank.ADMIN && !Plugin.hasRank(caller, Rank.LT)) + if (!testServer && rank.Has(Rank.ADMIN) && !Plugin.hasRank(caller, Rank.LT)) { UtilPlayer.message(caller, F.main(Plugin.getName(), ChatColor.RED + "" + ChatColor.BOLD + "Insufficient privileges!")); return; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/achievement/AchievementManager.java b/Plugins/Mineplex.Core/src/mineplex/core/achievement/AchievementManager.java index f2a63704c..70348c191 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/achievement/AchievementManager.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/achievement/AchievementManager.java @@ -208,20 +208,22 @@ public class AchievementManager extends MiniPlugin { int level = get(sender, Achievement.GLOBAL_MINEPLEX_LEVEL).getLevel(); + if (sender.getName().equalsIgnoreCase("B2_mp")) + return 101; + + if (rank.Has(Rank.MODERATOR)) + level = Math.max(level, 5); + if (rank.Has(Rank.SNR_MODERATOR)) + level = Math.max(level, 15); + if (rank.Has(Rank.JNR_DEV)) + level = Math.max(level, 25); + if (rank.Has(Rank.ADMIN)) + level = Math.max(level, 30 + get(sender, Achievement.GLOBAL_GEM_HUNTER).getLevel()); + if (rank.Has(Rank.OWNER)) + level = Math.max(level, 50 + get(sender, Achievement.GLOBAL_GEM_HUNTER).getLevel()); + if (sender.getName().equalsIgnoreCase("Phinary") || sender.getName().equalsIgnoreCase("Horus")) level = -level; - else if (sender.getName().equalsIgnoreCase("B2_mp")) - return 101; - else if (rank.Has(Rank.OWNER)) - level = Math.max(level, 50 + get(sender, Achievement.GLOBAL_GEM_HUNTER).getLevel()); - else if (rank.Has(Rank.ADMIN)) - level = Math.max(level, 30 + get(sender, Achievement.GLOBAL_GEM_HUNTER).getLevel()); - else if (rank.Has(Rank.SNR_MODERATOR)) - level = Math.max(level, 15); - else if (rank.Has(Rank.MODERATOR)) - level = Math.max(level, 5); - else if (rank.Has(Rank.JNR_DEV)) - level = Math.max(level, 25); return level; } diff --git a/Plugins/Mineplex.Core/src/mineplex/core/punish/UI/PunishPage.java b/Plugins/Mineplex.Core/src/mineplex/core/punish/UI/PunishPage.java index ff2949dd6..b2a8768aa 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/punish/UI/PunishPage.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/punish/UI/PunishPage.java @@ -15,6 +15,7 @@ import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; import org.bukkit.event.HandlerList; import org.bukkit.event.Listener; +import org.bukkit.event.inventory.ClickType; import org.bukkit.event.inventory.InventoryClickEvent; import org.bukkit.event.inventory.InventoryCloseEvent; import org.bukkit.inventory.ItemStack; @@ -292,6 +293,20 @@ public class PunishPage extends CraftInventoryCustom implements Listener }, 1, false, true), new PunishButton(this, Category.ChatOffense, 4, false, -1)); } + if (_plugin.GetClients().Get(_player).GetRank() == Rank.DEVELOPER || _plugin.GetClients().Get(_player).GetRank() == Rank.JNR_DEV) + { + ShopItem devWarning = new ShopItem(Material.YELLOW_FLOWER, "DEV WARNING", new String[] {ChatColor.RESET + "Developers are advised against using the punish system", ChatColor.RESET + "unless permitted by LT"}, 1, true, true); + devWarning.addGlow(); + + AddButton(0, devWarning, new IButton() + { + @Override + public void onClick(Player player, ClickType clickType) + { + } + }); + } + Collections.sort(punishments, new PunishmentSorter()); int slot = 45; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/updater/RestartServerCommand.java b/Plugins/Mineplex.Core/src/mineplex/core/updater/RestartServerCommand.java index ff2a51f08..1067506b0 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/updater/RestartServerCommand.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/updater/RestartServerCommand.java @@ -15,7 +15,7 @@ public class RestartServerCommand extends CommandBase { public RestartServerCommand(FileUpdater plugin) { - super(plugin, Rank.ADMIN, "restart"); + super(plugin, Rank.ADMIN, new Rank[] {Rank.JNR_DEV}, "restart"); } @Override diff --git a/Plugins/Mineplex.Hub/src/mineplex/hub/commands/NewsCommand.java b/Plugins/Mineplex.Hub/src/mineplex/hub/commands/NewsCommand.java index dd1e33d77..a9e6cf029 100644 --- a/Plugins/Mineplex.Hub/src/mineplex/hub/commands/NewsCommand.java +++ b/Plugins/Mineplex.Hub/src/mineplex/hub/commands/NewsCommand.java @@ -10,7 +10,7 @@ public class NewsCommand extends MultiCommandBase { public NewsCommand(HubManager plugin) { - super(plugin, Rank.ADMIN, "news"); + super(plugin, Rank.ADMIN, new Rank[] {Rank.JNR_DEV}, "news"); AddCommand(new NewsAddCommand(plugin)); AddCommand(new NewsDeleteCommand(plugin)); diff --git a/Plugins/Mineplex.Hub/src/mineplex/hub/commands/NewsListCommand.java b/Plugins/Mineplex.Hub/src/mineplex/hub/commands/NewsListCommand.java index e3ca7c240..fa32eb919 100644 --- a/Plugins/Mineplex.Hub/src/mineplex/hub/commands/NewsListCommand.java +++ b/Plugins/Mineplex.Hub/src/mineplex/hub/commands/NewsListCommand.java @@ -19,7 +19,7 @@ public class NewsListCommand extends CommandBase { public NewsListCommand(HubManager plugin) { - super(plugin, Rank.ADMIN, "list"); + super(plugin, Rank.ADMIN, new Rank[] {Rank.JNR_DEV}, "list"); } @Override