Fixed indexoutofbounds error when calling @gm without anymore parameters (#415)

This commit is contained in:
Nulliphite authored and Ronan Lana committed 2019-02-27 14:05:49 -03:00
1 parent 0dfd57c4ee
commit 2c1f117d35
1 file changed
+1 -1
@@ -46,7 +46,7 @@ public class GmCommand extends Command {
"Do not say 'I have a bug to report', just state it.",
};
MapleCharacter player = c.getPlayer();
if (params[0].length() < 3) { // #goodbye 'hi'
if (params.length < 1 || params[0].length() < 3) { // #goodbye 'hi'
player.dropMessage(5, "Your message was too short. Please provide as much detail as possible.");
return;
}