mirror of
https://github.com/songoda/FabledSkyBlock.git
synced 2024-11-07 03:00:29 +01:00
Fixed error in storage permission
This commit is contained in:
parent
d91b0f2768
commit
746137b8f2
@ -28,37 +28,39 @@ public class StoragePermission extends ListeningPermission {
|
||||
|
||||
@PermissionHandler
|
||||
public void onInteract(PlayerInteractEvent event) {
|
||||
if (!event.getAction().equals(Action.RIGHT_CLICK_BLOCK))
|
||||
return;
|
||||
|
||||
CompatibleMaterial material = CompatibleMaterial.getMaterial(event.getClickedBlock());
|
||||
Player player = event.getPlayer();
|
||||
|
||||
switch (material){
|
||||
case CHEST:
|
||||
case TRAPPED_CHEST:
|
||||
case DROPPER:
|
||||
case DISPENSER:
|
||||
case SHULKER_BOX:
|
||||
case BLACK_SHULKER_BOX:
|
||||
case BLUE_SHULKER_BOX:
|
||||
case BROWN_SHULKER_BOX:
|
||||
case CYAN_SHULKER_BOX:
|
||||
case GRAY_SHULKER_BOX:
|
||||
case GREEN_SHULKER_BOX:
|
||||
case LIGHT_BLUE_SHULKER_BOX:
|
||||
case LIGHT_GRAY_SHULKER_BOX:
|
||||
case LIME_SHULKER_BOX:
|
||||
case MAGENTA_SHULKER_BOX:
|
||||
case ORANGE_SHULKER_BOX:
|
||||
case PURPLE_SHULKER_BOX:
|
||||
case PINK_SHULKER_BOX:
|
||||
case RED_SHULKER_BOX:
|
||||
case YELLOW_SHULKER_BOX:
|
||||
case WHITE_SHULKER_BOX:
|
||||
case BARREL:
|
||||
cancelAndMessage(event, player, plugin, messageManager);
|
||||
if (event.getAction().equals(Action.RIGHT_CLICK_BLOCK)) {
|
||||
CompatibleMaterial material = CompatibleMaterial.getMaterial(event.getClickedBlock());
|
||||
Player player = event.getPlayer();
|
||||
|
||||
if (material != null) {
|
||||
switch (material) {
|
||||
case CHEST:
|
||||
case TRAPPED_CHEST:
|
||||
case DROPPER:
|
||||
case DISPENSER:
|
||||
case SHULKER_BOX:
|
||||
case BLACK_SHULKER_BOX:
|
||||
case BLUE_SHULKER_BOX:
|
||||
case BROWN_SHULKER_BOX:
|
||||
case CYAN_SHULKER_BOX:
|
||||
case GRAY_SHULKER_BOX:
|
||||
case GREEN_SHULKER_BOX:
|
||||
case LIGHT_BLUE_SHULKER_BOX:
|
||||
case LIGHT_GRAY_SHULKER_BOX:
|
||||
case LIME_SHULKER_BOX:
|
||||
case MAGENTA_SHULKER_BOX:
|
||||
case ORANGE_SHULKER_BOX:
|
||||
case PURPLE_SHULKER_BOX:
|
||||
case PINK_SHULKER_BOX:
|
||||
case RED_SHULKER_BOX:
|
||||
case YELLOW_SHULKER_BOX:
|
||||
case WHITE_SHULKER_BOX:
|
||||
case BARREL:
|
||||
cancelAndMessage(event, player, plugin, messageManager);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@PermissionHandler
|
||||
|
Loading…
Reference in New Issue
Block a user