Display changes
This commit is contained in:
parent
0b53bca385
commit
7d9fd61c8e
@ -60,9 +60,9 @@ public class UpdateRank extends CommandBase<CoreClientManager>
|
|||||||
|
|
||||||
final Rank rank = tempRank;
|
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!"));
|
UtilPlayer.message(caller, F.main(Plugin.getName(), ChatColor.RED + "" + ChatColor.BOLD + "Insufficient privileges!"));
|
||||||
return;
|
return;
|
||||||
|
@ -208,20 +208,22 @@ public class AchievementManager extends MiniPlugin
|
|||||||
{
|
{
|
||||||
int level = get(sender, Achievement.GLOBAL_MINEPLEX_LEVEL).getLevel();
|
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"))
|
if (sender.getName().equalsIgnoreCase("Phinary") || sender.getName().equalsIgnoreCase("Horus"))
|
||||||
level = -level;
|
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;
|
return level;
|
||||||
}
|
}
|
||||||
|
@ -15,6 +15,7 @@ import org.bukkit.entity.Player;
|
|||||||
import org.bukkit.event.EventHandler;
|
import org.bukkit.event.EventHandler;
|
||||||
import org.bukkit.event.HandlerList;
|
import org.bukkit.event.HandlerList;
|
||||||
import org.bukkit.event.Listener;
|
import org.bukkit.event.Listener;
|
||||||
|
import org.bukkit.event.inventory.ClickType;
|
||||||
import org.bukkit.event.inventory.InventoryClickEvent;
|
import org.bukkit.event.inventory.InventoryClickEvent;
|
||||||
import org.bukkit.event.inventory.InventoryCloseEvent;
|
import org.bukkit.event.inventory.InventoryCloseEvent;
|
||||||
import org.bukkit.inventory.ItemStack;
|
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));
|
}, 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());
|
Collections.sort(punishments, new PunishmentSorter());
|
||||||
|
|
||||||
int slot = 45;
|
int slot = 45;
|
||||||
|
@ -15,7 +15,7 @@ public class RestartServerCommand extends CommandBase<FileUpdater>
|
|||||||
{
|
{
|
||||||
public RestartServerCommand(FileUpdater plugin)
|
public RestartServerCommand(FileUpdater plugin)
|
||||||
{
|
{
|
||||||
super(plugin, Rank.ADMIN, "restart");
|
super(plugin, Rank.ADMIN, new Rank[] {Rank.JNR_DEV}, "restart");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -10,7 +10,7 @@ public class NewsCommand extends MultiCommandBase<HubManager>
|
|||||||
{
|
{
|
||||||
public NewsCommand(HubManager plugin)
|
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 NewsAddCommand(plugin));
|
||||||
AddCommand(new NewsDeleteCommand(plugin));
|
AddCommand(new NewsDeleteCommand(plugin));
|
||||||
|
@ -19,7 +19,7 @@ public class NewsListCommand extends CommandBase<HubManager>
|
|||||||
{
|
{
|
||||||
public NewsListCommand(HubManager plugin)
|
public NewsListCommand(HubManager plugin)
|
||||||
{
|
{
|
||||||
super(plugin, Rank.ADMIN, "list");
|
super(plugin, Rank.ADMIN, new Rank[] {Rank.JNR_DEV}, "list");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
Reference in New Issue
Block a user