Only requires sneaking when destroying permission signs in creative
This commit is contained in:
parent
e32e37b246
commit
c9d0907b2f
@ -4,6 +4,7 @@ import net.knarcraft.permissionsigns.PermissionSigns;
|
||||
import net.knarcraft.permissionsigns.formatting.StringFormatter;
|
||||
import net.knarcraft.permissionsigns.formatting.TranslatableMessage;
|
||||
import net.knarcraft.permissionsigns.manager.SignManager;
|
||||
import org.bukkit.GameMode;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.Tag;
|
||||
import org.bukkit.block.Block;
|
||||
@ -190,7 +191,7 @@ public class BlockListener implements Listener {
|
||||
event.setCancelled(true);
|
||||
player.sendMessage(StringFormatter.getTranslatedErrorMessage(TranslatableMessage.PERMISSION_SIGN_DESTROY_DENY));
|
||||
} else {
|
||||
if (!player.isSneaking()) {
|
||||
if (!player.isSneaking() && player.getGameMode() == GameMode.CREATIVE) {
|
||||
event.setCancelled(true);
|
||||
player.sendMessage(StringFormatter.getTranslatedErrorMessage(TranslatableMessage.PERMISSION_SIGN_DESTROY_SNEAK));
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user