mirror of
https://github.com/Phoenix616/RandomTeleport.git
synced 2024-11-13 06:07:38 +01:00
Use block state directly instead of creating a new snapshot
This commit is contained in:
parent
9017dadc15
commit
17f303fb01
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user