diff --git a/src/test/java/world/bentobox/challenges/commands/ChallengesCommandTest.java b/src/test/java/world/bentobox/challenges/commands/ChallengesCommandTest.java index acec9fb..9c1b9c1 100644 --- a/src/test/java/world/bentobox/challenges/commands/ChallengesCommandTest.java +++ b/src/test/java/world/bentobox/challenges/commands/ChallengesCommandTest.java @@ -37,6 +37,7 @@ import org.powermock.reflect.Whitebox; import world.bentobox.bentobox.BentoBox; import world.bentobox.bentobox.api.addons.GameModeAddon; import world.bentobox.bentobox.api.commands.CompositeCommand; +import world.bentobox.bentobox.api.configuration.WorldSettings; import world.bentobox.bentobox.api.localization.TextVariables; import world.bentobox.bentobox.api.user.User; import world.bentobox.bentobox.database.objects.Island; @@ -107,6 +108,10 @@ public class ChallengesCommandTest { Optional optionalAddon = Optional.of(gameModeAddon); when(iwm.getAddon(any())).thenReturn(optionalAddon); when(plugin.getIWM()).thenReturn(iwm); + + @NonNull + WorldSettings ws = new TestWorldSetting(); + when(iwm.getWorldSettings(any())).thenReturn(ws); // Game Mode Addon @NonNull diff --git a/src/test/java/world/bentobox/challenges/commands/TestWorldSetting.java b/src/test/java/world/bentobox/challenges/commands/TestWorldSetting.java new file mode 100644 index 0000000..264bb92 --- /dev/null +++ b/src/test/java/world/bentobox/challenges/commands/TestWorldSetting.java @@ -0,0 +1,404 @@ +package world.bentobox.challenges.commands; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import org.bukkit.Difficulty; +import org.bukkit.GameMode; +import org.bukkit.entity.EntityType; +import org.eclipse.jdt.annotation.NonNull; + +import world.bentobox.bentobox.api.configuration.WorldSettings; +import world.bentobox.bentobox.api.flags.Flag; + +public class TestWorldSetting implements WorldSettings { + + private Map flags = new HashMap<>(); + + @Override + public GameMode getDefaultGameMode() { + // TODO Auto-generated method stub + return null; + } + + @Override + public Map getDefaultIslandFlags() { + // TODO Auto-generated method stub + return null; + } + + @Override + public Map getDefaultIslandSettings() { + // TODO Auto-generated method stub + return null; + } + + @Override + public Difficulty getDifficulty() { + // TODO Auto-generated method stub + return null; + } + + @Override + public void setDifficulty(Difficulty difficulty) { + // TODO Auto-generated method stub + + } + + @Override + public String getFriendlyName() { + // TODO Auto-generated method stub + return null; + } + + @Override + public int getIslandDistance() { + // TODO Auto-generated method stub + return 0; + } + + @Override + public int getIslandHeight() { + // TODO Auto-generated method stub + return 0; + } + + @Override + public int getIslandProtectionRange() { + // TODO Auto-generated method stub + return 0; + } + + @Override + public int getIslandStartX() { + // TODO Auto-generated method stub + return 0; + } + + @Override + public int getIslandStartZ() { + // TODO Auto-generated method stub + return 0; + } + + @Override + public int getIslandXOffset() { + // TODO Auto-generated method stub + return 0; + } + + @Override + public int getIslandZOffset() { + // TODO Auto-generated method stub + return 0; + } + + @Override + public List getIvSettings() { + // TODO Auto-generated method stub + return null; + } + + @Override + public int getMaxHomes() { + // TODO Auto-generated method stub + return 0; + } + + @Override + public int getMaxIslands() { + // TODO Auto-generated method stub + return 0; + } + + @Override + public int getMaxTeamSize() { + // TODO Auto-generated method stub + return 0; + } + + @Override + public int getNetherSpawnRadius() { + // TODO Auto-generated method stub + return 0; + } + + @Override + public String getPermissionPrefix() { + // TODO Auto-generated method stub + return null; + } + + @Override + public Set getRemoveMobsWhitelist() { + // TODO Auto-generated method stub + return null; + } + + @Override + public int getSeaHeight() { + // TODO Auto-generated method stub + return 0; + } + + @Override + public List getHiddenFlags() { + // TODO Auto-generated method stub + return null; + } + + @Override + public List getVisitorBannedCommands() { + // TODO Auto-generated method stub + return null; + } + + @Override + public Map getWorldFlags() { + // TODO Auto-generated method stub + return flags ; + } + + @Override + public String getWorldName() { + // TODO Auto-generated method stub + return null; + } + + @Override + public boolean isDragonSpawn() { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean isEndGenerate() { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean isEndIslands() { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean isNetherGenerate() { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean isNetherIslands() { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean isOnJoinResetEnderChest() { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean isOnJoinResetInventory() { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean isOnJoinResetMoney() { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean isOnJoinResetHealth() { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean isOnJoinResetHunger() { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean isOnJoinResetXP() { + // TODO Auto-generated method stub + return false; + } + + @Override + public @NonNull List getOnJoinCommands() { + // TODO Auto-generated method stub + return null; + } + + @Override + public boolean isOnLeaveResetEnderChest() { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean isOnLeaveResetInventory() { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean isOnLeaveResetMoney() { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean isOnLeaveResetHealth() { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean isOnLeaveResetHunger() { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean isOnLeaveResetXP() { + // TODO Auto-generated method stub + return false; + } + + @Override + public @NonNull List getOnLeaveCommands() { + // TODO Auto-generated method stub + return null; + } + + @Override + public boolean isUseOwnGenerator() { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean isWaterUnsafe() { + // TODO Auto-generated method stub + return false; + } + + @Override + public List getGeoLimitSettings() { + // TODO Auto-generated method stub + return null; + } + + @Override + public int getResetLimit() { + // TODO Auto-generated method stub + return 0; + } + + @Override + public long getResetEpoch() { + // TODO Auto-generated method stub + return 0; + } + + @Override + public void setResetEpoch(long timestamp) { + // TODO Auto-generated method stub + + } + + @Override + public boolean isTeamJoinDeathReset() { + // TODO Auto-generated method stub + return false; + } + + @Override + public int getDeathsMax() { + // TODO Auto-generated method stub + return 0; + } + + @Override + public boolean isDeathsCounted() { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean isDeathsResetOnNewIsland() { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean isAllowSetHomeInNether() { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean isAllowSetHomeInTheEnd() { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean isRequireConfirmationToSetHomeInNether() { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean isRequireConfirmationToSetHomeInTheEnd() { + // TODO Auto-generated method stub + return false; + } + + @Override + public int getBanLimit() { + // TODO Auto-generated method stub + return 0; + } + + @Override + public boolean isLeaversLoseReset() { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean isKickedKeepInventory() { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean isCreateIslandOnFirstLoginEnabled() { + // TODO Auto-generated method stub + return false; + } + + @Override + public int getCreateIslandOnFirstLoginDelay() { + // TODO Auto-generated method stub + return 0; + } + + @Override + public boolean isCreateIslandOnFirstLoginAbortOnLogout() { + // TODO Auto-generated method stub + return false; + } + +}