Prevents an empty deny reason from being displayed
Some checks failed
EpicKnarvik97/Stargate/pipeline/head There was a failure building this commit
Some checks failed
EpicKnarvik97/Stargate/pipeline/head There was a failure building this commit
This commit is contained in:
parent
a80a8520ce
commit
ab9a118d49
@ -140,7 +140,9 @@ public class BlockEventListener implements Listener {
|
||||
|
||||
//Destroy denied
|
||||
if (destroyEvent.getDeny()) {
|
||||
Stargate.getMessageSender().sendErrorMessage(player, destroyEvent.getDenyReason());
|
||||
if (!destroyEvent.getDenyReason().trim().isEmpty()) {
|
||||
Stargate.getMessageSender().sendErrorMessage(player, destroyEvent.getDenyReason());
|
||||
}
|
||||
event.setCancelled(true);
|
||||
return;
|
||||
}
|
||||
|
@ -192,7 +192,9 @@ public class PortalCreator {
|
||||
|
||||
//Tell the user why it was denied from creating the portal
|
||||
if (stargateCreateEvent.getDeny()) {
|
||||
Stargate.getMessageSender().sendErrorMessage(player, stargateCreateEvent.getDenyReason());
|
||||
if (!stargateCreateEvent.getDenyReason().trim().isEmpty()) {
|
||||
Stargate.getMessageSender().sendErrorMessage(player, stargateCreateEvent.getDenyReason());
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user