Skip to content
This repository has been archived by the owner on Jul 7, 2021. It is now read-only.

Commit

Permalink
Compile BentoBox-1.8 for Minecraft 1.13.2
Browse files Browse the repository at this point in the history
  • Loading branch information
BONNe committed Oct 20, 2019
1 parent cc3d5f3 commit 46479b6
Show file tree
Hide file tree
Showing 8 changed files with 56 additions and 56 deletions.
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
<powermock.version>2.0.2</powermock.version>
<mongodb.version>3.8.0</mongodb.version>
<!-- More visible way how to change dependency versions -->
<spigot.version>1.14.4-R0.1-SNAPSHOT</spigot.version>
<spigot.version>1.13.2-R0.1-SNAPSHOT</spigot.version>
<bstats.version>1.5</bstats.version>
<vault.version>1.7</vault.version>
<placeholderapi.version>2.10.3</placeholderapi.version>
Expand All @@ -79,7 +79,7 @@
<!-- Revision variable removes warning about dynamic version -->
<revision>${build.version}-SNAPSHOT</revision>
<!-- Do not change unless you want different name for local builds. -->
<build.number>-LOCAL</build.number>
<build.number>-1.13.2-LOCAL</build.number>
<!-- This allows to change between versions. -->
<build.version>1.8.0</build.version>
</properties>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ private void checkClickedBlock(Event e, Player player, Location loc, Material ty
case CAULDRON:
checkIsland(e, player, loc, Flags.BREWING);
break;
case BARREL:
// case BARREL:
case CHEST:
case CHEST_MINECART:
case TRAPPED_CHEST:
Expand All @@ -195,7 +195,7 @@ private void checkClickedBlock(Event e, Player player, Location loc, Material ty
case YELLOW_SHULKER_BOX:
case SHULKER_BOX:
case FLOWER_POT:
case COMPOSTER:
// case COMPOSTER:
checkIsland(e, player, loc, Flags.CONTAINER);
break;
case DISPENSER:
Expand Down Expand Up @@ -234,11 +234,11 @@ private void checkClickedBlock(Event e, Player player, Location loc, Material ty
case SPRUCE_FENCE_GATE:
checkIsland(e, player, loc, Flags.GATE);
break;
case BLAST_FURNACE:
case CAMPFIRE:
// case BLAST_FURNACE:
// case CAMPFIRE:
case FURNACE_MINECART:
case FURNACE:
case SMOKER:
// case SMOKER:
checkIsland(e, player, loc, Flags.FURNACE);
break;
case ENCHANTING_TABLE:
Expand All @@ -254,10 +254,10 @@ private void checkClickedBlock(Event e, Player player, Location loc, Material ty
checkIsland(e, player, loc, Flags.NOTE_BLOCK);
break;
case CRAFTING_TABLE:
case CARTOGRAPHY_TABLE:
case GRINDSTONE:
case STONECUTTER:
case LOOM:
// case CARTOGRAPHY_TABLE:
// case GRINDSTONE:
// case STONECUTTER:
// case LOOM:
checkIsland(e, player, loc, Flags.CRAFTING);
break;
case STONE_BUTTON:
Expand Down Expand Up @@ -286,10 +286,10 @@ private void checkClickedBlock(Event e, Player player, Location loc, Material ty
case ITEM_FRAME:
checkIsland(e, player, loc, Flags.ITEM_FRAME);
break;
case LECTERN:
case SWEET_BERRY_BUSH:
checkIsland(e, player, loc, Flags.BREAK_BLOCKS);
break;
// case LECTERN:
// case SWEET_BERRY_BUSH:
// checkIsland(e, player, loc, Flags.BREAK_BLOCKS);
// break;
case CAKE:
checkIsland(e, player, loc, Flags.CAKE);
break;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ public void onPlayerInteract(final PlayerInteractEvent e) {
return;
}

if (e.getAction().equals(Action.RIGHT_CLICK_BLOCK) && e.getClickedBlock().getType().name().contains("SIGN")
&& e.getItem().getType().name().contains("DYE")) {
checkIsland(e, e.getPlayer(), e.getClickedBlock().getLocation(), Flags.DYE);
}
// if (e.getAction().equals(Action.RIGHT_CLICK_BLOCK) && e.getClickedBlock().getType().name().contains("SIGN")
// && e.getItem().getType().name().contains("DYE")) {
// checkIsland(e, e.getPlayer(), e.getClickedBlock().getLocation(), Flags.DYE);
// }
}

@EventHandler(priority = EventPriority.LOWEST, ignoreCancelled = true)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ public Compatibility getCompatibility() {
public enum ServerVersion {
V1_13(Compatibility.INCOMPATIBLE),
V1_13_1(Compatibility.INCOMPATIBLE),
V1_13_2(Compatibility.NOT_SUPPORTED),
V1_13_2(Compatibility.COMPATIBLE),
/**
* @since 1.5.0
*/
Expand All @@ -115,7 +115,7 @@ public enum ServerVersion {
/**
* @since 1.6.0
*/
V1_14_4(Compatibility.COMPATIBLE);
V1_14_4(Compatibility.NOT_SUPPORTED);

private Compatibility compatibility;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,10 +156,10 @@ public InventoryType getType() {
return InventoryType.PLAYER;
}

@Override
public String getTitle() {
return name;
}
// @Override
// public String getTitle() {
// return name;
// }

}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ public void testOnEndIslandPortalNotEnd() {
when(from.toVector()).thenReturn(new Vector(1,2,3));
PortalTeleportationListener np = new PortalTeleportationListener(plugin);
// Wrong cause
PlayerPortalEvent e = new PlayerPortalEvent(null, from, null, TeleportCause.CHORUS_FRUIT);
PlayerPortalEvent e = new PlayerPortalEvent(null, from, null, null, TeleportCause.CHORUS_FRUIT);
np.onEndIslandPortal(e);
assertFalse(e.isCancelled());
}
Expand All @@ -172,7 +172,7 @@ public void testOnEndIslandPortalNoEndWorldGenerated() {
// No end world
when(iwm.isEndGenerate(Mockito.any())).thenReturn(false);
PortalTeleportationListener np = new PortalTeleportationListener(plugin);
PlayerPortalEvent e = new PlayerPortalEvent(null, from, null, TeleportCause.END_PORTAL);
PlayerPortalEvent e = new PlayerPortalEvent(null, from, null, null, TeleportCause.END_PORTAL);
np.onEndIslandPortal(e);
assertFalse(e.isCancelled());
}
Expand All @@ -188,7 +188,7 @@ public void testOnEndIslandPortalWrongWorld() {
// Right cause, end exists, wrong world
when(loc.getWorld()).thenReturn(mock(World.class));
wrongWorld();
PlayerPortalEvent e = new PlayerPortalEvent(null, loc, null, TeleportCause.END_PORTAL);
PlayerPortalEvent e = new PlayerPortalEvent(null, loc, null, null, TeleportCause.END_PORTAL);
when(iwm.isEndGenerate(world)).thenReturn(true);
np.onEndIslandPortal(e);
assertFalse(e.isCancelled());
Expand All @@ -202,7 +202,7 @@ public void testOnEndIslandPortalNullWorld() {
PortalTeleportationListener np = new PortalTeleportationListener(plugin);
Location loc = mock(Location.class);
when(loc.getWorld()).thenReturn(null);
PlayerPortalEvent e = new PlayerPortalEvent(null, loc, null, TeleportCause.END_PORTAL);
PlayerPortalEvent e = new PlayerPortalEvent(null, loc, null, null, TeleportCause.END_PORTAL);
assertFalse(np.onEndIslandPortal(e));
assertFalse(e.isCancelled());
}
Expand All @@ -222,7 +222,7 @@ public void testOnEndIslandPortalHome() {
when(player.getUniqueId()).thenReturn(UUID.randomUUID());
when(im.hasIsland(Mockito.any(), Mockito.any(UUID.class))).thenReturn(false);
// Right cause, end exists, right world
PlayerPortalEvent e = new PlayerPortalEvent(player, from, null, TeleportCause.END_PORTAL);
PlayerPortalEvent e = new PlayerPortalEvent(player, from, null, null, TeleportCause.END_PORTAL);
when(iwm.isEndGenerate(world)).thenReturn(true);
np.onEndIslandPortal(e);
assertFalse(e.isCancelled());
Expand All @@ -243,7 +243,7 @@ public void testOnEndIslandPortalNonBentoBoxWorld() {
Location from = mock(Location.class);
// Teleport from nether to world
when(from.getWorld()).thenReturn(mock(World.class));
PlayerPortalEvent e = new PlayerPortalEvent(null, from, null, TeleportCause.NETHER_PORTAL);
PlayerPortalEvent e = new PlayerPortalEvent(null, from, null, null, TeleportCause.NETHER_PORTAL);
assertFalse(np.onEndIslandPortal(e));
// Verify
assertFalse(e.isCancelled());
Expand All @@ -261,13 +261,13 @@ public void testOnEntityPortal() {
when(from.getWorld()).thenReturn(mock(World.class));
// Not in world
wrongWorld();
EntityPortalEvent e = new EntityPortalEvent(ent, from, null);
EntityPortalEvent e = new EntityPortalEvent(ent, from, null, null);
np.onEntityPortal(e);
assertFalse(e.isCancelled());
// In world
when(iwm.inWorld(any(World.class))).thenReturn(true);
when(iwm.inWorld(any(Location.class))).thenReturn(true);
e = new EntityPortalEvent(ent, from, null);
e = new EntityPortalEvent(ent, from, null, null);
np.onEntityPortal(e);
assertTrue(e.isCancelled());
}
Expand All @@ -278,7 +278,7 @@ public void testOnEntityPortal() {
@Test
public void testOnNetherPortalNotPortal() {
PortalTeleportationListener np = new PortalTeleportationListener(plugin);
PlayerPortalEvent e = new PlayerPortalEvent(null, null, null, TeleportCause.COMMAND);
PlayerPortalEvent e = new PlayerPortalEvent(null, null, null, null, TeleportCause.COMMAND);
assertFalse(np.onNetherPortal(e));
}

Expand All @@ -291,7 +291,7 @@ public void testOnNetherPortalWrongWorld() {
Location from = mock(Location.class);
when(from.getWorld()).thenReturn(mock(World.class));
wrongWorld();
PlayerPortalEvent e = new PlayerPortalEvent(null, from, null, TeleportCause.NETHER_PORTAL);
PlayerPortalEvent e = new PlayerPortalEvent(null, from, null, null, TeleportCause.NETHER_PORTAL);
assertFalse(np.onNetherPortal(e));
}

Expand All @@ -305,7 +305,7 @@ public void testOnNetherPortalFromWorldToNetherIsland() {
// Teleport from world to nether
when(from.getWorld()).thenReturn(world);
when(from.toVector()).thenReturn(new Vector(1,2,3));
PlayerPortalEvent e = new PlayerPortalEvent(null, from, null, TeleportCause.NETHER_PORTAL);
PlayerPortalEvent e = new PlayerPortalEvent(null, from, null, null, TeleportCause.NETHER_PORTAL);
// Nether islands active
when(iwm.isNetherIslands(Mockito.any())).thenReturn(true);
when(iwm.isNetherGenerate(Mockito.any())).thenReturn(true);
Expand All @@ -328,7 +328,7 @@ public void testOnNetherPortalFromWorldToNetherIslandWithSpawnDefined() {
// Teleport from world to nether
when(from.getWorld()).thenReturn(world);
when(from.toVector()).thenReturn(new Vector(1,2,3));
PlayerPortalEvent e = new PlayerPortalEvent(null, from, null, TeleportCause.NETHER_PORTAL);
PlayerPortalEvent e = new PlayerPortalEvent(null, from, null, null, TeleportCause.NETHER_PORTAL);
// Nether islands active
when(iwm.isNetherIslands(Mockito.any())).thenReturn(true);
when(iwm.isNetherGenerate(Mockito.any())).thenReturn(true);
Expand Down Expand Up @@ -360,7 +360,7 @@ public void testOnNetherPortalFromWorldToNetherIslandWithNoSpawnDefined() {
// Teleport from world to nether
when(from.getWorld()).thenReturn(world);
when(from.toVector()).thenReturn(new Vector(1,2,3));
PlayerPortalEvent e = new PlayerPortalEvent(null, from, null, TeleportCause.NETHER_PORTAL);
PlayerPortalEvent e = new PlayerPortalEvent(null, from, null, null, TeleportCause.NETHER_PORTAL);
// Nether islands active
when(iwm.isNetherIslands(Mockito.any())).thenReturn(true);
when(iwm.isNetherGenerate(Mockito.any())).thenReturn(true);
Expand Down Expand Up @@ -391,7 +391,7 @@ public void testOnNetherPortalFromWorldToNetherStandard() {
// Teleport from world to nether
when(from.getWorld()).thenReturn(world);
when(from.toVector()).thenReturn(new Vector(1,2,3));
PlayerPortalEvent e = new PlayerPortalEvent(null, from, null, TeleportCause.NETHER_PORTAL);
PlayerPortalEvent e = new PlayerPortalEvent(null, from, null, null, TeleportCause.NETHER_PORTAL);
// Nether islands inactive
when(iwm.isNetherIslands(Mockito.any())).thenReturn(false);
when(iwm.isNetherGenerate(Mockito.any())).thenReturn(true);
Expand All @@ -414,7 +414,7 @@ public void testOnNetherPortalFromNetherStandard() throws Exception {
Player p = mock(Player.class);
when(p.getUniqueId()).thenReturn(UUID.randomUUID());

PlayerPortalEvent e = new PlayerPortalEvent(p, from, null, TeleportCause.NETHER_PORTAL);
PlayerPortalEvent e = new PlayerPortalEvent(p, from, null, null, TeleportCause.NETHER_PORTAL);
// Nether islands inactive
when(iwm.isNetherIslands(Mockito.any())).thenReturn(false);
when(iwm.isNetherGenerate(Mockito.any())).thenReturn(true);
Expand All @@ -435,7 +435,7 @@ public void testOnNetherPortalFromNetherIsland() {
// Teleport from nether to world
when(from.getWorld()).thenReturn(nether);
when(from.toVector()).thenReturn(new Vector(1,2,3));
PlayerPortalEvent e = new PlayerPortalEvent(null, from, null, TeleportCause.NETHER_PORTAL);
PlayerPortalEvent e = new PlayerPortalEvent(null, from, null, null, TeleportCause.NETHER_PORTAL);
// Nether islands active
when(iwm.isNetherIslands(Mockito.any())).thenReturn(true);
when(iwm.isNetherGenerate(Mockito.any())).thenReturn(true);
Expand All @@ -454,7 +454,7 @@ public void testOnNetherPortalFromNetherIsland() {
public void testOnNetherIslandPortalNullLocation() {
PortalTeleportationListener np = new PortalTeleportationListener(plugin);
Location loc = null;
PlayerPortalEvent e = new PlayerPortalEvent(null, loc, null, TeleportCause.END_PORTAL);
PlayerPortalEvent e = new PlayerPortalEvent(null, loc, null, null, TeleportCause.END_PORTAL);
assertFalse(np.onNetherPortal(e));
assertFalse(e.isCancelled());
}
Expand All @@ -468,7 +468,7 @@ public void testOnNetherPortalNullWorld() {
Location from = mock(Location.class);
// Teleport from nether to world
when(from.getWorld()).thenReturn(null);
PlayerPortalEvent e = new PlayerPortalEvent(null, from, null, TeleportCause.NETHER_PORTAL);
PlayerPortalEvent e = new PlayerPortalEvent(null, from, null, null, TeleportCause.NETHER_PORTAL);
assertFalse(np.onNetherPortal(e));
// Verify
assertFalse(e.isCancelled());
Expand All @@ -484,7 +484,7 @@ public void testOnNetherPortalNonBentoBoxWorld() {
Location from = mock(Location.class);
// Teleport from nether to world
when(from.getWorld()).thenReturn(mock(World.class));
PlayerPortalEvent e = new PlayerPortalEvent(null, from, null, TeleportCause.NETHER_PORTAL);
PlayerPortalEvent e = new PlayerPortalEvent(null, from, null, null, TeleportCause.NETHER_PORTAL);
assertFalse(np.onNetherPortal(e));
// Verify
assertFalse(e.isCancelled());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ public void testOnExplosion() {
*/
@Test
public void testOnBucketEmptyDisallowed() {
PlayerBucketEmptyEvent e = new PlayerBucketEmptyEvent(player, block, block, BlockFace.DOWN, null, null);
PlayerBucketEmptyEvent e = new PlayerBucketEmptyEvent(player, block, BlockFace.DOWN, null, null);
ssp.onBucketEmpty(e);
assertTrue(e.isCancelled());
verify(player).sendMessage("protection.spawn-protected");
Expand All @@ -279,7 +279,7 @@ public void testOnBucketEmptyDisallowed() {
@Test
public void testOnBucketEmptyAllowed() {
when(player.isOp()).thenReturn(true);
PlayerBucketEmptyEvent e = new PlayerBucketEmptyEvent(player, block, block, BlockFace.DOWN, null, null);
PlayerBucketEmptyEvent e = new PlayerBucketEmptyEvent(player, block, BlockFace.DOWN, null, null);
ssp.onBucketEmpty(e);
assertFalse(e.isCancelled());
verify(player, never()).sendMessage("protection.spawn-protected");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ public void testOnBucketEmptyAllowed() {
when(block.getLocation()).thenReturn(location);
when(block.getRelative(Mockito.any())).thenReturn(block);
ItemStack item = mock(ItemStack.class);
PlayerBucketEmptyEvent e = new PlayerBucketEmptyEvent(player, block, block, BlockFace.UP, Material.WATER_BUCKET, item);
PlayerBucketEmptyEvent e = new PlayerBucketEmptyEvent(player, block, BlockFace.UP, Material.WATER_BUCKET, item);
l.onBucketEmpty(e);
assertFalse(e.isCancelled());
}
Expand All @@ -206,7 +206,7 @@ public void testOnBucketEmptyNotAllowed() {
when(block.getLocation()).thenReturn(location);
when(block.getRelative(Mockito.any())).thenReturn(block);
ItemStack item = mock(ItemStack.class);
PlayerBucketEmptyEvent e = new PlayerBucketEmptyEvent(player, block, block, BlockFace.UP, Material.WATER_BUCKET, item);
PlayerBucketEmptyEvent e = new PlayerBucketEmptyEvent(player, block, BlockFace.UP, Material.WATER_BUCKET, item);
l.onBucketEmpty(e);
assertTrue(e.isCancelled());
Mockito.verify(notifier).notify(Mockito.any(), Mockito.eq("protection.protected"));
Expand All @@ -222,22 +222,22 @@ public void testOnBucketFillAllowed() {
when(block.getRelative(Mockito.any())).thenReturn(block);
ItemStack item = mock(ItemStack.class);
when(item.getType()).thenReturn(Material.WATER_BUCKET);
PlayerBucketFillEvent e = new PlayerBucketFillEvent(player, block, block, BlockFace.UP, Material.WATER_BUCKET, item);
PlayerBucketFillEvent e = new PlayerBucketFillEvent(player, block, BlockFace.UP, Material.WATER_BUCKET, item);
l.onBucketFill(e);
assertFalse(e.isCancelled());

when(item.getType()).thenReturn(Material.BUCKET);
e = new PlayerBucketFillEvent(player, block, block, BlockFace.UP, Material.WATER_BUCKET, item);
e = new PlayerBucketFillEvent(player, block, BlockFace.UP, Material.WATER_BUCKET, item);
l.onBucketFill(e);
assertFalse(e.isCancelled());

when(item.getType()).thenReturn(Material.LAVA_BUCKET);
e = new PlayerBucketFillEvent(player, block, block, BlockFace.UP, Material.WATER_BUCKET, item);
e = new PlayerBucketFillEvent(player, block, BlockFace.UP, Material.WATER_BUCKET, item);
l.onBucketFill(e);
assertFalse(e.isCancelled());

when(item.getType()).thenReturn(Material.MILK_BUCKET);
e = new PlayerBucketFillEvent(player, block, block, BlockFace.UP, Material.WATER_BUCKET, item);
e = new PlayerBucketFillEvent(player, block, BlockFace.UP, Material.WATER_BUCKET, item);
l.onBucketFill(e);
assertFalse(e.isCancelled());
}
Expand All @@ -253,22 +253,22 @@ public void testOnBucketFillNotAllowed() {
when(block.getRelative(Mockito.any())).thenReturn(block);
ItemStack item = mock(ItemStack.class);
when(item.getType()).thenReturn(Material.WATER_BUCKET);
PlayerBucketFillEvent e = new PlayerBucketFillEvent(player, block, block, BlockFace.UP, Material.WATER_BUCKET, item);
PlayerBucketFillEvent e = new PlayerBucketFillEvent(player, block, BlockFace.UP, Material.WATER_BUCKET, item);
l.onBucketFill(e);
assertTrue(e.isCancelled());

when(item.getType()).thenReturn(Material.BUCKET);
e = new PlayerBucketFillEvent(player, block, block, BlockFace.UP, Material.WATER_BUCKET, item);
e = new PlayerBucketFillEvent(player, block, BlockFace.UP, Material.WATER_BUCKET, item);
l.onBucketFill(e);
assertTrue(e.isCancelled());

when(item.getType()).thenReturn(Material.LAVA_BUCKET);
e = new PlayerBucketFillEvent(player, block, block, BlockFace.UP, Material.WATER_BUCKET, item);
e = new PlayerBucketFillEvent(player, block, BlockFace.UP, Material.WATER_BUCKET, item);
l.onBucketFill(e);
assertTrue(e.isCancelled());

when(item.getType()).thenReturn(Material.MILK_BUCKET);
e = new PlayerBucketFillEvent(player, block, block, BlockFace.UP, Material.WATER_BUCKET, item);
e = new PlayerBucketFillEvent(player, block, BlockFace.UP, Material.WATER_BUCKET, item);
l.onBucketFill(e);
assertTrue(e.isCancelled());

Expand Down

0 comments on commit 46479b6

Please sign in to comment.