From 04b11e251815c02a5c7a14dd37bc0677d77f37e7 Mon Sep 17 00:00:00 2001 From: UltimateMors <30962403+UltimateMors@users.noreply.github.com> Date: Wed, 5 Jun 2019 11:37:26 -0400 Subject: [PATCH] Disable commands while in jail. (#474) Prevents possible escape while in jail. (May have to also update other cash items to also prevent possible escape.) --- src/client/command/CommandsExecutor.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/client/command/CommandsExecutor.java b/src/client/command/CommandsExecutor.java index 8317c4fd57..abaf090b18 100644 --- a/src/client/command/CommandsExecutor.java +++ b/src/client/command/CommandsExecutor.java @@ -93,6 +93,10 @@ public class CommandsExecutor { } private void handleInternal(MapleClient client, String message){ + if (client.getPlayer().getMapId() == 300000012) { + client.getPlayer().yellowMessage("You not have permission to use this command while in jail."); + return; + } final String splitRegex = "[ ]"; String[] splitedMessage = message.substring(1).split(splitRegex, 2); if (splitedMessage.length < 2) {