diff --git a/src/main/java/world/bentobox/limits/Limits.java b/src/main/java/world/bentobox/limits/Limits.java index 84d1f85..94bc6e7 100644 --- a/src/main/java/world/bentobox/limits/Limits.java +++ b/src/main/java/world/bentobox/limits/Limits.java @@ -6,6 +6,7 @@ import java.util.stream.Collectors; import org.bukkit.Material; +import org.bukkit.Registry; import org.bukkit.World; import org.bukkit.entity.EntityType; import org.eclipse.jdt.annotation.Nullable; @@ -137,7 +138,7 @@ public JoinListener getJoinListener() { private void registerPlaceholders(GameModeAddon gm) { if (getPlugin().getPlaceholdersManager() == null) return; - Arrays.stream(Material.values()) + Registry.MATERIAL.stream() .filter(Material::isBlock) .forEach(m -> registerCountAndLimitPlaceholders(m, gm)); diff --git a/src/main/resources/addon.yml b/src/main/resources/addon.yml index ac388a0..9689b58 100755 --- a/src/main/resources/addon.yml +++ b/src/main/resources/addon.yml @@ -1,7 +1,7 @@ name: Limits main: world.bentobox.limits.Limits version: ${version}${build.number} -api-version: 2.3.0 +api-version: 2.7.1 authors: tastybento diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml index 6f9c056..188ba57 100644 --- a/src/main/resources/plugin.yml +++ b/src/main/resources/plugin.yml @@ -1,7 +1,7 @@ name: BentoBox-Limits main: world.bentobox.limits.LimitsPladdon version: ${project.version}${build.number} -api-version: "1.19" +api-version: "1.21" authors: [tastybento] contributors: ["The BentoBoxWorld Community"] diff --git a/src/test/java/world/bentobox/limits/LimitsTest.java b/src/test/java/world/bentobox/limits/LimitsTest.java index 55186e0..30837b7 100644 --- a/src/test/java/world/bentobox/limits/LimitsTest.java +++ b/src/test/java/world/bentobox/limits/LimitsTest.java @@ -38,9 +38,6 @@ import org.junit.AfterClass; import org.junit.Before; import org.junit.BeforeClass; -import org.junit.Ignore; -import org.junit.Ignore; -import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.Mock; @@ -268,7 +265,6 @@ private static void deleteAll(File file) throws IOException { * Test method for {@link world.bentobox.limits.Limits#onEnable()}. */ @Test - @Ignore public void testOnEnable() { addon.onEnable(); File f = new File("config.yml"); @@ -288,7 +284,6 @@ public void testOnDisable() { * Test method for {@link world.bentobox.limits.Limits#getSettings()}. */ @Test - @Ignore public void testGetSettings() { assertNull(addon.getSettings()); addon.onEnable(); @@ -300,7 +295,6 @@ public void testGetSettings() { * Test method for {@link world.bentobox.limits.Limits#getGameModes()}. */ @Test - @Ignore public void testGetGameModes() { assertTrue(addon.getGameModes().isEmpty()); addon.onEnable(); @@ -311,7 +305,6 @@ public void testGetGameModes() { * Test method for {@link world.bentobox.limits.Limits#getBlockLimitListener()}. */ @Test - @Ignore public void testGetBlockLimitListener() { assertNull(addon.getBlockLimitListener()); addon.onEnable(); @@ -322,7 +315,6 @@ public void testGetBlockLimitListener() { * Test method for {@link world.bentobox.limits.Limits#inGameModeWorld(org.bukkit.World)}. */ @Test - @Ignore public void testInGameModeWorld() { addon.onEnable(); assertFalse(addon.inGameModeWorld(world)); @@ -334,7 +326,6 @@ public void testInGameModeWorld() { * Test method for {@link world.bentobox.limits.Limits#getGameModeName(org.bukkit.World)}. */ @Test - @Ignore public void testGetGameModeName() { when(gameMode.inWorld(world)).thenReturn(true); assertTrue(addon.getGameModeName(world).isEmpty()); @@ -346,7 +337,6 @@ public void testGetGameModeName() { * Test method for {@link world.bentobox.limits.Limits#getGameModePermPrefix(org.bukkit.World)}. */ @Test - @Ignore public void testGetGameModePermPrefix() { when(gameMode.inWorld(world)).thenReturn(true); addon.onEnable(); @@ -357,7 +347,6 @@ public void testGetGameModePermPrefix() { * Test method for {@link world.bentobox.limits.Limits#isCoveredGameMode(java.lang.String)}. */ @Test - @Ignore public void testIsCoveredGameMode() { assertFalse(addon.isCoveredGameMode("BSkyBlock")); addon.onEnable(); @@ -368,7 +357,6 @@ public void testIsCoveredGameMode() { * Test method for {@link world.bentobox.limits.Limits#getJoinListener()}. */ @Test - @Ignore public void testGetJoinListener() { assertNull(addon.getJoinListener()); addon.onEnable();