mirror of
https://github.com/songoda/FabledSkyBlock.git
synced 2024-11-07 03:00:29 +01:00
Fix doors not covering all openables
This commit is contained in:
parent
8786cdd710
commit
959d52a431
@ -9,6 +9,7 @@ import com.songoda.skyblock.permission.PermissionType;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.block.Action;
|
||||
import org.bukkit.event.player.PlayerInteractEvent;
|
||||
import org.bukkit.material.Openable;
|
||||
|
||||
public class DoorPermission extends ListeningPermission {
|
||||
|
||||
@ -27,13 +28,10 @@ public class DoorPermission extends ListeningPermission {
|
||||
|
||||
if (event.getAction() != Action.RIGHT_CLICK_BLOCK && event.getAction() != Action.LEFT_CLICK_BLOCK)
|
||||
return;
|
||||
|
||||
CompatibleMaterial material = CompatibleMaterial.getMaterial(event.getClickedBlock());
|
||||
|
||||
Player player = event.getPlayer();
|
||||
|
||||
if (material == CompatibleMaterial.BIRCH_DOOR || material == CompatibleMaterial.ACACIA_DOOR
|
||||
|| material == CompatibleMaterial.DARK_OAK_DOOR || material == CompatibleMaterial.JUNGLE_DOOR
|
||||
|| material == CompatibleMaterial.SPRUCE_DOOR || material == CompatibleMaterial.OAK_DOOR)
|
||||
if (event.getClickedBlock() instanceof Openable)
|
||||
cancelAndMessage(event, player, plugin, messageManager);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user