Use block state directly instead of creating a new snapshot

This commit is contained in:
Phoenix616 2019-01-23 00:49:52 +01:00
parent 9017dadc15
commit 17f303fb01

View File

@ -45,7 +45,7 @@ public class MinecraftHook implements ProtectionHook, WorldborderHook {
@Override
public boolean canBuild(Player player, Location location) {
BlockStateSnapshotResult state = PaperLib.getBlockState(location.getBlock(), true);
BlockStateSnapshotResult state = PaperLib.getBlockState(location.getBlock(), false);
if (state.getState() instanceof Lockable) {
return ((Lockable) state.getState()).getLock() == null;
}