mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2025-01-24 19:23:01 +08:00
Don't send success upon failure
This commit is contained in:
parent
26b1cad9c9
commit
a4a87fe75b
@ -26,10 +26,11 @@ public final class EnterDungeonCommand implements CommandHandler {
|
||||
}
|
||||
|
||||
boolean result = targetPlayer.getServer().getDungeonManager().enterDungeon(targetPlayer.getSession().getPlayer(), 0, dungeonId);
|
||||
CommandHandler.sendMessage(sender, translate(sender, "commands.enter_dungeon.changed", dungeonId));
|
||||
|
||||
if (!result) {
|
||||
CommandHandler.sendMessage(sender, translate(sender, "commands.enter_dungeon.not_found_error"));
|
||||
} else {
|
||||
CommandHandler.sendMessage(sender, translate(sender, "commands.enter_dungeon.changed", dungeonId));
|
||||
}
|
||||
} catch (Exception e) {
|
||||
CommandHandler.sendMessage(sender, translate(sender, "commands.enter_dungeon.usage"));
|
||||
|
Loading…
Reference in New Issue
Block a user