fix codebreaker being usable on an open display case
@@ -82,16 +82,18 @@ public class DisplayCaseBlockEntity extends CustomizableBlockEntity implements I
@Override
public boolean onCodebreakerUsed(BlockState state, Player player) {
- if (isDisabled()) {
+ if (!isOpen()) {
+ if (isDisabled())
player.displayClientMessage(Utils.localize("gui.securitycraft:scManual.disabled"), true);
- return false;
- }
else {
activate(player);
return true;
}
}
+ return false;
+ }
+
@Override
public String getPassword() {
return (passcode != null && !passcode.isEmpty()) ? passcode : null;
