Skip to content

Commit

Permalink
修复BlockBarrel的检查
Browse files Browse the repository at this point in the history
  • Loading branch information
lt-name committed Aug 15, 2021
1 parent 3cde1ba commit f260b69
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -279,12 +279,13 @@ public void onUseChest(PlayerInteractEvent event) {
}
try{
Class.forName("cn.nukkit.block.BlockBarrel");
}catch (Exception i){
if(event.getBlock() instanceof BlockBarrel){
if(event.getBlock() instanceof BlockBarrel) {
if (notHasPermission(player, event.getBlock(), LandSetting.LOCK_CHEST)) {
event.setCancelled();
}
}
}catch (Exception ignored){

}
if(event.getBlock() instanceof BlockChest || event.getBlock() instanceof BlockShulkerBox) {
if (notHasPermission(player, event.getBlock(), LandSetting.LOCK_CHEST)) {
Expand Down

0 comments on commit f260b69

Please sign in to comment.