mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2025-01-25 02:12:52 +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);
|
boolean result = targetPlayer.getServer().getDungeonManager().enterDungeon(targetPlayer.getSession().getPlayer(), 0, dungeonId);
|
||||||
CommandHandler.sendMessage(sender, translate(sender, "commands.enter_dungeon.changed", dungeonId));
|
|
||||||
|
|
||||||
if (!result) {
|
if (!result) {
|
||||||
CommandHandler.sendMessage(sender, translate(sender, "commands.enter_dungeon.not_found_error"));
|
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) {
|
} catch (Exception e) {
|
||||||
CommandHandler.sendMessage(sender, translate(sender, "commands.enter_dungeon.usage"));
|
CommandHandler.sendMessage(sender, translate(sender, "commands.enter_dungeon.usage"));
|
||||||
|
Loading…
Reference in New Issue
Block a user