Final backwards compatability checks

This commit is contained in:
Eric Stokes 2011-10-08 10:57:48 -06:00
parent e31f2c79ac
commit 4a634e8418
36 changed files with 305 additions and 55 deletions

View File

@ -7,11 +7,13 @@
package com.onarandombox.MultiverseCore;
import com.pneumaticraft.commandhandler.Command;
/**
* Dummy class to make old MV Plugins not explode.
* If this loads, the user WILL get a severe telling them to update said plugin!
* WILL BE DELETED ON 11/1/11
*/
@Deprecated
public interface LoggablePlugin {
public interface LoggablePlugin extends com.onarandombox.MultiverseCore.api.LoggablePlugin {
}

View File

@ -7,6 +7,7 @@
package com.onarandombox.MultiverseCore;
import com.pneumaticraft.commandhandler.Command;
import org.bukkit.permissions.Permission;
import org.bukkit.permissions.PermissionDefault;
@ -16,8 +17,8 @@ import org.bukkit.permissions.PermissionDefault;
* WILL BE DELETED ON 11/1/11
*/
@Deprecated
public class MVPermissions {
public Permission addPermission(String string, PermissionDefault def) {
return new Permission("update.all.multiverse.plugins");
public class MVPermissions extends com.onarandombox.MultiverseCore.utils.MVPermissions{
public MVPermissions(MultiverseCore plugin) {
super(plugin);
}
}

View File

@ -13,5 +13,5 @@ package com.onarandombox.MultiverseCore;
* WILL BE DELETED ON 11/1/11
*/
@Deprecated
public interface MVPlugin {
public interface MVPlugin extends com.onarandombox.MultiverseCore.api.MVPlugin {
}

View File

@ -289,7 +289,7 @@ public class MVWorld implements MultiverseWorld {
} else {
this.world.setSpawnFlags(true, this.world.getAllowAnimals());
}
this.plugin.getWorldManager().getWorldPurger().purgeWorld(null, this);
this.plugin.getMVWorldManager().getWorldPurger().purgeWorld(null, this);
}
private boolean setVariable(String name, boolean value) {

View File

@ -20,9 +20,7 @@ import com.onarandombox.MultiverseCore.listeners.MVPlayerListener;
import com.onarandombox.MultiverseCore.listeners.MVPluginListener;
import com.onarandombox.MultiverseCore.listeners.MVWeatherListener;
import com.onarandombox.MultiverseCore.utils.*;
import com.onarandombox.MultiverseCore.utils.DebugLog;
import com.onarandombox.MultiverseCore.utils.MVPermissions;
import com.onarandombox.utils.*;
import com.pneumaticraft.commandhandler.CommandHandler;
import org.bukkit.ChatColor;
import org.bukkit.Location;
@ -49,6 +47,7 @@ public class MultiverseCore extends JavaPlugin implements MVPlugin {
public static boolean outdatedPluginFound = false;
private static int Protocol = 1;
@Override
public String dumpVersionInfo(String buffer) {
// I'm kinda cheating on this one, since we call the init event.
@ -393,8 +392,9 @@ public class MultiverseCore extends JavaPlugin implements MVPlugin {
@Deprecated
public com.onarandombox.MultiverseCore.MVPermissions getPermissions() {
return new com.onarandombox.MultiverseCore.MVPermissions();
return new com.onarandombox.MultiverseCore.MVPermissions(this);
}
@Deprecated
public PurgeWorlds getWorldPurger() {
return this.worldManager.getWorldPurger();
@ -562,10 +562,15 @@ public class MultiverseCore extends JavaPlugin implements MVPlugin {
this.bank = bank;
}
public DestinationFactory getDestinationFactory() {
public DestinationFactory getDestFactory() {
return this.destFactory;
}
@Deprecated
public com.onarandombox.utils.DestinationFactory getDestinationFactory() {
return new com.onarandombox.utils.DestinationFactory (this);
}
/**
* This is a convenience method to allow the QueuedCommand system to call it. You should NEVER call this directly.
*
@ -608,10 +613,15 @@ public class MultiverseCore extends JavaPlugin implements MVPlugin {
return this.spoutInterface;
}
public WorldManager getWorldManager() {
public WorldManager getMVWorldManager() {
return this.worldManager;
}
@Deprecated
public com.onarandombox.utils.WorldManager getWorldManager() {
return new com.onarandombox.utils.WorldManager(this);
}
public MVPlayerListener getPlayerListener() {
return this.playerListener;
}

View File

@ -33,7 +33,7 @@ public class CoordCommand extends MultiverseCommand {
this.addKey("mvcoord");
this.addKey("mvco");
this.setPermission("multiverse.core.coord", "Returns detailed information on the Players where abouts.", PermissionDefault.OP);
this.worldManager = this.plugin.getWorldManager();
this.worldManager = this.plugin.getMVWorldManager();
}
@Override

View File

@ -35,7 +35,7 @@ public class CreateCommand extends MultiverseCommand {
this.addCommandExample("/mv create " + ChatColor.GOLD + "starwars" + ChatColor.AQUA + " skylands");
this.addCommandExample("/mv create " + ChatColor.GOLD + "gargamel" + ChatColor.GREEN + " normal" + ChatColor.DARK_AQUA + " -s gargamel");
this.addCommandExample("/mv create " + ChatColor.GOLD + "moonworld" + ChatColor.GREEN + " normal" + ChatColor.DARK_AQUA + " -g BukkitFullOfMoon");
this.worldManager = this.plugin.getWorldManager();
this.worldManager = this.plugin.getMVWorldManager();
}
@Override

View File

@ -29,7 +29,7 @@ public class ImportCommand extends MultiverseCommand {
this.addKey("mvim");
this.addKey("mv import");
this.setPermission("multiverse.core.import", "Imports a new world of the specified type.", PermissionDefault.OP);
this.worldManager = this.plugin.getWorldManager();
this.worldManager = this.plugin.getMVWorldManager();
}
@Override

View File

@ -35,7 +35,7 @@ public class InfoCommand extends MultiverseCommand {
this.addKey("mvi");
this.addKey("mv info");
this.setPermission("multiverse.core.info", "Returns detailed information on the world.", PermissionDefault.OP);
this.worldManager = this.plugin.getWorldManager();
this.worldManager = this.plugin.getMVWorldManager();
}
@Override

View File

@ -38,7 +38,7 @@ public class ListCommand extends MultiverseCommand {
}
String output = ChatColor.LIGHT_PURPLE + "Worlds which you can view:\n";
for (MVWorld world : this.plugin.getWorldManager().getMVWorlds()) {
for (MVWorld world : this.plugin.getMVWorldManager().getMVWorlds()) {
if (p != null && (!this.plugin.getMVPerms().canEnterWorld(p, world))) {
continue;

View File

@ -34,7 +34,7 @@ public class ModifyAddCommand extends MultiverseCommand {
this.addKey("mv modify add");
this.addKey("mvmodify add");
this.setPermission("multiverse.core.modify.add", "Modify various aspects of worlds. See the help wiki for how to use this command properly. If you do not include a world, the current world will be used.", PermissionDefault.OP);
this.worldManager = this.plugin.getWorldManager();
this.worldManager = this.plugin.getMVWorldManager();
}
@Override

View File

@ -31,7 +31,7 @@ public class ModifyClearCommand extends MultiverseCommand {
this.addKey("mv modify clear");
this.addKey("mvmodify clear");
this.setPermission("multiverse.core.modify.clear", "Removes all values from a property. This will work on properties that contain lists.", PermissionDefault.OP);
this.worldManager = this.plugin.getWorldManager();
this.worldManager = this.plugin.getMVWorldManager();
}
@Override

View File

@ -35,7 +35,7 @@ public class ModifyRemoveCommand extends MultiverseCommand {
this.addKey("mv modify delete");
this.addKey("mvmodify delete");
this.setPermission("multiverse.core.modify.remove", "Modify various aspects of worlds. See the help wiki for how to use this command properly. If you do not include a world, the current world will be used.", PermissionDefault.OP);
this.worldManager = this.plugin.getWorldManager();
this.worldManager = this.plugin.getMVWorldManager();
}
@Override

View File

@ -31,7 +31,7 @@ public class ModifySetCommand extends MultiverseCommand {
this.addKey("mv modify set");
this.addKey("mvmodify set");
this.setPermission("multiverse.core.modify.set", "Modify various aspects of worlds. See the help wiki for how to use this command properly. If you do not include a world, the current world will be used.", PermissionDefault.OP);
this.worldManager = this.plugin.getWorldManager();
this.worldManager = this.plugin.getMVWorldManager();
}
@Override

View File

@ -31,7 +31,7 @@ public class PurgeCommand extends MultiverseCommand {
this.addKey("mvpurge");
this.addKey("mv purge");
this.setPermission("multiverse.core.purge", "Removed the specified type of mob from the specified world.", PermissionDefault.OP);
this.worldManager = this.plugin.getWorldManager();
this.worldManager = this.plugin.getMVWorldManager();
}
@Override

View File

@ -32,7 +32,7 @@ public class ReloadCommand extends MultiverseCommand {
public void runCommand(CommandSender sender, List<String> args) {
sender.sendMessage(ChatColor.GOLD + "Reloading all Multiverse Plugin configs...");
this.plugin.loadConfigs();
this.plugin.getWorldManager().loadWorlds(true);
this.plugin.getMVWorldManager().loadWorlds(true);
// Create the event
List<String> configsLoaded = new ArrayList<String>();

View File

@ -28,7 +28,7 @@ public class RemoveCommand extends MultiverseCommand {
@Override
public void runCommand(CommandSender sender, List<String> args) {
if (this.plugin.getWorldManager().removeWorldFromConfig(args.get(0))) {
if (this.plugin.getMVWorldManager().removeWorldFromConfig(args.get(0))) {
sender.sendMessage("World removed from config!");
} else {
sender.sendMessage("Error trying to remove world from config!");

View File

@ -39,7 +39,7 @@ public class SetSpawnCommand extends MultiverseCommand {
Player p = (Player) sender;
Location l = p.getLocation();
World w = p.getWorld();
MVWorld foundWorld = this.plugin.getWorldManager().getMVWorld(w.getName());
MVWorld foundWorld = this.plugin.getMVWorldManager().getMVWorld(w.getName());
if (foundWorld != null) {
foundWorld.setSpawn(p.getLocation());
sender.sendMessage("Spawn was set to: " + LocationManipulation.strCoords(p.getLocation()));

View File

@ -73,7 +73,7 @@ public class SpawnCommand extends MultiverseCommand {
}
private void spawnAccurately(Player player) {
MVWorld world = this.plugin.getWorldManager().getMVWorld(player.getWorld().getName());
MVWorld world = this.plugin.getMVWorldManager().getMVWorld(player.getWorld().getName());
if (world != null) {
player.teleport(world.getSpawnLocation());
} else {

View File

@ -81,7 +81,7 @@ public class TeleportCommand extends MultiverseCommand {
}
}
DestinationFactory df = this.plugin.getDestinationFactory();
DestinationFactory df = this.plugin.getDestFactory();
MVDestination d = df.getDestination(destinationName);

View File

@ -28,7 +28,7 @@ public class UnloadCommand extends MultiverseCommand {
@Override
public void runCommand(CommandSender sender, List<String> args) {
if (this.plugin.getWorldManager().removeWorldFromList(args.get(0))) {
if (this.plugin.getMVWorldManager().removeWorldFromList(args.get(0))) {
sender.sendMessage("World Unloaded!");
} else {
sender.sendMessage("Error trying to unload world!");

View File

@ -50,7 +50,7 @@ public class VersionCommand extends MultiverseCommand {
logAndAddToPasteBinBuffer("Multiverse-Core Version: " + this.plugin.getDescription().getVersion());
logAndAddToPasteBinBuffer("Bukkit Version: " + this.plugin.getServer().getVersion());
logAndAddToPasteBinBuffer("Loaded Worlds: " + this.plugin.getWorldManager().getMVWorlds().size());
logAndAddToPasteBinBuffer("Loaded Worlds: " + this.plugin.getMVWorldManager().getMVWorlds().size());
logAndAddToPasteBinBuffer("Multiverse Plugins Loaded: " + this.plugin.getPluginCount());
logAndAddToPasteBinBuffer("Economy being used: " + this.plugin.getBank().getEconUsed());
logAndAddToPasteBinBuffer("Permissions Plugin: " + this.plugin.getMVPerms().getType());

View File

@ -31,7 +31,7 @@ public class WhoCommand extends MultiverseCommand {
this.addKey("mvw");
this.addKey("mvwho");
this.setPermission("multiverse.core.list.who", "States who is in what world.", PermissionDefault.OP);
this.worldManager = this.plugin.getWorldManager();
this.worldManager = this.plugin.getMVWorldManager();
}
@Override

View File

@ -58,7 +58,7 @@ public class CannonDestination implements MVDestination {
}
// If it's not a MV world
if (!((MultiverseCore) plugin).getWorldManager().isMVWorld(parsed.get(1))) {
if (!((MultiverseCore) plugin).getMVWorldManager().isMVWorld(parsed.get(1))) {
return false;
}
// Verify X,Y,Z are numbers
@ -104,12 +104,12 @@ public class CannonDestination implements MVDestination {
return;
}
if (!((MultiverseCore) plugin).getWorldManager().isMVWorld(parsed.get(1))) {
if (!((MultiverseCore) plugin).getMVWorldManager().isMVWorld(parsed.get(1))) {
this.isValid = false;
return;
}
this.location = new Location(((MultiverseCore) plugin).getWorldManager().getMVWorld(parsed.get(1)).getCBWorld(), 0, 0, 0);
this.location = new Location(((MultiverseCore) plugin).getMVWorldManager().getMVWorld(parsed.get(1)).getCBWorld(), 0, 0, 0);
if (!parsed.get(2).matches(this.coordRegex)) {
this.isValid = false;

View File

@ -50,7 +50,7 @@ public class ExactDestination implements MVDestination {
}
// If it's not a MV world
if (!((MultiverseCore) plugin).getWorldManager().isMVWorld(parsed.get(1))) {
if (!((MultiverseCore) plugin).getMVWorldManager().isMVWorld(parsed.get(1))) {
return false;
}
@ -100,11 +100,11 @@ public class ExactDestination implements MVDestination {
return;
}
if (!((MultiverseCore) plugin).getWorldManager().isMVWorld(parsed.get(1))) {
if (!((MultiverseCore) plugin).getMVWorldManager().isMVWorld(parsed.get(1))) {
this.isValid = false;
return;
}
this.location = new Location(((MultiverseCore) plugin).getWorldManager().getMVWorld(parsed.get(1)).getCBWorld(), 0, 0, 0);
this.location = new Location(((MultiverseCore) plugin).getMVWorldManager().getMVWorld(parsed.get(1)).getCBWorld(), 0, 0, 0);
if (!parsed.get(2).matches(this.coordRegex)) {
this.isValid = false;

View File

@ -34,14 +34,14 @@ public class WorldDestination implements MVDestination {
if (items.length > 3) {
return false;
}
if (items.length == 1 && ((MultiverseCore) plugin).getWorldManager().isMVWorld(items[0])) {
if (items.length == 1 && ((MultiverseCore) plugin).getMVWorldManager().isMVWorld(items[0])) {
// This case is: world
return true;
}
if (items.length == 2 && ((MultiverseCore) plugin).getWorldManager().isMVWorld(items[0])) {
if (items.length == 2 && ((MultiverseCore) plugin).getMVWorldManager().isMVWorld(items[0])) {
// This case is: world:n
return true;
} else if (items[0].equalsIgnoreCase("w") && ((MultiverseCore) plugin).getWorldManager().isMVWorld(items[1])) {
} else if (items[0].equalsIgnoreCase("w") && ((MultiverseCore) plugin).getMVWorldManager().isMVWorld(items[1])) {
// This case is: w:world
// and w:world:ne
return true;
@ -79,18 +79,18 @@ public class WorldDestination implements MVDestination {
isValid = false;
return;
}
if (items.length == 1 && ((MultiverseCore) plugin).getWorldManager().isMVWorld(items[0])) {
if (items.length == 1 && ((MultiverseCore) plugin).getMVWorldManager().isMVWorld(items[0])) {
isValid = true;
this.world = ((MultiverseCore) plugin).getWorldManager().getMVWorld(items[0]);
this.world = ((MultiverseCore) plugin).getMVWorldManager().getMVWorld(items[0]);
return;
}
if (items.length == 2 && ((MultiverseCore) plugin).getWorldManager().isMVWorld(items[0])) {
this.world = ((MultiverseCore) plugin).getWorldManager().getMVWorld(items[0]);
if (items.length == 2 && ((MultiverseCore) plugin).getMVWorldManager().isMVWorld(items[0])) {
this.world = ((MultiverseCore) plugin).getMVWorldManager().getMVWorld(items[0]);
this.yaw = LocationManipulation.getYaw(items[1]);
return;
}
if (items[0].equalsIgnoreCase("w") && ((MultiverseCore) plugin).getWorldManager().isMVWorld(items[1])) {
this.world = ((MultiverseCore) plugin).getWorldManager().getMVWorld(items[1]);
if (items[0].equalsIgnoreCase("w") && ((MultiverseCore) plugin).getMVWorldManager().isMVWorld(items[1])) {
this.world = ((MultiverseCore) plugin).getMVWorldManager().getMVWorld(items[1]);
isValid = true;
if (items.length == 3) {
this.yaw = LocationManipulation.getYaw(items[2]);

View File

@ -29,14 +29,14 @@ public class MVEntityListener extends EntityListener {
public MVEntityListener(MultiverseCore plugin) {
this.plugin = plugin;
this.worldManager = plugin.getWorldManager();
this.worldManager = plugin.getMVWorldManager();
}
@Override
public void onFoodLevelChange(FoodLevelChangeEvent event) {
if (event.getEntity() instanceof Player) {
Player p = (Player) event.getEntity();
MVWorld w = this.plugin.getWorldManager().getMVWorld(p.getWorld().getName());
MVWorld w = this.plugin.getMVWorldManager().getMVWorld(p.getWorld().getName());
if (w != null && !w.getHunger()) {
// If the world has hunger set to false, do not let the level go down
if (event.getFoodLevel() < ((Player) event.getEntity()).getFoodLevel()) {

View File

@ -29,7 +29,7 @@ public class MVPlayerListener extends PlayerListener {
public MVPlayerListener(MultiverseCore plugin) {
this.plugin = plugin;
worldManager = plugin.getWorldManager();
worldManager = plugin.getMVWorldManager();
}
@Override

View File

@ -33,8 +33,8 @@ public class MVPluginListener extends ServerListener {
this.plugin.log(Level.SEVERE, "Please grab the latest version from:");
this.plugin.log(Level.SEVERE, "http://bukkit.onarandombox.com/?dir="+event.getPlugin().getDescription().getName().toLowerCase());
this.plugin.log(Level.SEVERE, "I'm going to disable " + event.getPlugin().getDescription().getName() + " now.");
this.plugin.log(Level.SEVERE, "IF YOU DO NOT UPDATE, YOUR SERVER WILL **NOT** FUNCTION PROPERLY!!!");
this.plugin.getServer().getPluginManager().disablePlugin(event.getPlugin());
}
// Let AllPay handle all econ plugin loadings, only go for econ plugins we support
if (Arrays.asList(AllPay.validEconPlugins).contains(event.getPlugin().getDescription().getName())) {

View File

@ -23,7 +23,7 @@ public class MVWeatherListener extends WeatherListener {
@Override
public void onWeatherChange(WeatherChangeEvent event) {
MVWorld world = this.plugin.getWorldManager().getMVWorld(event.getWorld().getName());
MVWorld world = this.plugin.getMVWorldManager().getMVWorld(event.getWorld().getName());
if (world != null) {
// If it's going to start raining and we have weather disabled
event.setCancelled((event.toWeatherState() && !world.getWeatherEnabled()));
@ -33,7 +33,7 @@ public class MVWeatherListener extends WeatherListener {
@Override
public void onThunderChange(ThunderChangeEvent event) {
MVWorld world = this.plugin.getWorldManager().getMVWorld(event.getWorld().getName());
MVWorld world = this.plugin.getMVWorldManager().getMVWorld(event.getWorld().getName());
if (world != null) {
// If it's going to start raining and we have weather disabled
event.setCancelled((event.toThunderState() && !world.getWeatherEnabled()));

View File

@ -10,7 +10,6 @@ package com.onarandombox.MultiverseCore.utils;
import com.onarandombox.MultiverseCore.MVWorld;
import com.onarandombox.MultiverseCore.MultiverseCore;
import com.onarandombox.MultiverseCore.api.MVDestination;
import com.onarandombox.MultiverseCore.utils.WorldManager;
import com.pneumaticraft.commandhandler.PermissionsInterface;
import org.bukkit.Location;
import org.bukkit.command.CommandSender;
@ -33,7 +32,7 @@ public class MVPermissions implements PermissionsInterface {
*/
public MVPermissions(MultiverseCore plugin) {
this.plugin = plugin;
this.worldMgr = plugin.getWorldManager();
this.worldMgr = plugin.getMVWorldManager();
}
/**
@ -87,7 +86,7 @@ public class MVPermissions implements PermissionsInterface {
return false;
}
String worldName = l.getWorld().getName();
if (!this.plugin.getWorldManager().isMVWorld(worldName)) {
if (!this.plugin.getMVWorldManager().isMVWorld(worldName)) {
return false;
}
return this.hasPermission(p, "multiverse.access." + worldName, false);

View File

@ -14,7 +14,8 @@ package com.onarandombox.utils;
*/
@Deprecated
public class DebugLog {
public DebugLog(String dummy, String dummy2) {
public class DebugLog extends com.onarandombox.MultiverseCore.utils.DebugLog{
public DebugLog(String logger, String file) {
super(logger, file);
}
}

View File

@ -0,0 +1,33 @@
/******************************************************************************
* 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.utils;
import com.onarandombox.MultiverseCore.MultiverseCore;
import com.onarandombox.utils.MVDestination;
import org.bukkit.Location;
import org.bukkit.entity.Entity;
import org.bukkit.plugin.java.JavaPlugin;
import org.bukkit.util.Vector;
/**
* Dummy class to make old MV Plugins not explode.
* If this loads, the user WILL get a severe telling them to update said plugin!
* WILL BE DELETED ON 11/1/11
*/
@Deprecated
public class DestinationFactory extends com.onarandombox.MultiverseCore.destination.DestinationFactory {
public DestinationFactory(MultiverseCore plugin) {
super(plugin);
}
@Override
public MVDestination getDestination(String destination) {
return new InvalidDestination();
}
}

View File

@ -0,0 +1,164 @@
/******************************************************************************
* 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.utils;
import org.bukkit.Location;
import org.bukkit.entity.Entity;
import org.bukkit.plugin.java.JavaPlugin;
import org.bukkit.util.Vector;
/**
* Dummy class to make old MV Plugins not explode.
* If this loads, the user WILL get a severe telling them to update said plugin!
* WILL BE DELETED ON 11/1/11
*/
@Deprecated
public class InvalidDestination implements com.onarandombox.utils.MVDestination {
/**
* Returns the identifier or prefix that is required for this destination.
* <p/>
* Portals have a prefix of "p" for example and OpenWarp (third party plugin) uses "ow". This is derived from a
* hash and cannot have duplicate values. Read that as your plugin cannot use 'p' because it's already used.
* Please check the wiki when adding a custom destination!
*
* @return The identifier or prefix that is required for this destination.
*/
@Override
public String getIdentifier() {
return null; //To change body of implemented methods use File | Settings | File Templates.
}
/**
* Allows you to determine if a Destination is valid for the type it thinks it is.
* <p/>
* An example of this would be the exact destination. A valid string would be: e:0,0,0 where an invalid one would
* be e:1:2:3. The first string would return true the second would return false. This is simply a convenience
* method
* and does not even NEED to be called, but it's highly recommended if you're teleporting, but it's mainly for
* Multiverse Internal use.
*
* @param plugin The plugin who the type belongs to.
* @param destination The destination string. ex: p:MyPortal:nw
*
* @return True if the destination is valid, false if not.
*/
@Override
public boolean isThisType(JavaPlugin plugin, String destination) {
return false; //To change body of implemented methods use File | Settings | File Templates.
}
/**
* Returns the location a specific entity will spawn at.
* <p/>
* To just retrieve the location as it is stored you can just pass null, but be warned some destinations may return
* null back to you if you do this. It is always safer to pass an actual entity. This is used so things like
* minecarts can be teleported.
* <p/>
* Do not forget to use {@link #getVelocity()} as destinations can use this too!
*
* @param entity The entity to be teleported.
*
* @return The location of the entity.
*/
@Override
public Location getLocation(Entity entity) {
return null; //To change body of implemented methods use File | Settings | File Templates.
}
/**
* Returns the velocity vector for this destination.
* <p/>
* Plugins wishing to fully support MVDestinations MUST implement this.
*
* @return A vector representing the speed/direction the player should travel when arriving
*/
@Override
public Vector getVelocity() {
return null; //To change body of implemented methods use File | Settings | File Templates.
}
/**
* Sets the destination string.
* <p/>
* This should be used when you want to tell this destination object about a change in where it should take people.
* The destination param should be match the result from {@link #getIdentifier()}. A valid example would be that if
* {@link #getIdentifier()} returned "ow" our destination string could be "ow:TownCenter" but could not be
* "p:HomePortal"
*
* @param plugin The plugin who the type belongs to.
* @param destination The destination string. ex: p:MyPortal:nw
*/
@Override
public void setDestination(JavaPlugin plugin, String destination) {
//To change body of implemented methods use File | Settings | File Templates.
}
/**
* Returns true if the destination is valid and players will be taken to it.
* <p/>
* Even if destinations are in the correct format (p:MyPortal) MyPortal may not exist, and therefore this would
* return false.
*
* @return True if the destination is valid; false if not.
*/
@Override
public boolean isValid() {
return false; //To change body of implemented methods use File | Settings | File Templates.
}
/**
* Gives you a general friendly description of the type of destination.
* <p/>
* For example, the PlayerDestination sets this to "Player". You can use this to show where a player will be taken.
*
* @return A friendly string description of the type of destination.
*/
@Override
public String getType() {
return null; //To change body of implemented methods use File | Settings | File Templates.
}
/**
* Gives you a specific name of the destination.
* <p/>
* For example, the PlayerDestination sets this to The Player's Name.
*
* @return A friendly string stating the name of the destination.
*/
@Override
public String getName() {
return null; //To change body of implemented methods use File | Settings | File Templates.
}
/**
* Returns the permissions string required to go here.
* <p/>
* ex: multiverse.access.world
* <p/>
* NOTE: This is NOT the permission to use the teleport command.
*
* @return the permissions string required to go here.
*/
@Override
public String getRequiredPermission() {
return null; //To change body of implemented methods use File | Settings | File Templates.
}
/**
* Should the Multiverse SafeTeleporter be used?
* <p/>
* If not, MV will blindly take people to the location specified.
*
* @return True if the SafeTeleporter will be used, false if not.
*/
@Override
public boolean useSafeTeleporter() {
return false; //To change body of implemented methods use File | Settings | File Templates.
}
}

View File

@ -0,0 +1,18 @@
/******************************************************************************
* 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.utils;
/**
* Dummy class to make old MV Plugins not explode.
* If this loads, the user WILL get a severe telling them to update said plugin!
* WILL BE DELETED ON 11/1/11
*/
@Deprecated
public interface MVDestination extends com.onarandombox.MultiverseCore.api.MVDestination {
}

View File

@ -0,0 +1,22 @@
/******************************************************************************
* 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.utils;
import com.onarandombox.MultiverseCore.MultiverseCore;
/**
* Dummy class to make old MV Plugins not explode.
* If this loads, the user WILL get a severe telling them to update said plugin!
* WILL BE DELETED ON 11/1/11
*/
@Deprecated
public class WorldManager extends com.onarandombox.MultiverseCore.utils.WorldManager {
public WorldManager(MultiverseCore core) {
super(core);
}
}