mirror of
https://github.com/BentoBoxWorld/Limits.git
synced 2025-02-19 13:51:36 +01:00
Fix tests and update API requirements
This commit is contained in:
parent
deda533db1
commit
52c12e2a7d
@ -6,6 +6,7 @@ import java.util.List;
|
||||
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 class Limits extends Addon {
|
||||
|
||||
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));
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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"]
|
||||
|
@ -38,9 +38,6 @@ import org.junit.After;
|
||||
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 @@ public class LimitsTest {
|
||||
* 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 class LimitsTest {
|
||||
* Test method for {@link world.bentobox.limits.Limits#getSettings()}.
|
||||
*/
|
||||
@Test
|
||||
@Ignore
|
||||
public void testGetSettings() {
|
||||
assertNull(addon.getSettings());
|
||||
addon.onEnable();
|
||||
@ -300,7 +295,6 @@ public class LimitsTest {
|
||||
* 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 class LimitsTest {
|
||||
* Test method for {@link world.bentobox.limits.Limits#getBlockLimitListener()}.
|
||||
*/
|
||||
@Test
|
||||
@Ignore
|
||||
public void testGetBlockLimitListener() {
|
||||
assertNull(addon.getBlockLimitListener());
|
||||
addon.onEnable();
|
||||
@ -322,7 +315,6 @@ public class LimitsTest {
|
||||
* 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 class LimitsTest {
|
||||
* 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 class LimitsTest {
|
||||
* 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 class LimitsTest {
|
||||
* 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 class LimitsTest {
|
||||
* Test method for {@link world.bentobox.limits.Limits#getJoinListener()}.
|
||||
*/
|
||||
@Test
|
||||
@Ignore
|
||||
public void testGetJoinListener() {
|
||||
assertNull(addon.getJoinListener());
|
||||
addon.onEnable();
|
||||
|
Loading…
Reference in New Issue
Block a user