mirror of
https://github.com/SunNetservers/Launchpad.git
synced 2025-01-18 20:15:26 +01:00
Fixes some error messages displayed as successes
This commit is contained in:
parent
1a9ad558ec
commit
8ab0c378bb
@ -106,7 +106,7 @@ public class LaunchpadCommand implements CommandExecutor {
|
|||||||
private boolean checkLaunchpad(@NotNull Player player, @NotNull StringFormatter stringFormatter) {
|
private boolean checkLaunchpad(@NotNull Player player, @NotNull StringFormatter stringFormatter) {
|
||||||
Block targetBlock = player.getTargetBlockExact(7);
|
Block targetBlock = player.getTargetBlockExact(7);
|
||||||
if (targetBlock == null) {
|
if (targetBlock == null) {
|
||||||
stringFormatter.displaySuccessMessage(player, LaunchpadMessage.ERROR_NOT_LOOKING_AT_BLOCK);
|
stringFormatter.displayErrorMessage(player, LaunchpadMessage.ERROR_NOT_LOOKING_AT_BLOCK);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
LaunchpadBlock launchpadBlock = LaunchpadBlockHandler.getLaunchpadBlock(targetBlock);
|
LaunchpadBlock launchpadBlock = LaunchpadBlockHandler.getLaunchpadBlock(targetBlock);
|
||||||
@ -116,7 +116,7 @@ public class LaunchpadCommand implements CommandExecutor {
|
|||||||
if (!Launchpad.getInstance().getConfiguration().isNotLaunchpadMaterial(targetBlock.getType())) {
|
if (!Launchpad.getInstance().getConfiguration().isNotLaunchpadMaterial(targetBlock.getType())) {
|
||||||
stringFormatter.displaySuccessMessage(player, new LaunchpadBlock(targetBlock, true).toString());
|
stringFormatter.displaySuccessMessage(player, new LaunchpadBlock(targetBlock, true).toString());
|
||||||
} else {
|
} else {
|
||||||
stringFormatter.displaySuccessMessage(player, LaunchpadMessage.ERROR_NO_LAUNCHPAD);
|
stringFormatter.displayErrorMessage(player, LaunchpadMessage.ERROR_NO_LAUNCHPAD);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user