Make LWC donation and display protections work with shops

This commit is contained in:
Phoenix616 2021-05-16 00:15:59 +01:00
parent c9b8e136d1
commit d3ed650b74
No known key found for this signature in database
GPG Key ID: 40E2321E71738EB0

View File

@ -120,7 +120,7 @@ public class LightweightChestProtection implements Listener {
return;
}
if (!lwc.canAccessProtection(player, protection) || protection.getType() == Protection.Type.DONATION) {
if (!lwc.canAccessProtection(player, protection) && !protection.getType().name().equals("DONATION") && !protection.getType().name().equals("DISPLAY")) {
event.setResult(Event.Result.DENY);
} else if (Properties.TURN_OFF_DEFAULT_PROTECTION_WHEN_PROTECTED_EXTERNALLY) {
event.setResult(Event.Result.ALLOW);