added MB_WORLD_TESTMODE to config manager and file

This commit is contained in:
2024-12-28 04:27:26 -06:00
parent a4bd47f001
commit daa84a1fef
3 changed files with 18 additions and 12 deletions
@@ -65,6 +65,7 @@ public enum ConfigManager {
MB_WORLD_MAINTENANCE, MB_WORLD_MAINTENANCE,
MB_WORLD_GREETING, MB_WORLD_GREETING,
MB_WORLD_KEYCLONE_MAX, MB_WORLD_KEYCLONE_MAX,
MB_WORLD_TESTMODE,
MB_USE_RUINS, MB_USE_RUINS,
// Mobile AI modifiers // Mobile AI modifiers
@@ -180,6 +180,7 @@ public enum DevCmdManager {
//kill any commands not available to everyone on production server //kill any commands not available to everyone on production server
//only admin level can run dev commands on production //only admin level can run dev commands on production
boolean playerAllowed = false; boolean playerAllowed = false;
if(ConfigManager.MB_WORLD_TESTMODE.getValue().equals("true")) {
switch (adc.getMainCmdString()) { switch (adc.getMainCmdString()) {
case "printresists": case "printresists":
case "printstats": case "printstats":
@@ -193,6 +194,7 @@ public enum DevCmdManager {
target = pcSender; target = pcSender;
break; break;
} }
}
if (!playerAllowed && !a.status.equals(Enum.AccountStatus.ADMIN)) { if (!playerAllowed && !a.status.equals(Enum.AccountStatus.ADMIN)) {
Logger.info("Account " + a.getUname() + "attempted to use dev command " + cmd); Logger.info("Account " + a.getUname() + "attempted to use dev command " + cmd);
return false; return false;
+3
View File
@@ -4895,6 +4895,9 @@ public class PlayerCharacter extends AbstractCharacter {
} }
public static boolean checkIfBoxed(PlayerCharacter player){ public static boolean checkIfBoxed(PlayerCharacter player){
if(ConfigManager.MB_WORLD_TESTMODE.getValue().equals("true")) {
return false;
}
try { try {
String machineID = player.getClientConnection().machineID; String machineID = player.getClientConnection().machineID;
ArrayList<PlayerCharacter> sameMachine = new ArrayList<>(); ArrayList<PlayerCharacter> sameMachine = new ArrayList<>();