Skip to content

Commit

Permalink
Sure it cause some errors
Browse files Browse the repository at this point in the history
  • Loading branch information
TonimatasDEV committed Sep 6, 2024
1 parent 9bcee73 commit 6f85194
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,11 @@ public void onCommandPreProcess(PlayerCommandPreprocessEvent event) {
.replaceAll("\\{world}", event.getPlayer().getWorld().getName())
.replaceAll("\\{player}", event.getPlayer().getName()));
event.setCancelled(true);
return;
} else {
if (possibleCommands.isEmpty()) return;

event.setMessage(event.getMessage().replaceFirst(commandStringWithVar, "/" + possibleCommands.get(0)));
}

event.setMessage(event.getMessage().replaceFirst(commandStringWithVar, "/" + possibleCommands.get(0)));
}
}

0 comments on commit 6f85194

Please sign in to comment.