Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
zly2006 committed Jul 10, 2024
1 parent 47eb160 commit 6ec5afc
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
org.gradle.jvmargs=-Xmx5G
org.gradle.parallel=true
# Mod Properties
mod_version=0.4.2
archices_preview_version=alpha
mod_version=0.4.3
archices_preview_version=

maven_group=com.github.zly2006
archives_base_name=enclosure-fabric
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ private void canPlace(ItemPlacementContext context, BlockState state, CallbackIn
if (context.getPlayer() instanceof ServerPlayerEntity serverPlayer) {
if (!ServerMain.INSTANCE.checkPermission(serverPlayer, Permission.PLACE_BLOCK, context.getBlockPos())) {
serverPlayer.sendMessage(PLACE_BLOCK.getNoPermissionMsg(serverPlayer));
serverPlayer.currentScreenHandler.syncState();
cir.setReturnValue(false);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ private void protectPlacing(BlockPos pos, Direction facing, ItemStack stack, Cal
if (((LivingEntity) this) instanceof ServerPlayerEntity serverPlayer) {
if (!ServerMain.INSTANCE.checkPermission(serverPlayer, PLACE_BLOCK, pos)) {
serverPlayer.sendMessage(PLACE_BLOCK.getNoPermissionMsg(serverPlayer));
serverPlayer.currentScreenHandler.syncState();
cir.setReturnValue(false);
}
}
Expand Down

0 comments on commit 6ec5afc

Please sign in to comment.