sign improvement
All checks were successful
/ Auto-Build-App (push) Successful in 4m26s

This commit is contained in:
pietru 2025-04-29 20:57:32 +02:00
parent 4a05528b36
commit 6b690e16dc

View file

@ -36,13 +36,17 @@ public class BlockEntitySignMixin {
ci.cancel(); ci.cancel();
return; return;
} }
if (texts[0].equals("[CLAIM]") ){
ci.cancel();
}
if (texts[0].equals("[CLAIM]") && texts[2].isEmpty() && !player.isProne) { if ((texts[0].equals("[claim]") || texts[0].equals("[CLAIM]")) && texts[2].isEmpty() && !player.isProne) {
BlockEntity be = (BlockEntity) (Object) this; BlockEntity be = (BlockEntity) (Object) this;
int x = be.getGlobalX(); int x = be.getGlobalX();
int y = be.getGlobalY(); int y = be.getGlobalY();
int z = be.getGlobalZ(); int z = be.getGlobalZ();
String ownerId = player.getAccount().getUniqueId(); String ownerId = player.getAccount().getUniqueId();
int c = Region.get_owned_areas(ownerId); int c = Region.get_owned_areas(ownerId);
if (Permissions.has_perm(ownerId,"claims.limit."+(c+1))) { if (Permissions.has_perm(ownerId,"claims.limit."+(c+1))) {
@ -59,7 +63,6 @@ public class BlockEntitySignMixin {
} }
} }
ci.cancel();
if (can_claim) { if (can_claim) {
Area area = new Area(); Area area = new Area();
area.enabled = true; area.enabled = true;