Added all the Telnet Admin stuff.

This commit is contained in:
Wilee999 2013-11-27 09:21:53 -08:00
parent 1a5f854552
commit 67f096fbfa
2 changed files with 22 additions and 3 deletions

View File

@ -2,8 +2,11 @@ package me.StevenLawson.TotalFreedomMod.Commands;
import java.util.ArrayList;
import java.util.List;
import me.StevenLawson.TotalFreedomMod.TFM_Superadmin;
import me.StevenLawson.TotalFreedomMod.TFM_SuperadminList;
import me.StevenLawson.TotalFreedomMod.TFM_Util;
import org.apache.commons.lang3.StringUtils;
import org.bukkit.ChatColor;
import org.bukkit.command.Command;
@ -63,11 +66,16 @@ public class Command_list extends TFM_Command
if (userSuperadmin)
{
if (TFM_SuperadminList.isSeniorAdmin(player))
TFM_Superadmin entry = TFM_SuperadminList.getAdminEntry(player.getName());
if (!entry.isSeniorAdmin() && entry.isTelnetAdmin())
{
prefix = (ChatColor.DARK_GREEN + "[STA]");
}
else if (TFM_SuperadminList.isSeniorAdmin(player))
{
prefix = (ChatColor.LIGHT_PURPLE + "[SrA]");
}
else
else if (TFM_SuperadminList.isUserSuperadmin(player))
{
prefix = (ChatColor.GOLD + "[SA]");
}

View File

@ -10,6 +10,7 @@ import java.text.SimpleDateFormat;
import java.util.*;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.apache.commons.io.FileUtils;
import org.apache.commons.lang3.StringUtils;
import org.bukkit.*;
@ -415,6 +416,11 @@ public class TFM_Util
return ChatColor.translateAlternateColorCodes('&', loginMessage);
}
}
if (!entry.isSeniorAdmin() && entry.isTelnetAdmin())
{
return "a " + ChatColor.DARK_GREEN + "Super Telnet Admin" + ChatColor.AQUA + ".";
}
if (entry.isSeniorAdmin())
{
@ -768,7 +774,12 @@ public class TFM_Util
}
else
{
if (TFM_SuperadminList.isSeniorAdmin(sender))
TFM_Superadmin entry = TFM_SuperadminList.getAdminEntry(sender.getName());
if (!entry.isSeniorAdmin() && entry.isTelnetAdmin())
{
prefix = ChatColor.DARK_GREEN + "(STA)";
}
else if (TFM_SuperadminList.isSeniorAdmin(sender))
{
prefix = ChatColor.LIGHT_PURPLE + "(SrA)";
}