From cbff151dc3fd55bdf171908993d04815b987372c Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Fri, 5 Jul 2024 21:08:47 -0500 Subject: [PATCH] allow some dev commands for players (print) --- src/engine/gameManager/DevCmdManager.java | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/engine/gameManager/DevCmdManager.java b/src/engine/gameManager/DevCmdManager.java index 7528621b..f0b14dd3 100644 --- a/src/engine/gameManager/DevCmdManager.java +++ b/src/engine/gameManager/DevCmdManager.java @@ -178,8 +178,17 @@ public enum DevCmdManager { //kill any commands not available to everyone on production server //only admin level can run dev commands on production - - if (a.status.equals(Enum.AccountStatus.ADMIN) == false) { + boolean playerAllowed = 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); return false; }