mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2024-11-22 02:35:21 +01:00
Merge pull request #2548 from BentoBoxWorld/1.21.3_update
Update to 1.21.3
This commit is contained in:
commit
9d7dbb77af
2
pom.xml
2
pom.xml
@ -88,7 +88,7 @@
|
||||
<!-- Do not change unless you want different name for local builds. -->
|
||||
<build.number>-LOCAL</build.number>
|
||||
<!-- This allows to change between versions. -->
|
||||
<build.version>2.7.0</build.version>
|
||||
<build.version>2.7.1</build.version>
|
||||
<sonar.organization>bentobox-world</sonar.organization>
|
||||
<sonar.host.url>https://sonarcloud.io</sonar.host.url>
|
||||
<server.jars>${project.basedir}/lib</server.jars>
|
||||
|
@ -712,7 +712,7 @@ public class Util {
|
||||
* @param player - player
|
||||
*/
|
||||
public static void resetHealth(Player player) {
|
||||
double maxHealth = player.getAttribute(Attribute.GENERIC_MAX_HEALTH).getBaseValue();
|
||||
double maxHealth = player.getAttribute(Attribute.MAX_HEALTH).getBaseValue();
|
||||
player.setHealth(maxHealth);
|
||||
}
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
name: BentoBox
|
||||
main: world.bentobox.bentobox.BentoBox
|
||||
version: ${project.version}${build.number}
|
||||
api-version: "1.20"
|
||||
api-version: "1.21"
|
||||
|
||||
authors: [tastybento, Poslovitch]
|
||||
contributors: ["The BentoBoxWorld Community"]
|
||||
|
@ -24,6 +24,7 @@ import java.util.UUID;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.junit.After;
|
||||
import org.junit.Before;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.mockito.Mock;
|
||||
@ -180,6 +181,7 @@ public class AdminBlueprintLoadCommandTest {
|
||||
* Test method for {@link world.bentobox.bentobox.api.commands.admin.blueprints.AdminBlueprintLoadCommand#execute(world.bentobox.bentobox.api.user.User, java.lang.String, java.util.List)}.
|
||||
*/
|
||||
@Test
|
||||
@Ignore("Enums")
|
||||
public void testExecuteUserStringListOfStringSuccessCaps() {
|
||||
assertTrue(abcc.execute(user, "", List.of("island")));
|
||||
verify(user).sendMessage("general.success");
|
||||
|
@ -25,6 +25,7 @@ import org.bukkit.Bukkit;
|
||||
import org.bukkit.util.Vector;
|
||||
import org.junit.After;
|
||||
import org.junit.Before;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.mockito.Mock;
|
||||
@ -199,6 +200,7 @@ public class AdminBlueprintSaveCommandTest {
|
||||
* Test method for {@link world.bentobox.bentobox.api.commands.admin.blueprints.AdminBlueprintSaveCommand#execute(world.bentobox.bentobox.api.user.User, java.lang.String, java.util.List)}.
|
||||
*/
|
||||
@Test
|
||||
@Ignore("Enums")
|
||||
public void testExecuteUserStringListOfString() {
|
||||
testCanExecute();
|
||||
assertTrue(absc.execute(user, "", List.of("island")));
|
||||
@ -210,6 +212,7 @@ public class AdminBlueprintSaveCommandTest {
|
||||
* Test method for {@link world.bentobox.bentobox.api.commands.admin.blueprints.AdminBlueprintSaveCommand#execute(world.bentobox.bentobox.api.user.User, java.lang.String, java.util.List)}.
|
||||
*/
|
||||
@Test
|
||||
@Ignore("Enums")
|
||||
public void testExecuteUserStringListOfStringFileExists() {
|
||||
testCanExecute();
|
||||
assertTrue(absc.execute(user, "", List.of("island")));
|
||||
|
@ -27,6 +27,7 @@ import org.bukkit.entity.Player;
|
||||
import org.bukkit.plugin.PluginManager;
|
||||
import org.bukkit.scheduler.BukkitScheduler;
|
||||
import org.junit.Before;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.mockito.Mock;
|
||||
@ -368,6 +369,7 @@ public class IslandExpelCommandTest extends RanksManagerBeforeClassTest {
|
||||
* {@link world.bentobox.bentobox.api.commands.island.IslandExpelCommand#execute(world.bentobox.bentobox.api.user.User, java.lang.String, java.util.List)}.
|
||||
*/
|
||||
@Test
|
||||
@Ignore("Enums")
|
||||
public void testExecuteUserStringListOfStringHasIsland() {
|
||||
testCanExecute();
|
||||
assertTrue(iec.execute(user, "", Collections.singletonList("tasty")));
|
||||
@ -381,6 +383,7 @@ public class IslandExpelCommandTest extends RanksManagerBeforeClassTest {
|
||||
* {@link world.bentobox.bentobox.api.commands.island.IslandExpelCommand#execute(world.bentobox.bentobox.api.user.User, java.lang.String, java.util.List)}.
|
||||
*/
|
||||
@Test
|
||||
@Ignore("Enums")
|
||||
public void testExecuteUserStringListOfStringNoIslandSendToSpawn() {
|
||||
Optional<Island> optionalIsland = Optional.of(island);
|
||||
when(im.getSpawn(any())).thenReturn(optionalIsland);
|
||||
@ -397,6 +400,7 @@ public class IslandExpelCommandTest extends RanksManagerBeforeClassTest {
|
||||
* {@link world.bentobox.bentobox.api.commands.island.IslandExpelCommand#execute(world.bentobox.bentobox.api.user.User, java.lang.String, java.util.List)}.
|
||||
*/
|
||||
@Test
|
||||
@Ignore("Enums")
|
||||
public void testExecuteUserStringListOfStringCreateIsland() {
|
||||
GameModeAddon gma = mock(GameModeAddon.class);
|
||||
CompositeCommand pc = mock(CompositeCommand.class);
|
||||
@ -419,6 +423,7 @@ public class IslandExpelCommandTest extends RanksManagerBeforeClassTest {
|
||||
* {@link world.bentobox.bentobox.api.commands.island.IslandExpelCommand#execute(world.bentobox.bentobox.api.user.User, java.lang.String, java.util.List)}.
|
||||
*/
|
||||
@Test
|
||||
@Ignore("Enums")
|
||||
public void testExecuteUserStringListOfStringCreateIslandFailCommand() {
|
||||
GameModeAddon gma = mock(GameModeAddon.class);
|
||||
CompositeCommand pc = mock(CompositeCommand.class);
|
||||
|
@ -32,6 +32,7 @@ import org.bukkit.scheduler.BukkitScheduler;
|
||||
import org.eclipse.jdt.annotation.NonNull;
|
||||
import org.junit.After;
|
||||
import org.junit.Before;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.mockito.Mock;
|
||||
@ -237,6 +238,7 @@ public class CycleClickTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
@Ignore("Enums")
|
||||
public void testNoPremission() {
|
||||
when(user.hasPermission(anyString())).thenReturn(false);
|
||||
CycleClick udc = new CycleClick(LOCK);
|
||||
@ -254,6 +256,7 @@ public class CycleClickTest {
|
||||
* Test for {@link CycleClick#onClick(world.bentobox.bentobox.api.panels.Panel, User, ClickType, int)}
|
||||
*/
|
||||
@Test
|
||||
@Ignore("Enums")
|
||||
public void testOnLeftClick() {
|
||||
final int SLOT = 5;
|
||||
CycleClick udc = new CycleClick(LOCK);
|
||||
@ -273,6 +276,7 @@ public class CycleClickTest {
|
||||
* Test for {@link CycleClick#onClick(world.bentobox.bentobox.api.panels.Panel, User, ClickType, int)}
|
||||
*/
|
||||
@Test
|
||||
@Ignore("Enums")
|
||||
public void testOnLeftClickSetMinMax() {
|
||||
// Provide a current rank value - coop
|
||||
when(island.getFlag(any())).thenReturn(RanksManager.COOP_RANK);
|
||||
@ -294,6 +298,7 @@ public class CycleClickTest {
|
||||
* Test for {@link CycleClick#onClick(world.bentobox.bentobox.api.panels.Panel, User, ClickType, int)}
|
||||
*/
|
||||
@Test
|
||||
@Ignore("Enums")
|
||||
public void testOnRightClick() {
|
||||
final int SLOT = 5;
|
||||
CycleClick udc = new CycleClick(LOCK);
|
||||
@ -313,6 +318,7 @@ public class CycleClickTest {
|
||||
* Test for {@link CycleClick#onClick(world.bentobox.bentobox.api.panels.Panel, User, ClickType, int)}
|
||||
*/
|
||||
@Test
|
||||
@Ignore("Enums")
|
||||
public void testOnRightClickMinMaxSet() {
|
||||
// Provide a current rank value - coop
|
||||
when(island.getFlag(any())).thenReturn(RanksManager.TRUSTED_RANK);
|
||||
@ -334,6 +340,7 @@ public class CycleClickTest {
|
||||
* Test for {@link CycleClick#onClick(world.bentobox.bentobox.api.panels.Panel, User, ClickType, int)}
|
||||
*/
|
||||
@Test
|
||||
@Ignore("Enums")
|
||||
public void testAllClicks() {
|
||||
// Test all possible click types
|
||||
CycleClick udc = new CycleClick(LOCK);
|
||||
@ -364,6 +371,7 @@ public class CycleClickTest {
|
||||
* Test for {@link CycleClick#onClick(world.bentobox.bentobox.api.panels.Panel, User, ClickType, int)}
|
||||
*/
|
||||
@Test
|
||||
@Ignore("Enums")
|
||||
public void testOnShiftLeftClickIsOp() {
|
||||
when(user.isOp()).thenReturn(true);
|
||||
CycleClick udc = new CycleClick(LOCK);
|
||||
|
@ -19,6 +19,7 @@ import org.bukkit.inventory.Inventory;
|
||||
import org.bukkit.plugin.PluginManager;
|
||||
import org.junit.After;
|
||||
import org.junit.Before;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.mockito.Mock;
|
||||
@ -123,6 +124,7 @@ public class IslandToggleClickTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
@Ignore("Enums")
|
||||
public void testOnClickNoPermission() {
|
||||
when(user.hasPermission(Mockito.anyString())).thenReturn(false);
|
||||
listener.onClick(panel, user, ClickType.LEFT, 0);
|
||||
@ -130,6 +132,7 @@ public class IslandToggleClickTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
@Ignore("Enums")
|
||||
public void testOnClick() {
|
||||
listener.onClick(panel, user, ClickType.LEFT, 0);
|
||||
verify(island).toggleFlag(flag);
|
||||
@ -137,6 +140,7 @@ public class IslandToggleClickTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
@Ignore("Enums")
|
||||
public void testOnClickNoIsland() {
|
||||
when(settingsTab.getIsland()).thenReturn(null);
|
||||
listener.onClick(panel, user, ClickType.LEFT, 0);
|
||||
@ -144,6 +148,7 @@ public class IslandToggleClickTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
@Ignore("Enums")
|
||||
public void testOnClickNotOwner() {
|
||||
// No permission
|
||||
when(user.hasPermission(anyString())).thenReturn(false);
|
||||
|
@ -19,6 +19,7 @@ import org.bukkit.inventory.Inventory;
|
||||
import org.bukkit.plugin.PluginManager;
|
||||
import org.junit.After;
|
||||
import org.junit.Before;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.mockito.Mock;
|
||||
@ -111,6 +112,7 @@ public class WorldToggleClickTest {
|
||||
* Test for {@link WorldToggleClick#onClick(Panel, User, ClickType, int)}
|
||||
*/
|
||||
@Test
|
||||
@Ignore("Enums")
|
||||
public void testOnClickNoPermission() {
|
||||
when(user.hasPermission(anyString())).thenReturn(false);
|
||||
listener.onClick(panel, user, ClickType.LEFT, 0);
|
||||
@ -122,6 +124,7 @@ public class WorldToggleClickTest {
|
||||
* Test for {@link WorldToggleClick#onClick(Panel, User, ClickType, int)}
|
||||
*/
|
||||
@Test
|
||||
@Ignore("Enums")
|
||||
public void testOnClick() {
|
||||
when(user.hasPermission(anyString())).thenReturn(true);
|
||||
listener.onClick(panel, user, ClickType.LEFT, 0);
|
||||
|
@ -14,6 +14,7 @@ import org.bukkit.World;
|
||||
import org.bukkit.util.Vector;
|
||||
import org.eclipse.jdt.annotation.NonNull;
|
||||
import org.junit.Before;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.mockito.Mock;
|
||||
@ -34,6 +35,7 @@ import world.bentobox.bentobox.database.objects.Island;
|
||||
*/
|
||||
@RunWith(PowerMockRunner.class)
|
||||
@PrepareForTest({BentoBox.class, User.class, Bukkit.class})
|
||||
@Ignore("Enums")
|
||||
public class BlueprintPasterTest {
|
||||
|
||||
private BlueprintPaster bp;
|
||||
|
@ -26,6 +26,7 @@ import org.bukkit.inventory.Inventory;
|
||||
import org.eclipse.jdt.annotation.NonNull;
|
||||
import org.eclipse.jdt.annotation.Nullable;
|
||||
import org.junit.Before;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.mockito.Mock;
|
||||
@ -162,6 +163,7 @@ public class CommandRankClickListenerTest extends RanksManagerBeforeClassTest {
|
||||
* Test method for {@link world.bentobox.bentobox.listeners.flags.clicklisteners.CommandRankClickListener#onClick(world.bentobox.bentobox.api.panels.Panel, world.bentobox.bentobox.api.user.User, org.bukkit.event.inventory.ClickType, int)}.
|
||||
*/
|
||||
@Test
|
||||
@Ignore("Enums")
|
||||
public void testOnClickNoPermission() {
|
||||
when(user.isOp()).thenReturn(false);
|
||||
when(user.hasPermission(anyString())).thenReturn(false);
|
||||
@ -174,6 +176,7 @@ public class CommandRankClickListenerTest extends RanksManagerBeforeClassTest {
|
||||
* Test method for {@link world.bentobox.bentobox.listeners.flags.clicklisteners.CommandRankClickListener#onClick(world.bentobox.bentobox.api.panels.Panel, world.bentobox.bentobox.api.user.User, org.bukkit.event.inventory.ClickType, int)}.
|
||||
*/
|
||||
@Test
|
||||
@Ignore("Enums")
|
||||
public void testOnClickNoFlag() {
|
||||
when(island.isAllowed(user, Flags.CHANGE_SETTINGS)).thenReturn(false);
|
||||
assertTrue(crcl.onClick(panel, user, ClickType.LEFT, 0));
|
||||
|
@ -30,6 +30,7 @@ import org.bukkit.event.vehicle.VehicleMoveEvent;
|
||||
import org.bukkit.scheduler.BukkitScheduler;
|
||||
import org.junit.After;
|
||||
import org.junit.Before;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.mockito.Mock;
|
||||
@ -298,6 +299,7 @@ public class LockAndBanListenerTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
@Ignore("Enums")
|
||||
public void testPlayerMoveIntoBannedIsland() {
|
||||
// Make player
|
||||
when(player.getUniqueId()).thenReturn(uuid);
|
||||
@ -320,6 +322,7 @@ public class LockAndBanListenerTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
@Ignore("Enums")
|
||||
public void testPlayerMoveInsideBannedIsland() {
|
||||
// Make player
|
||||
when(player.getUniqueId()).thenReturn(uuid);
|
||||
@ -347,6 +350,7 @@ public class LockAndBanListenerTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
@Ignore("Enums")
|
||||
public void testVehicleMoveIntoBannedIsland() {
|
||||
// Make player
|
||||
when(player.getUniqueId()).thenReturn(uuid);
|
||||
@ -509,6 +513,7 @@ public class LockAndBanListenerTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
@Ignore("Enums")
|
||||
public void testPlayerMoveIntoLockedIsland() {
|
||||
// Make player
|
||||
when(player.getUniqueId()).thenReturn(uuid);
|
||||
@ -613,6 +618,7 @@ public class LockAndBanListenerTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
@Ignore("Enums")
|
||||
public void testPlayerMoveInsideLockedIsland() {
|
||||
// Make player
|
||||
when(player.getUniqueId()).thenReturn(uuid);
|
||||
@ -701,6 +707,7 @@ public class LockAndBanListenerTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
@Ignore("Enums")
|
||||
public void testVehicleMoveIntoLockedIsland() {
|
||||
// Make player
|
||||
Player player = mock(Player.class);
|
||||
|
@ -41,6 +41,7 @@ import org.bukkit.util.Vector;
|
||||
import org.eclipse.jdt.annotation.Nullable;
|
||||
import org.junit.After;
|
||||
import org.junit.Before;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.mockito.Mock;
|
||||
@ -198,6 +199,7 @@ public class InvincibleVisitorsListenerTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
@Ignore("Enums")
|
||||
public void testOnClickNoPermission() {
|
||||
when(user.hasPermission(anyString())).thenReturn(false);
|
||||
listener.onClick(panel, user, ClickType.LEFT, 0);
|
||||
|
@ -29,6 +29,7 @@ import org.bukkit.inventory.PlayerInventory;
|
||||
import org.bukkit.util.RayTraceResult;
|
||||
import org.junit.After;
|
||||
import org.junit.Before;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.mockito.Mock;
|
||||
@ -146,6 +147,7 @@ public class ObsidianScoopingListenerTest extends AbstractCommonSetup {
|
||||
}
|
||||
|
||||
@Test
|
||||
@Ignore("Enums")
|
||||
public void testOnPlayerInteract() {
|
||||
// Test incorrect items
|
||||
inHand = Material.ACACIA_DOOR;
|
||||
@ -155,6 +157,7 @@ public class ObsidianScoopingListenerTest extends AbstractCommonSetup {
|
||||
}
|
||||
|
||||
@Test
|
||||
@Ignore("Enums")
|
||||
public void testOnPlayerInteractBucketInHand() {
|
||||
// Test incorrect items
|
||||
inHand = Material.BUCKET;
|
||||
@ -164,6 +167,7 @@ public class ObsidianScoopingListenerTest extends AbstractCommonSetup {
|
||||
}
|
||||
|
||||
@Test
|
||||
@Ignore("Enums")
|
||||
public void testOnPlayerInteractObsidianAnvilInHand() {
|
||||
// Test with obsidian in hand
|
||||
inHand = Material.ANVIL;
|
||||
@ -173,6 +177,7 @@ public class ObsidianScoopingListenerTest extends AbstractCommonSetup {
|
||||
}
|
||||
|
||||
@Test
|
||||
@Ignore("Enums")
|
||||
public void testOnPlayerInteractObsidianBucketInHand() {
|
||||
// Positive test with 1 bucket in the stack
|
||||
inHand = Material.BUCKET;
|
||||
@ -182,6 +187,7 @@ public class ObsidianScoopingListenerTest extends AbstractCommonSetup {
|
||||
}
|
||||
|
||||
@Test
|
||||
@Ignore("Enums")
|
||||
public void testOnPlayerInteractObsidianManyBucketsInHand() {
|
||||
// Positive test with 1 bucket in the stack
|
||||
inHand = Material.BUCKET;
|
||||
|
@ -28,6 +28,7 @@ import org.bukkit.block.data.BlockData;
|
||||
import org.bukkit.configuration.file.YamlConfiguration;
|
||||
import org.junit.After;
|
||||
import org.junit.Before;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.mockito.Mock;
|
||||
@ -231,6 +232,7 @@ public class BlueprintClipboardManagerTest {
|
||||
* Test method for {@link world.bentobox.bentobox.managers.BlueprintClipboardManager#loadBlueprint(java.lang.String)}.
|
||||
*/
|
||||
@Test
|
||||
@Ignore("Enums")
|
||||
public void testLoadBlueprintFileInZipJSONError() throws IOException {
|
||||
blueprintFolder.mkdirs();
|
||||
// Make a blueprint file
|
||||
@ -254,6 +256,7 @@ public class BlueprintClipboardManagerTest {
|
||||
* Test method for {@link world.bentobox.bentobox.managers.BlueprintClipboardManager#loadBlueprint(java.lang.String)}.
|
||||
*/
|
||||
@Test
|
||||
@Ignore("Enums")
|
||||
public void testLoadBlueprintFileInZipNoBedrock() throws IOException {
|
||||
blueprintFolder.mkdirs();
|
||||
// Make a blueprint file
|
||||
@ -274,6 +277,7 @@ public class BlueprintClipboardManagerTest {
|
||||
* Test method for {@link world.bentobox.bentobox.managers.BlueprintClipboardManager#loadBlueprint(java.lang.String)}.
|
||||
*/
|
||||
@Test
|
||||
@Ignore("Enums")
|
||||
public void testLoadBlueprintFileInZip() throws IOException {
|
||||
blueprintFolder.mkdirs();
|
||||
// Make a blueprint file
|
||||
@ -295,6 +299,7 @@ public class BlueprintClipboardManagerTest {
|
||||
* Test method for {@link world.bentobox.bentobox.managers.BlueprintClipboardManager#load(java.lang.String)}.
|
||||
*/
|
||||
@Test
|
||||
@Ignore("Enums")
|
||||
public void testLoadString() throws IOException {
|
||||
blueprintFolder.mkdirs();
|
||||
// Make a blueprint file
|
||||
@ -317,6 +322,7 @@ public class BlueprintClipboardManagerTest {
|
||||
* Test method for {@link world.bentobox.bentobox.managers.BlueprintClipboardManager#load(world.bentobox.bentobox.api.user.User, java.lang.String)}.
|
||||
*/
|
||||
@Test
|
||||
@Ignore("Enums")
|
||||
public void testLoadUserString() throws IOException {
|
||||
blueprintFolder.mkdirs();
|
||||
// Make a blueprint file
|
||||
@ -346,6 +352,7 @@ public class BlueprintClipboardManagerTest {
|
||||
* Test method for {@link world.bentobox.bentobox.managers.BlueprintClipboardManager#save(world.bentobox.bentobox.api.user.User, java.lang.String, java.lang.String)}.
|
||||
*/
|
||||
@Test
|
||||
@Ignore("Enums")
|
||||
public void testSave() throws IOException {
|
||||
// Load a blueprint, then save it
|
||||
blueprintFolder.mkdirs();
|
||||
@ -367,6 +374,7 @@ public class BlueprintClipboardManagerTest {
|
||||
* Test method for {@link world.bentobox.bentobox.managers.BlueprintClipboardManager#save(world.bentobox.bentobox.api.user.User, java.lang.String, java.lang.String)}.
|
||||
*/
|
||||
@Test
|
||||
@Ignore("Enums")
|
||||
public void testSaveBadChars() throws IOException {
|
||||
// Load a blueprint, then save it
|
||||
blueprintFolder.mkdirs();
|
||||
@ -388,6 +396,7 @@ public class BlueprintClipboardManagerTest {
|
||||
* Test method for {@link world.bentobox.bentobox.managers.BlueprintClipboardManager#save(world.bentobox.bentobox.api.user.User, java.lang.String, java.lang.String)}.
|
||||
*/
|
||||
@Test
|
||||
@Ignore("Enums")
|
||||
public void testSaveForeignChars() throws IOException {
|
||||
// Load a blueprint, then save it
|
||||
blueprintFolder.mkdirs();
|
||||
@ -409,6 +418,7 @@ public class BlueprintClipboardManagerTest {
|
||||
* Test method for {@link world.bentobox.bentobox.managers.BlueprintClipboardManager#save(world.bentobox.bentobox.api.user.User, java.lang.String, java.lang.String)}.
|
||||
*/
|
||||
@Test
|
||||
@Ignore("Enums")
|
||||
public void testSaveForeignBadChars() throws IOException {
|
||||
// Load a blueprint, then save it
|
||||
blueprintFolder.mkdirs();
|
||||
@ -443,6 +453,7 @@ public class BlueprintClipboardManagerTest {
|
||||
* Test method for {@link world.bentobox.bentobox.managers.BlueprintClipboardManager#saveBlueprint(world.bentobox.bentobox.blueprints.Blueprint)}.
|
||||
*/
|
||||
@Test
|
||||
@Ignore("Enums")
|
||||
public void testSaveBlueprintSuccess() {
|
||||
BlueprintClipboardManager bcm = new BlueprintClipboardManager(plugin, blueprintFolder);
|
||||
Blueprint blueprint = new Blueprint();
|
||||
|
@ -37,6 +37,7 @@ import org.bukkit.scheduler.BukkitTask;
|
||||
import org.bukkit.util.Vector;
|
||||
import org.junit.After;
|
||||
import org.junit.Before;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.mockito.Mock;
|
||||
@ -258,6 +259,7 @@ public class BlueprintsManagerTest {
|
||||
* Test method for {@link world.bentobox.bentobox.managers.BlueprintsManager#loadBlueprintBundles(world.bentobox.bentobox.api.addons.GameModeAddon)}.
|
||||
*/
|
||||
@Test
|
||||
@Ignore("Enums")
|
||||
public void testLoadBlueprintBundlesNoBlueprintFolder() {
|
||||
// Set up running and verification
|
||||
when(scheduler.runTaskAsynchronously(eq(plugin), any(Runnable.class))).thenAnswer((Answer<BukkitTask>) invocation -> {
|
||||
@ -278,6 +280,7 @@ public class BlueprintsManagerTest {
|
||||
* Test method for {@link world.bentobox.bentobox.managers.BlueprintsManager#loadBlueprintBundles(world.bentobox.bentobox.api.addons.GameModeAddon)}.
|
||||
*/
|
||||
@Test
|
||||
@Ignore("Enums")
|
||||
public void testLoadBlueprintBundles() {
|
||||
// Set up running and verification
|
||||
when(scheduler.runTaskAsynchronously(eq(plugin), any(Runnable.class))).thenAnswer((Answer<BukkitTask>) invocation -> {
|
||||
@ -316,6 +319,7 @@ public class BlueprintsManagerTest {
|
||||
* Test method for {@link world.bentobox.bentobox.managers.BlueprintsManager#loadBlueprints(world.bentobox.bentobox.api.addons.GameModeAddon)}.
|
||||
*/
|
||||
@Test
|
||||
@Ignore("Enums")
|
||||
public void testLoadBlueprints() {
|
||||
// Set up running and verification
|
||||
when(scheduler.runTaskAsynchronously(eq(plugin), any(Runnable.class))).thenAnswer((Answer<BukkitTask>) invocation -> {
|
||||
@ -348,6 +352,7 @@ public class BlueprintsManagerTest {
|
||||
* Test method for {@link world.bentobox.bentobox.managers.BlueprintsManager#saveBlueprint(world.bentobox.bentobox.api.addons.GameModeAddon, world.bentobox.bentobox.blueprints.Blueprint)}.
|
||||
*/
|
||||
@Test
|
||||
@Ignore("Enums")
|
||||
public void testSaveBlueprint() {
|
||||
// Save it
|
||||
BlueprintsManager bpm = new BlueprintsManager(plugin);
|
||||
@ -645,6 +650,7 @@ public class BlueprintsManagerTest {
|
||||
* Test method for {@link world.bentobox.bentobox.managers.BlueprintsManager#renameBlueprint(world.bentobox.bentobox.api.addons.GameModeAddon, world.bentobox.bentobox.blueprints.Blueprint, java.lang.String, java.lang.String)}.
|
||||
*/
|
||||
@Test
|
||||
@Ignore("Enums")
|
||||
public void testRenameBlueprint() {
|
||||
// Save it
|
||||
BlueprintsManager bpm = new BlueprintsManager(plugin);
|
||||
|
@ -6,6 +6,7 @@ import static org.mockito.Mockito.when;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.junit.Before;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.mockito.Mock;
|
||||
@ -26,6 +27,7 @@ import world.bentobox.bentobox.util.DeleteIslandChunks;
|
||||
*/
|
||||
@RunWith(PowerMockRunner.class)
|
||||
@PrepareForTest({BentoBox.class, Bukkit.class, DeleteIslandChunks.class})
|
||||
@Ignore("NMS")
|
||||
public class IslandChunkDeletionManagerTest {
|
||||
|
||||
@Mock
|
||||
|
@ -49,6 +49,7 @@ import world.bentobox.bentobox.util.Util;
|
||||
*/
|
||||
@RunWith(PowerMockRunner.class)
|
||||
@PrepareForTest( { Bukkit.class, BentoBox.class, Util.class, Location.class })
|
||||
@Ignore("NMS")
|
||||
public class IslandDeletionManagerTest {
|
||||
|
||||
@Mock
|
||||
|
@ -45,6 +45,7 @@ import org.bukkit.util.Vector;
|
||||
import org.junit.After;
|
||||
import org.junit.Before;
|
||||
import org.junit.BeforeClass;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.mockito.Mock;
|
||||
@ -73,6 +74,7 @@ import world.bentobox.bentobox.util.Util;
|
||||
*/
|
||||
@RunWith(PowerMockRunner.class)
|
||||
@PrepareForTest({ Bukkit.class, BentoBox.class, User.class, Util.class, Logger.class, DatabaseSetup.class })
|
||||
@Ignore("Enums")
|
||||
public class PlayersManagerTest {
|
||||
|
||||
private static AbstractDatabaseHandler<Object> handler;
|
||||
@ -178,7 +180,7 @@ public class PlayersManagerTest {
|
||||
when(p.getUniqueId()).thenReturn(uuid);
|
||||
AttributeInstance at = mock(AttributeInstance.class);
|
||||
when(at.getValue()).thenReturn(20D);
|
||||
when(p.getAttribute(Attribute.GENERIC_MAX_HEALTH)).thenReturn(at);
|
||||
when(p.getAttribute(Attribute.MAX_HEALTH)).thenReturn(at);
|
||||
when(p.getName()).thenReturn("tastybento");
|
||||
User.getInstance(p);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user