mirror of
https://github.com/songoda/FabledSkyBlock.git
synced 2025-02-27 09:01:23 +01:00
Fix placing buckets of fish.
This commit is contained in:
parent
9651fd0e1a
commit
600304b212
@ -62,9 +62,13 @@ public class InteractListeners implements Listener {
|
|||||||
IslandLevelManager levellingManager = plugin.getLevellingManager();
|
IslandLevelManager levellingManager = plugin.getLevellingManager();
|
||||||
if (!worldManager.isIslandWorld(block.getWorld())) return;
|
if (!worldManager.isIslandWorld(block.getWorld())) return;
|
||||||
|
|
||||||
if (event.getAction() == Action.RIGHT_CLICK_BLOCK &&
|
if (event.getAction() == Action.RIGHT_CLICK_BLOCK
|
||||||
worldManager.getIslandWorld(block.getWorld()).equals(IslandWorld.Nether) &&
|
&& worldManager.getIslandWorld(block.getWorld()).equals(IslandWorld.Nether)
|
||||||
event.getItem().getType().equals(Material.WATER_BUCKET)) {
|
&& (event.getItem().getType().equals(Material.WATER_BUCKET)
|
||||||
|
|| event.getItem().getType().equals(Material.TROPICAL_FISH_BUCKET)
|
||||||
|
|| event.getItem().getType().equals(Material.COD_BUCKET)
|
||||||
|
|| event.getItem().getType().equals(Material.SALMON_BUCKET)
|
||||||
|
|| event.getItem().getType().equals(Material.PUFFERFISH_BUCKET))) {
|
||||||
Location blockLoc = block.getLocation();
|
Location blockLoc = block.getLocation();
|
||||||
|
|
||||||
Island island = islandManager.getIslandAtLocation(blockLoc);
|
Island island = islandManager.getIslandAtLocation(blockLoc);
|
||||||
@ -121,14 +125,8 @@ public class InteractListeners implements Listener {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (configLoad.getBoolean("Island.Nether.AllowNetherWater", false)) {
|
if (configLoad.getBoolean("Island.Nether.AllowNetherWater", false))
|
||||||
event.setCancelled(true);
|
|
||||||
block.setType(Material.WATER, true);
|
block.setType(Material.WATER, true);
|
||||||
block.getWorld().playSound(block.getLocation(), CompatibleSound.ITEM_BUCKET_EMPTY.getSound(), 1f, 1f);
|
|
||||||
if (!event.getPlayer().getGameMode().equals(GameMode.CREATIVE)) {
|
|
||||||
event.getItem().setType(Material.BUCKET);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user