Browse Source

allow some dev commands for players (print)

lakebane-new
FatBoy-DOTC 4 months ago
parent
commit
cbff151dc3
  1. 13
      src/engine/gameManager/DevCmdManager.java

13
src/engine/gameManager/DevCmdManager.java

@ -178,8 +178,17 @@ 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;
if (a.status.equals(Enum.AccountStatus.ADMIN) == false) { switch(adc.getMainCmdString()){
case "printresists":
case "printstats":
case "printskills":
case "printpowers":
if(target.equals(pcSender))
playerAllowed = true;
break;
}
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;
} }

Loading…
Cancel
Save