Fixes some error messages displayed as successes

This commit is contained in:
Kristian Knarvik 2024-04-23 14:44:40 +02:00
parent 1a9ad558ec
commit 8ab0c378bb

View File

@ -106,7 +106,7 @@ public class LaunchpadCommand implements CommandExecutor {
private boolean checkLaunchpad(@NotNull Player player, @NotNull StringFormatter stringFormatter) {
Block targetBlock = player.getTargetBlockExact(7);
if (targetBlock == null) {
stringFormatter.displaySuccessMessage(player, LaunchpadMessage.ERROR_NOT_LOOKING_AT_BLOCK);
stringFormatter.displayErrorMessage(player, LaunchpadMessage.ERROR_NOT_LOOKING_AT_BLOCK);
return false;
}
LaunchpadBlock launchpadBlock = LaunchpadBlockHandler.getLaunchpadBlock(targetBlock);
@ -116,7 +116,7 @@ public class LaunchpadCommand implements CommandExecutor {
if (!Launchpad.getInstance().getConfiguration().isNotLaunchpadMaterial(targetBlock.getType())) {
stringFormatter.displaySuccessMessage(player, new LaunchpadBlock(targetBlock, true).toString());
} else {
stringFormatter.displaySuccessMessage(player, LaunchpadMessage.ERROR_NO_LAUNCHPAD);
stringFormatter.displayErrorMessage(player, LaunchpadMessage.ERROR_NO_LAUNCHPAD);
}
}
return true;