Skip to content

Commit

Permalink
Fix crash when registering over a vanilla command
Browse files Browse the repository at this point in the history
  • Loading branch information
PseudoKnight committed Aug 31, 2024
1 parent 9c178e9 commit 7a5dd5b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/com/laytonsmith/core/functions/Commands.java
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ public Mixed exec(Target t, Environment environment, Mixed... args) throws Confi
MCCommand cmd = map.getCommand(cmdStr);
String prefix = Implementation.GetServerType().getBranding().toLowerCase(Locale.ENGLISH);
boolean register = false;
if(cmd == null) {
if(cmd == null || cmd.getPlugin() == null) {
register = true;
cmd = StaticLayer.GetConvertor().getNewCommand(cmdStr);
}
Expand Down

0 comments on commit 7a5dd5b

Please sign in to comment.