add adventure gamemode check
This commit is contained in:
1 parent
b225c4a96d
commit
d1ec2ae4bb
1 file changed
+1
@@ -49,6 +49,7 @@ public class PlayerListener implements Listener {
|
||||
Location cen = block.getLocation().clone().add(0.5,1,0.5);
|
||||
Collection<Entity> list = world.getNearbyEntities(cen,0.5,1,0.5);
|
||||
if(!list.isEmpty()) return;
|
||||
if(e.getPlayer().getGameMode() == GameMode.ADVENTURE) return;
|
||||
e.setCancelled(true);
|
||||
if(e.getPlayer().getGameMode() != GameMode.CREATIVE){
|
||||
ItemStack item = e.getItem();
|
||||
|
||||
Reference in new issue
Block a user