Don't show a deny message if it's an empty string.

This commit is contained in:
sk89q 2014-08-31 19:35:13 -07:00
parent f858c175f9
commit d6f12804ea

View File

@ -100,7 +100,7 @@ private void tellErrorMessage(DelegateEvent event, Cause cause, Location locatio
if (lastTime == null || now - lastTime >= LAST_MESSAGE_DELAY) {
RegionQuery query = getPlugin().getRegionContainer().createQuery();
String message = query.queryValue(location, player, DefaultFlag.DENY_MESSAGE);
if (message != null) {
if (message != null && !message.isEmpty()) {
player.sendMessage(message.replace("%what%", what));
}
WGMetadata.put(player, DENY_MESSAGE_KEY, now);