diff --git a/pom.xml b/pom.xml index cbb1c28e..7159fe0a 100644 --- a/pom.xml +++ b/pom.xml @@ -180,7 +180,7 @@ org.bukkit bukkit - 1.1-R3 + 1.1-R5-SNAPSHOT jar compile diff --git a/src/main/java/com/onarandombox/MultiverseCore/configuration/MVConfigMigrator.java b/src/main/java/com/onarandombox/MultiverseCore/configuration/MVConfigMigrator.java deleted file mode 100644 index 1e2ac130..00000000 --- a/src/main/java/com/onarandombox/MultiverseCore/configuration/MVConfigMigrator.java +++ /dev/null @@ -1,76 +0,0 @@ -/****************************************************************************** - * Multiverse 2 Copyright (c) the Multiverse Team 2011. * - * Multiverse 2 is licensed under the BSD License. * - * For more information please check the README.md file included * - * with this project. * - ******************************************************************************/ - -package com.onarandombox.MultiverseCore.configuration; - -import com.onarandombox.MultiverseCore.api.LoggablePlugin; -import org.bukkit.plugin.Plugin; -import org.bukkit.util.config.Configuration; - -import java.io.File; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.logging.Level; - -/* - * This is a mess, so I'm just going to suppress all warnings here. - * BEGIN CHECKSTYLE-SUPPRESSION: ALL - */ - -/** - * This will be gone in 2.4. - * @deprecated This isn't used any more, is it? No. No it is not. - */ -@Deprecated -public abstract class MVConfigMigrator { - - public List createdDefaults = new ArrayList(); - - public abstract boolean migrate(String name, File folder); - - protected final void migrateListItem(Configuration newConfig, Configuration oldConfig, String key, String oldProperty, String newProperty) { - List list = Arrays.asList(oldConfig.getString("worlds." + key + oldProperty).split(",")); - if (list.size() > 0) { - if (list.get(0).length() == 0) { - list = new ArrayList(); - } - } - newConfig.setProperty("worlds." + key + newProperty, list); - } - - protected final File detectMultiverseFolders(File folder, LoggablePlugin mvPlugin) { - File oldFolder = null; - mvPlugin.log(Level.INFO, "Starting Multiverse Configuration Migrator(MVCM)!"); - // They still have MV 1 installed! Good! - if (mvPlugin.getServer().getPluginManager().getPlugin("MultiVerse") != null) { - mvPlugin.log(Level.INFO, "Found MultiVerse 1. Starting Config Migration..."); - Plugin plugin = mvPlugin.getServer().getPluginManager().getPlugin("MultiVerse"); - oldFolder = plugin.getDataFolder(); - } else { - // They didn't have MV 1 enabled... let's try and find the folder... - File[] folders = folder.getParentFile().listFiles(); - List folderList = Arrays.asList(folders); - for (File f : folderList) { - if (f.getName().equalsIgnoreCase("MultiVerse")) { - mvPlugin.log(Level.INFO, "Found the MultiVerse 1 config folder. Starting Config Migration..."); - oldFolder = f; - } - } - if (oldFolder == null) { - mvPlugin.log(Level.INFO, "Did not find the MV1 Folder. If you did not have MultiVerse 1 installed and this is the FIRST time you're running MV2, this message is GOOD. "); - mvPlugin.log(Level.INFO, "If you did, your configs were **NOT** migrated! Go Here: INSERTURLFORHELP"); - return null; - } - } - return oldFolder; - } -} - -/* - * END CHECKSTYLE-SUPPRESSION: ALL - */ diff --git a/src/main/java/com/onarandombox/MultiverseCore/event/MVConfigReloadEvent.java b/src/main/java/com/onarandombox/MultiverseCore/event/MVConfigReloadEvent.java index c878c4a5..a8acca07 100644 --- a/src/main/java/com/onarandombox/MultiverseCore/event/MVConfigReloadEvent.java +++ b/src/main/java/com/onarandombox/MultiverseCore/event/MVConfigReloadEvent.java @@ -20,7 +20,6 @@ public class MVConfigReloadEvent extends Event { private List configsLoaded; public MVConfigReloadEvent(List configsLoaded) { - super("MVConfigReload"); this.configsLoaded = configsLoaded; } diff --git a/src/main/java/com/onarandombox/MultiverseCore/event/MVPlayerTouchedPortalEvent.java b/src/main/java/com/onarandombox/MultiverseCore/event/MVPlayerTouchedPortalEvent.java index 32cb6421..a4772cb0 100644 --- a/src/main/java/com/onarandombox/MultiverseCore/event/MVPlayerTouchedPortalEvent.java +++ b/src/main/java/com/onarandombox/MultiverseCore/event/MVPlayerTouchedPortalEvent.java @@ -22,7 +22,6 @@ public class MVPlayerTouchedPortalEvent extends Event implements Cancellable { private boolean isCancelled; public MVPlayerTouchedPortalEvent(Player p, Location l) { - super("MVPlayerTouchedPortalEvent"); this.p = p; this.l = l; } diff --git a/src/main/java/com/onarandombox/MultiverseCore/event/MVRespawnEvent.java b/src/main/java/com/onarandombox/MultiverseCore/event/MVRespawnEvent.java index c94f4828..0f71cdf8 100644 --- a/src/main/java/com/onarandombox/MultiverseCore/event/MVRespawnEvent.java +++ b/src/main/java/com/onarandombox/MultiverseCore/event/MVRespawnEvent.java @@ -22,7 +22,6 @@ public class MVRespawnEvent extends Event { public MVRespawnEvent(Location spawningAt, Player p, String respawnMethod) { - super("MVRespawn"); this.player = p; this.location = spawningAt; this.respawnMethod = respawnMethod; diff --git a/src/main/java/com/onarandombox/MultiverseCore/event/MVTeleportEvent.java b/src/main/java/com/onarandombox/MultiverseCore/event/MVTeleportEvent.java index 3728c7d0..fac53728 100644 --- a/src/main/java/com/onarandombox/MultiverseCore/event/MVTeleportEvent.java +++ b/src/main/java/com/onarandombox/MultiverseCore/event/MVTeleportEvent.java @@ -28,7 +28,6 @@ public class MVTeleportEvent extends Event implements Cancellable { private boolean isCancelled; public MVTeleportEvent(MVDestination dest, Player teleportee, CommandSender teleporter, boolean safeTeleport) { - super("SafeTTeleporter"); this.teleportee = teleportee; this.teleporter = teleporter; this.dest = dest; diff --git a/src/main/java/com/onarandombox/MultiverseCore/event/MVVersionEvent.java b/src/main/java/com/onarandombox/MultiverseCore/event/MVVersionEvent.java index cb4698f1..d1bbeeb7 100644 --- a/src/main/java/com/onarandombox/MultiverseCore/event/MVVersionEvent.java +++ b/src/main/java/com/onarandombox/MultiverseCore/event/MVVersionEvent.java @@ -11,8 +11,7 @@ public class MVVersionEvent extends Event { private final StringBuilder versionInfoBuilder; public MVVersionEvent(String versionInfo) { - super("MVVersionEvent"); - versionInfoBuilder = new StringBuilder(versionInfo); + this.versionInfoBuilder = new StringBuilder(versionInfo); } private static final HandlerList HANDLERS = new HandlerList(); @@ -38,7 +37,7 @@ public class MVVersionEvent extends Event { * @return The version-info. */ public String getVersionInfo() { - return versionInfoBuilder.toString(); + return this.versionInfoBuilder.toString(); } /** @@ -46,6 +45,6 @@ public class MVVersionEvent extends Event { * @param moreVersionInfo The version-info to add. Should end with '\n'. */ public void appendVersionInfo(String moreVersionInfo) { - versionInfoBuilder.append(moreVersionInfo); + this.versionInfoBuilder.append(moreVersionInfo); } } diff --git a/src/main/java/com/onarandombox/MultiverseCore/event/MVWorldDeleteEvent.java b/src/main/java/com/onarandombox/MultiverseCore/event/MVWorldDeleteEvent.java index 38bf215d..9615e474 100644 --- a/src/main/java/com/onarandombox/MultiverseCore/event/MVWorldDeleteEvent.java +++ b/src/main/java/com/onarandombox/MultiverseCore/event/MVWorldDeleteEvent.java @@ -16,8 +16,6 @@ public class MVWorldDeleteEvent extends Event implements Cancellable { private final boolean removeFromConfig; public MVWorldDeleteEvent(MultiverseWorld world, boolean removeFromConfig) { - super("MVWorldDeleteEvent"); - if (world == null) throw new IllegalArgumentException("world can't be null!"); diff --git a/src/main/java/com/onarandombox/MultiverseCore/event/MVWorldPropertyChangeEvent.java b/src/main/java/com/onarandombox/MultiverseCore/event/MVWorldPropertyChangeEvent.java index 8d74d471..1cdd6404 100644 --- a/src/main/java/com/onarandombox/MultiverseCore/event/MVWorldPropertyChangeEvent.java +++ b/src/main/java/com/onarandombox/MultiverseCore/event/MVWorldPropertyChangeEvent.java @@ -29,7 +29,6 @@ public class MVWorldPropertyChangeEvent extends Event implements Cancellable { private String name; public MVWorldPropertyChangeEvent(MultiverseWorld world, CommandSender changer, String name, String value) { - super("MVWorldPropertyChange"); this.world = world; this.changer = changer; this.name = name; diff --git a/src/test/java/com/onarandombox/MultiverseCore/test/utils/MockBlock.java b/src/test/java/com/onarandombox/MultiverseCore/test/utils/MockBlock.java deleted file mode 100644 index 57e6a331..00000000 --- a/src/test/java/com/onarandombox/MultiverseCore/test/utils/MockBlock.java +++ /dev/null @@ -1,330 +0,0 @@ -/****************************************************************************** - * Multiverse 2 Copyright (c) the Multiverse Team 2011. * - * Multiverse 2 is licensed under the BSD License. * - * For more information please check the README.md file included * - * with this project. * - ******************************************************************************/ - -package com.onarandombox.MultiverseCore.test.utils; - -import org.bukkit.Chunk; -import org.bukkit.Location; -import org.bukkit.Material; -import org.bukkit.World; -import org.bukkit.block.*; -import org.bukkit.inventory.ItemStack; - -import java.util.Collection; - -/** - * Multiverse 2 - */ -public class MockBlock implements Block{ - private Material type; - private Location location; - - - public MockBlock(Location l, Material type) { - this.type = type; - this.location = l; - } - - /** - * {@inheritDoc} - */ - @Override - public byte getData() { - return 0; - } - - /** - * {@inheritDoc} - */ - @Override - public Block getFace(BlockFace face) { - return null; - } - - /** - * {@inheritDoc} - */ - @Override - public Block getFace(BlockFace face, int distance) { - return null; - } - - /** - * {@inheritDoc} - */ - @Override - public Block getRelative(int modX, int modY, int modZ) { - return null; - } - - /** - * {@inheritDoc} - */ - @Override - public Block getRelative(BlockFace face) { - return null; - } - - /** - * {@inheritDoc} - */ - @Override - public Block getRelative(BlockFace face, int distance) { - return null; - } - - /** - * {@inheritDoc} - */ - @Override - public Material getType() { - return this.type; - } - - /** - * {@inheritDoc} - */ - @Override - public int getTypeId() { - return 0; - } - - /** - * {@inheritDoc} - */ - @Override - public byte getLightLevel() { - return 0; - } - - @Override - public byte getLightFromSky() { - return 0; - } - - @Override - public byte getLightFromBlocks() { - return 0; - } - - /** - * {@inheritDoc} - */ - @Override - public World getWorld() { - return this.location.getWorld(); - } - - /** - * {@inheritDoc} - */ - @Override - public int getX() { - return this.location.getBlockX(); - } - - /** - * {@inheritDoc} - */ - @Override - public int getY() { - return this.location.getBlockY(); - } - - /** - * {@inheritDoc} - */ - @Override - public int getZ() { - return this.location.getBlockZ(); - } - - /** - * {@inheritDoc} - */ - @Override - public Location getLocation() { - return this.location; - } - - /** - * {@inheritDoc} - */ - @Override - public Chunk getChunk() { - return null; - } - - /** - * {@inheritDoc} - */ - @Override - public void setData(byte data) { - } - - @Override - public void setData(byte data, boolean applyPhyiscs) { - } - - /** - * {@inheritDoc} - */ - @Override - public void setType(Material type) { - this.type = type; - } - - /** - * {@inheritDoc} - */ - @Override - public boolean setTypeId(int type) { - return false; - } - - @Override - public boolean setTypeId(int type, boolean applyPhysics) { - return false; - } - - @Override - public boolean setTypeIdAndData(int type, byte data, boolean applyPhyiscs) { - return false; - } - - /** - * {@inheritDoc} - */ - @Override - public BlockFace getFace(Block block) { - return null; - } - - /** - * {@inheritDoc} - */ - @Override - public BlockState getState() { - return null; - } - - /** - * {@inheritDoc} - */ - @Override - public Biome getBiome() { - return null; - } - - /** - * {@inheritDoc} - */ - @Override - public boolean isBlockPowered() { - return false; - } - - /** - * {@inheritDoc} - */ - @Override - public boolean isBlockIndirectlyPowered() { - return false; - } - - /** - * {@inheritDoc} - */ - @Override - public boolean isBlockFacePowered(BlockFace face) { - return false; - } - - /** - * {@inheritDoc} - */ - @Override - public boolean isBlockFaceIndirectlyPowered(BlockFace face) { - return false; - } - - /** - * {@inheritDoc} - */ - @Override - public int getBlockPower(BlockFace face) { - return 0; - } - - /** - * {@inheritDoc} - */ - @Override - public int getBlockPower() { - return 0; - } - - /** - * {@inheritDoc} - */ - @Override - public boolean isEmpty() { - return this.type == Material.AIR; - } - - /** - * {@inheritDoc} - */ - @Override - public boolean isLiquid() { - return false; - } - - /** - * {@inheritDoc} - */ - @Override - public double getTemperature() { - return 0; - } - - /** - * {@inheritDoc} - */ - @Override - public double getHumidity() { - return 0; - } - - /** - * {@inheritDoc} - */ - @Override - public PistonMoveReaction getPistonMoveReaction() { - return null; - } - - @Override - public boolean breakNaturally() { - return false; - } - - @Override - public boolean breakNaturally(ItemStack itemStack) { - return false; - } - - @Override - public Collection getDrops() { - return null; - } - - @Override - public Collection getDrops(ItemStack itemStack) { - return null; - } -}