Permalink
Browse files

Added other boat types to WaterPlaceOnly.

  • Loading branch information...
me4502 committed Apr 8, 2017
1 parent 41a6b62 commit 76d74fadbc44717fcb333c581fe526eafafedc9e
Showing with 7 additions and 1 deletion.
  1. +7 −1 src/main/java/com/sk89q/craftbook/mechanics/boat/WaterPlaceOnly.java
@@ -17,7 +17,13 @@
public void playerInteractEvent(PlayerInteractEvent event) {
if (event.getAction() == Action.RIGHT_CLICK_BLOCK && event.getHand() != EquipmentSlot.HAND) {
- if(event.getPlayer().getItemInHand() != null && event.getPlayer().getItemInHand().getType() == Material.BOAT) {
+ if(event.getPlayer().getItemInHand() != null
+ && event.getPlayer().getItemInHand().getType() == Material.BOAT
+ && event.getPlayer().getItemInHand().getType() == Material.BOAT_ACACIA
+ && event.getPlayer().getItemInHand().getType() == Material.BOAT_BIRCH
+ && event.getPlayer().getItemInHand().getType() == Material.BOAT_DARK_OAK
+ && event.getPlayer().getItemInHand().getType() == Material.BOAT_JUNGLE
+ && event.getPlayer().getItemInHand().getType() == Material.BOAT_SPRUCE) {
Block above = event.getClickedBlock().getRelative(0,1,0);
if ((!isWater(above) || event.getClickedBlock().getY() == event.getClickedBlock().getWorld().getMaxHeight() - 1) && !isWater(event.getClickedBlock())) {
event.setCancelled(true);

0 comments on commit 76d74fa

Please sign in to comment.