diff --git a/common/src/main/java/org/samo_lego/taterzens/mixin/player/ServerPlayerMixinCast_ITaterzenEditor.java b/common/src/main/java/org/samo_lego/taterzens/mixin/player/ServerPlayerMixinCast_ITaterzenEditor.java index 8cc2669b3..25e2ea64b 100644 --- a/common/src/main/java/org/samo_lego/taterzens/mixin/player/ServerPlayerMixinCast_ITaterzenEditor.java +++ b/common/src/main/java/org/samo_lego/taterzens/mixin/player/ServerPlayerMixinCast_ITaterzenEditor.java @@ -121,14 +121,12 @@ public TaterzenNPC getNpc() { @Override public boolean selectNpc(@Nullable TaterzenNPC npc) { - if ( - npc != null && !npc.canEdit(this.player) && - Taterzens.getInstance().getPlatform().checkPermission( - this.player.createCommandSourceStack(), "taterzens.npc.select.bypass", config.perms.selectBypassLevel - ) - ) { + if (npc != null && !npc.allowEditBy(this.player) && + !Taterzens.getInstance().getPlatform().checkPermission( + this.player.createCommandSourceStack(), "taterzens.npc.select.bypass", config.perms.selectBypassLevel)) { return false; } + TaterzenNPC selectedNpc = this.taterzens$selectedNpc; this.taterzens$selectedNpc = npc; diff --git a/common/src/main/java/org/samo_lego/taterzens/npc/TaterzenNPC.java b/common/src/main/java/org/samo_lego/taterzens/npc/TaterzenNPC.java index 6f4ece9fb..55b21910a 100644 --- a/common/src/main/java/org/samo_lego/taterzens/npc/TaterzenNPC.java +++ b/common/src/main/java/org/samo_lego/taterzens/npc/TaterzenNPC.java @@ -1741,8 +1741,8 @@ public boolean causeFallDamage(float fallDistance, float multiplier, DamageSourc * @param entity entity to check. * @return true if taterzen can be edited by entity, otherwise false. */ - public boolean canEdit(Entity entity) { - return this.canEdit(entity.getUUID()); + public boolean allowEditBy(Entity entity) { + return this.allowEditBy(entity.getUUID()); } /** @@ -1750,7 +1750,7 @@ public boolean canEdit(Entity entity) { * @param uuid uuid to check. * @return true if taterzen can be edited by provided uuid, otherwise false. */ - public boolean canEdit(UUID uuid) { + public boolean allowEditBy(UUID uuid) { return this.lockedUuid == null || this.lockedUuid.equals(uuid) || this.getUUID().equals(uuid); } diff --git a/gradle.properties b/gradle.properties index 992d6b3e2..b68e0883f 100644 --- a/gradle.properties +++ b/gradle.properties @@ -13,7 +13,7 @@ fabric_version=0.45.1+1.18 forge_version=39.0.10 # Mod Properties -mod_version = 1.8.3 +mod_version = 1.8.4 maven_group = org.samo_lego archives_base_name = taterzens