Forgot to actually make sure this compiles lol

This commit is contained in:
Seth 2020-08-14 23:48:31 -07:00
parent f5b5fcd5ef
commit 3f4d34d172
No known key found for this signature in database
GPG Key ID: A7BAB4E14F089CF3
5 changed files with 11 additions and 49 deletions

View File

@ -142,47 +142,15 @@ public class ChatManager extends FreedomService
}
}
public ChatColor getColor(StaffMember staffMember, Displayable display)
public ChatColor getColor(Displayable display)
{
ChatColor color = display.getColor();
if (staffMember.getOldTags())
{
if (color.equals(ChatColor.AQUA))
{
color = ChatColor.GOLD;
}
else if (color.equals(ChatColor.GOLD))
{
color = ChatColor.LIGHT_PURPLE;
}
else if (color.equals(ChatColor.DARK_RED))
{
color = ChatColor.BLUE;
}
}
return color;
}
public String getColoredTag(StaffMember staffMember, Displayable display)
public String getColoredTag(Displayable display)
{
ChatColor color = display.getColor();
if (staffMember.getOldTags())
{
if (color.equals(ChatColor.AQUA))
{
color = ChatColor.GOLD;
}
else if (color.equals(ChatColor.GOLD))
{
color = ChatColor.LIGHT_PURPLE;
}
else if (color.equals(ChatColor.DARK_RED))
{
color = ChatColor.BLUE;
}
}
return color + display.getAbbr();
}
@ -199,13 +167,13 @@ public class ChatManager extends FreedomService
if (!Strings.isNullOrEmpty(staffMember.getAcFormat()))
{
String format = staffMember.getAcFormat();
ChatColor color = getColor(staffMember, display);
ChatColor color = getColor(display);
String msg = format.replace("%name%", sender.getName()).replace("%rank%", display.getAbbr()).replace("%rankcolor%", color.toString()).replace("%msg%", message);
player.sendMessage(FUtil.colorize(msg));
}
else
{
player.sendMessage("[" + ChatColor.AQUA + "STAFF" + ChatColor.WHITE + "] " + ChatColor.DARK_RED + sender.getName() + ChatColor.DARK_GRAY + " [" + getColoredTag(staffMember, display) + ChatColor.DARK_GRAY + "]" + ChatColor.WHITE + ": " + ChatColor.GOLD + FUtil.colorize(message));
player.sendMessage("[" + ChatColor.AQUA + "STAFF" + ChatColor.WHITE + "] " + ChatColor.DARK_RED + sender.getName() + ChatColor.DARK_GRAY + " [" + getColoredTag(display) + ChatColor.DARK_GRAY + "]" + ChatColor.WHITE + ": " + ChatColor.GOLD + FUtil.colorize(message));
}
}
}

View File

@ -149,7 +149,7 @@ public class LoginProcess extends FreedomService
return;
}
// Player is not an admin
// Player is not a staff member
// Server full check
if (server.getOnlinePlayers().size() >= server.getMaxPlayers())
{
@ -157,8 +157,8 @@ public class LoginProcess extends FreedomService
return;
}
// Admin-only mode
if (ConfigEntry.ADMIN_ONLY_MODE.getBoolean())
// Staff-only mode
if (ConfigEntry.STAFF_ONLY_MODE.getBoolean())
{
event.disallow(PlayerLoginEvent.Result.KICK_OTHER, "Server is temporarily open to admins only.");
return;
@ -257,9 +257,9 @@ public class LoginProcess extends FreedomService
@Override
public void run()
{
if (ConfigEntry.ADMIN_ONLY_MODE.getBoolean())
if (ConfigEntry.STAFF_ONLY_MODE.getBoolean())
{
player.sendMessage(ChatColor.RED + "Server is currently closed to non-admins.");
player.sendMessage(ChatColor.RED + "Server is currently closed to non-staff.");
}
if (lockdownEnabled)

View File

@ -30,7 +30,7 @@ public class ServerPing extends FreedomService
return;
}
if (ConfigEntry.ADMIN_ONLY_MODE.getBoolean())
if (ConfigEntry.STAFF_ONLY_MODE.getBoolean())
{
event.setMotd(FUtil.colorize(ConfigEntry.SERVER_STAFFMODE_MOTD.getString()));
return;

View File

@ -1,6 +1,5 @@
package me.totalfreedom.totalfreedommod.command;
import me.totalfreedom.totalfreedommod.config.ConfigEntry;
import me.totalfreedom.totalfreedommod.rank.Rank;
import me.totalfreedom.totalfreedommod.util.FUtil;
import org.bukkit.Location;
@ -21,11 +20,6 @@ public class Command_setspawnworld extends FreedomCommand
msg("Spawn location for this world set to: " + FUtil.formatLocation(playerSender.getWorld().getSpawnLocation()));
if (ConfigEntry.PROTECTAREA_ENABLED.getBoolean() && ConfigEntry.PROTECTAREA_SPAWNPOINTS.getBoolean())
{
plugin.pa.addProtectedArea("spawn_" + playerSender.getWorld().getName(), pos, ConfigEntry.PROTECTAREA_RADIUS.getDouble());
}
return true;
}
}

View File

@ -53,7 +53,7 @@ public class Module_players extends HTTPDModule
switch (staffMember.getRank())
{
case SUPER_ADMIN:
case TRIAL_MOD:
superadmins.add(username);
break;
case MOD: