Renamed from "MultiVerse-Core" to "Multiverse-Core" ./slaps Kainzo

This commit is contained in:
Rigby 2011-03-31 16:04:54 +01:00
parent 4fb9098485
commit 3659e41098
26 changed files with 188 additions and 175 deletions

View File

@ -1,24 +0,0 @@
package com.onarandombox.MultiVerseCore.commands;
import org.bukkit.command.CommandSender;
import com.onarandombox.MultiVerseCore.MVCommandHandler;
import com.onarandombox.MultiVerseCore.MultiVerseCore;
public class MVReload extends MVCommandHandler {
public MVReload(MultiVerseCore plugin) {
super(plugin);
}
@Override
public boolean perform(CommandSender sender, String[] args) {
// TODO: Implement Permissions
MultiVerseCore.log.info(MultiVerseCore.logPrefix + "Reloading MultiVerse");
plugin.loadConfigs();
plugin.loadWorlds();
MultiVerseCore.log.info(MultiVerseCore.logPrefix + "Reload Complete!");
return true;
}
}

View File

@ -1,4 +1,4 @@
package com.onarandombox.MultiVerseCore;
package com.onarandombox.MultiverseCore;
import org.bukkit.event.block.BlockDamageEvent;
import org.bukkit.event.block.BlockListener;
@ -9,9 +9,9 @@ import org.bukkit.event.block.BlockPlaceEvent;
public class MVBlockListener extends BlockListener {
MultiVerseCore plugin;
MultiverseCore plugin;
public MVBlockListener(MultiVerseCore plugin) {
public MVBlockListener(MultiverseCore plugin) {
this.plugin = plugin;
}

View File

@ -1,12 +1,12 @@
package com.onarandombox.MultiVerseCore;
package com.onarandombox.MultiverseCore;
import org.bukkit.command.CommandSender;
public abstract class MVCommandHandler {
protected final MultiVerseCore plugin;
protected final MultiverseCore plugin;
public MVCommandHandler(MultiVerseCore plugin) {
public MVCommandHandler(MultiverseCore plugin) {
this.plugin = plugin;
}

View File

@ -1,4 +1,4 @@
package com.onarandombox.MultiVerseCore;
package com.onarandombox.MultiverseCore;
import java.util.List;
@ -23,9 +23,9 @@ import org.bukkit.event.entity.EntityListener;
public class MVEntityListener extends EntityListener {
MultiVerseCore plugin;
MultiverseCore plugin;
public MVEntityListener(MultiVerseCore plugin) {
public MVEntityListener(MultiverseCore plugin) {
this.plugin = plugin;
}
@ -53,7 +53,7 @@ public class MVEntityListener extends EntityListener {
Entity defender = event.getEntity();
World w = defender.getWorld();
if (!(MultiVerseCore.configWorlds.getBoolean("worlds." + w.getName() + ".enablehealth", true))) {
if (!(MultiverseCore.configWorlds.getBoolean("worlds." + w.getName() + ".enablehealth", true))) {
event.setCancelled(true);
return;
}
@ -153,7 +153,7 @@ public class MVEntityListener extends EntityListener {
int count = 0;
for (Entity entity : entities) {
if (entity instanceof Ghast) {
if (count >= MultiVerseCore.configMV.getInt("ghastlimit", 50)) {
if (count >= MultiverseCore.configMV.getInt("ghastlimit", 50)) {
event.setCancelled(true);
return;
}

View File

@ -1,4 +1,4 @@
package com.onarandombox.MultiVerseCore;
package com.onarandombox.MultiverseCore;
import java.util.List;
@ -7,13 +7,13 @@ import org.bukkit.entity.Player;
public class MVPermissions {
private MultiVerseCore plugin;
private MultiverseCore plugin;
/**
* Constructor FTW
* @param plugin Pass along the Core Plugin.
*/
public MVPermissions(MultiVerseCore plugin) {
public MVPermissions(MultiverseCore plugin) {
this.plugin = plugin;
}
@ -27,8 +27,8 @@ public class MVPermissions {
public boolean has(Player p, String node) {
boolean result = false;
if (MultiVerseCore.Permissions != null) {
result = MultiVerseCore.Permissions.has(p, node);
if (MultiverseCore.Permissions != null) {
result = MultiverseCore.Permissions.has(p, node);
} else if (p.isOp()) {
result = true;
}
@ -72,8 +72,8 @@ public class MVPermissions {
public Boolean canEnterWorld(Player p, World w) {
String group = "";
if (MultiVerseCore.Permissions != null) {
group = MultiVerseCore.Permissions.getGroup(p.getName(), p.getWorld().getName());
if (MultiverseCore.Permissions != null) {
group = MultiverseCore.Permissions.getGroup(p.getName(), p.getWorld().getName());
}
List<String> whiteList = this.plugin.worlds.get(w.getName()).joinWhitelist;

View File

@ -1,4 +1,4 @@
package com.onarandombox.MultiVerseCore;
package com.onarandombox.MultiverseCore;
import org.bukkit.Location;
import org.bukkit.entity.Player;
@ -10,9 +10,9 @@ import org.bukkit.event.player.PlayerRespawnEvent;
public class MVPlayerListener extends PlayerListener {
MultiVerseCore plugin;
MultiverseCore plugin;
public MVPlayerListener(MultiVerseCore plugin) {
public MVPlayerListener(MultiverseCore plugin) {
this.plugin = plugin;
}

View File

@ -1,4 +1,4 @@
package com.onarandombox.MultiVerseCore;
package com.onarandombox.MultiverseCore;
import java.util.Date;
@ -21,7 +21,7 @@ public class MVPlayerSession {
private Configuration config; // Configuration file to find out Cooldown Timers.
public MVPlayerSession(Player player, Configuration config, MultiVerseCore multiVerseCore) {
public MVPlayerSession(Player player, Configuration config, MultiverseCore multiVerseCore) {
this.player = player;
this.loc = player.getLocation();
this.config = config;

View File

@ -1,4 +1,4 @@
package com.onarandombox.MultiVerseCore;
package com.onarandombox.MultiverseCore;
import org.bukkit.event.server.PluginEvent;
import org.bukkit.event.server.ServerListener;
@ -9,9 +9,9 @@ import com.nijikokun.bukkit.Permissions.Permissions;
public class MVPluginListener extends ServerListener {
MultiVerseCore plugin;
MultiverseCore plugin;
public MVPluginListener(MultiVerseCore plugin) {
public MVPluginListener(MultiverseCore plugin) {
this.plugin = plugin;
}
@ -24,20 +24,20 @@ public class MVPluginListener extends ServerListener {
* Check to see if Permissions was just enabled, we only wan't to perform the following if GroupManager is not found.
*/
if (event.getPlugin().getDescription().getName().equals("Permissions")) {
MultiVerseCore.Permissions = ((Permissions) plugin.getServer().getPluginManager().getPlugin("Permissions")).getHandler();
MultiVerseCore.log.info(MultiVerseCore.logPrefix + "- Found Permissions");
MultiverseCore.Permissions = ((Permissions) plugin.getServer().getPluginManager().getPlugin("Permissions")).getHandler();
//MultiverseCore.log.info(MultiverseCore.logPrefix + "- Found Permissions");
}
/**
* Use the METHOD supplied by iConomy to register it etc...
*/
if (MultiVerseCore.getiConomy() == null) {
if (MultiverseCore.getiConomy() == null) {
Plugin iConomy = plugin.getServer().getPluginManager().getPlugin("iConomy");
if (iConomy != null) {
if (iConomy.isEnabled()) {
MultiVerseCore.iConomy = (iConomy) iConomy;
MultiVerseCore.log.info(MultiVerseCore.logPrefix + "- Found iConomy");
MultiverseCore.iConomy = (iConomy) iConomy;
//MultiverseCore.log.info(MultiverseCore.logPrefix + "- Found iConomy");
}
}
}
@ -51,16 +51,16 @@ public class MVPluginListener extends ServerListener {
* Check to see if Permissions just disabled.
*/
if (event.getPlugin().getDescription().getName().equals("Permissions")) {
MultiVerseCore.Permissions = null;
MultiVerseCore.log.info(MultiVerseCore.logPrefix + "- Permissions has been Disabled");
MultiverseCore.Permissions = null;
//MultiverseCore.log.info(MultiverseCore.logPrefix + "- Permissions has been Disabled");
}
/**
* Check to see if iConomy just disabled.
*/
if (MultiVerseCore.getiConomy() != null) {
MultiVerseCore.iConomy = null;
MultiVerseCore.log.info(MultiVerseCore.logPrefix + "- iConom has been Disabled");
if (MultiverseCore.getiConomy() != null) {
MultiverseCore.iConomy = null;
//MultiverseCore.log.info(MultiverseCore.logPrefix + "- iConom has been Disabled");
}
}

View File

@ -1,4 +1,4 @@
package com.onarandombox.MultiVerseCore;
package com.onarandombox.MultiverseCore;
import java.util.ArrayList;
@ -12,11 +12,11 @@ import com.onarandombox.utils.BlockSafety;
public class MVTeleport {
MultiVerseCore plugin;
MultiverseCore plugin;
BlockSafety bs = new BlockSafety();
public MVTeleport(MultiVerseCore plugin) {
public MVTeleport(MultiverseCore plugin) {
this.plugin = plugin;
}
@ -39,7 +39,7 @@ public class MVTeleport {
double srcComp = plugin.worlds.get(l.getWorld().getName()).compression;
double trgComp = plugin.worlds.get(w.getName()).compression;
MultiVerseCore.debugMsg(p.getName() + " -> " + p.getWorld().getName() + "(" + srcComp + ") -> " + w.getName() + "(" + trgComp + ")");
//MultiverseCore.debugMsg(p.getName() + " -> " + p.getWorld().getName() + "(" + srcComp + ") -> " + w.getName() + "(" + trgComp + ")");
// If the Targets Compression is 0 then we teleport them to the Spawn of the World.
if (trgComp == 0.0) {
@ -105,11 +105,11 @@ public class MVTeleport {
}
if (aux == -1) {
MultiVerseCore.debugMsg("Uh oh, no safe location.");
//MultiverseCore.debugMsg("Uh oh, no safe location.");
return null;
}
MultiVerseCore.debugMsg("Target location (safe): " + x + ", " + aux + ", " + z);
//MultiverseCore.debugMsg("Target location (safe): " + x + ", " + aux + ", " + z);
return new Location(w, x, aux, z);
}

View File

@ -1,4 +1,4 @@
package com.onarandombox.MultiVerseCore;
package com.onarandombox.MultiverseCore;
import java.util.ArrayList;
import java.util.List;
@ -10,7 +10,7 @@ import org.bukkit.util.config.Configuration;
@SuppressWarnings("unused")
public class MVWorld {
private MultiVerseCore plugin; // Hold the Plugin Instance.
private MultiverseCore plugin; // Hold the Plugin Instance.
private Configuration config; // Hold the Configuration File.
public World world; // The World Instance.
@ -36,7 +36,7 @@ public class MVWorld {
public Double compression; // How stretched/compressed distances are
public MVWorld(World world, Configuration config, MultiVerseCore instance) {
public MVWorld(World world, Configuration config, MultiverseCore instance) {
this.config = config;
this.plugin = instance;

View File

@ -1,4 +1,4 @@
package com.onarandombox.MultiVerseCore;
package com.onarandombox.MultiverseCore;
import java.io.File;
import java.util.ArrayList;
@ -6,6 +6,7 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.bukkit.Server;
@ -25,30 +26,34 @@ import org.bukkit.util.config.Configuration;
import com.nijiko.coelho.iConomy.iConomy;
import com.nijiko.permissions.PermissionHandler;
import com.nijikokun.bukkit.Permissions.Permissions;
import com.onarandombox.MultiVerseCore.commands.MVCoord;
import com.onarandombox.MultiVerseCore.commands.MVCreate;
import com.onarandombox.MultiVerseCore.commands.MVImport;
import com.onarandombox.MultiVerseCore.commands.MVList;
import com.onarandombox.MultiVerseCore.commands.MVModify;
import com.onarandombox.MultiVerseCore.commands.MVReload;
import com.onarandombox.MultiVerseCore.commands.MVRemove;
import com.onarandombox.MultiVerseCore.commands.MVSetSpawn;
import com.onarandombox.MultiVerseCore.commands.MVSpawn;
import com.onarandombox.MultiVerseCore.commands.MVTP;
import com.onarandombox.MultiVerseCore.commands.MVWho;
import com.onarandombox.MultiVerseCore.configuration.DefaultConfiguration;
import com.onarandombox.MultiverseCore.commands.MVCoord;
import com.onarandombox.MultiverseCore.commands.MVCreate;
import com.onarandombox.MultiverseCore.commands.MVImport;
import com.onarandombox.MultiverseCore.commands.MVList;
import com.onarandombox.MultiverseCore.commands.MVModify;
import com.onarandombox.MultiverseCore.commands.MVReload;
import com.onarandombox.MultiverseCore.commands.MVRemove;
import com.onarandombox.MultiverseCore.commands.MVSetSpawn;
import com.onarandombox.MultiverseCore.commands.MVSpawn;
import com.onarandombox.MultiverseCore.commands.MVTP;
import com.onarandombox.MultiverseCore.commands.MVWho;
import com.onarandombox.MultiverseCore.configuration.DefaultConfiguration;
import com.onarandombox.utils.DebugLog;
import com.onarandombox.utils.Messaging;
import com.onarandombox.utils.UpdateChecker;
public class MultiVerseCore extends JavaPlugin {
public class MultiverseCore extends JavaPlugin {
// Setup our Map for our Commands using the CommandHandler.
private Map<String, MVCommandHandler> commands = new HashMap<String, MVCommandHandler>();
// Variable to state whether we are displaying Debug Messages or not.
public static boolean debug = true;
// Useless stuff to keep us going.
public static final Logger log = Logger.getLogger("Minecraft");
private static final Logger log = Logger.getLogger("Minecraft");
private static DebugLog debugLog;
public static final String logPrefix = "[MultiVerse-Core] ";
public static Plugin instance;
public static Server server;
@ -56,8 +61,11 @@ public class MultiVerseCore extends JavaPlugin {
// Setup a variable to hold our DataFolder which will house everything to do with MultiVerse
// Using this instead of getDataFolder(), allows all modules to use the same direectory.
public static final File dataFolder = new File("plugins" + File.separator + "MultiVerse");
public static final File dataFolder = new File("plugins" + File.separator + "Multiverse");
// Messaging
private Messaging messaging = new Messaging();
// MultiVerse Permissions Handler
public MVPermissions ph = new MVPermissions(this);
@ -86,11 +94,10 @@ public class MultiVerseCore extends JavaPlugin {
// HashMap to contain information relating to the Players.
public HashMap<String, MVPlayerSession> playerSessions = new HashMap<String, MVPlayerSession>();
/**
* Constructor... Perform the Necessary tasks here.
*/
public MultiVerseCore() {
@Override
public void onLoad() {
dataFolder.mkdirs();
debugLog = new DebugLog("Multiverse", dataFolder + File.separator + "debug.log");
}
/**
@ -121,7 +128,7 @@ public class MultiVerseCore extends JavaPlugin {
setupCommands();
// Start the Update Checker
updateCheck = new UpdateChecker(this.getDescription().getName(), this.getDescription().getVersion());
//updateCheck = new UpdateChecker(this.getDescription().getName(), this.getDescription().getVersion());
}
/**
@ -153,10 +160,10 @@ public class MultiVerseCore extends JavaPlugin {
private void setupPermissions() {
Plugin p = this.getServer().getPluginManager().getPlugin("Permissions");
if (MultiVerseCore.Permissions == null) {
if (MultiverseCore.Permissions == null) {
if (p != null && p.isEnabled()) {
MultiVerseCore.Permissions = ((Permissions) p).getHandler();
MultiVerseCore.log.info(logPrefix + "- Attached to Permissions");
MultiverseCore.Permissions = ((Permissions) p).getHandler();
MultiverseCore.log.info(logPrefix + "- Attached to Permissions");
}
}
}
@ -167,9 +174,9 @@ public class MultiVerseCore extends JavaPlugin {
private void setupiConomy() {
Plugin test = this.getServer().getPluginManager().getPlugin("iConomy");
if (MultiVerseCore.iConomy == null) {
if (MultiverseCore.iConomy == null) {
if (test != null) {
MultiVerseCore.iConomy = (iConomy) test;
MultiverseCore.iConomy = (iConomy) test;
}
}
}
@ -191,18 +198,18 @@ public class MultiVerseCore extends JavaPlugin {
configMV.load();
log.info(logPrefix + "- MultiVerse Config -- Loaded");
} catch (Exception e) {
log.info(MultiVerseCore.logPrefix + "- Failed to load config.yml");
log.info(MultiverseCore.logPrefix + "- Failed to load config.yml");
}
try {
configWorlds.load();
log.info(logPrefix + "- World Config -- Loaded");
} catch (Exception e) {
log.info(MultiVerseCore.logPrefix + "- Failed to load worlds.yml");
log.info(MultiverseCore.logPrefix + "- Failed to load worlds.yml");
}
// Setup the Debug option, we'll default to false because this option will not be in the default config.
MultiVerseCore.debug = configMV.getBoolean("debug", false);
MultiverseCore.debug = configMV.getBoolean("debug", false);
}
/**
@ -254,7 +261,7 @@ public class MultiVerseCore extends JavaPlugin {
public void loadWorlds() {
// Basic Counter to count how many Worlds we are loading.
int count = 0;
List<String> worldKeys = MultiVerseCore.configWorlds.getKeys("worlds"); // Grab all the Worlds from the Config.
List<String> worldKeys = MultiverseCore.configWorlds.getKeys("worlds"); // Grab all the Worlds from the Config.
if (worldKeys != null) {
for (String worldKey : worldKeys) {
@ -263,7 +270,7 @@ public class MultiVerseCore extends JavaPlugin {
continue;
}
String wEnvironment = MultiVerseCore.configWorlds.getString("worlds." + worldKey + ".environment", "NORMAL"); // Grab the Environment as a String.
String wEnvironment = MultiverseCore.configWorlds.getString("worlds." + worldKey + ".environment", "NORMAL"); // Grab the Environment as a String.
Environment env;
if (wEnvironment.equalsIgnoreCase("NETHER")) // Check if the selected Environment is NETHER, otherwise we just default to NORMAL.
@ -275,7 +282,7 @@ public class MultiVerseCore extends JavaPlugin {
World world = getServer().createWorld(worldKey, env);
worlds.put(worldKey, new MVWorld(world, MultiVerseCore.configWorlds, this)); // Place the World into the HashMap.
worlds.put(worldKey, new MVWorld(world, MultiverseCore.configWorlds, this)); // Place the World into the HashMap.
count++; // Increment the World Count.
}
@ -288,7 +295,7 @@ public class MultiVerseCore extends JavaPlugin {
*/
@Override
public void onDisable() {
MultiVerseCore.Permissions = null;
MultiverseCore.Permissions = null;
log.info(logPrefix + "- Disabled");
}
@ -301,7 +308,7 @@ public class MultiVerseCore extends JavaPlugin {
if (playerSessions.containsKey(player.getName())) {
return playerSessions.get(player.getName());
} else {
playerSessions.put(player.getName(), new MVPlayerSession(player, MultiVerseCore.configMV, this));
playerSessions.put(player.getName(), new MVPlayerSession(player, MultiverseCore.configMV, this));
return playerSessions.get(player.getName());
}
}
@ -329,13 +336,6 @@ public class MultiVerseCore extends JavaPlugin {
return this.ph;
}
/**
* This fires before plugins get Enabled... Not needed but saves Console Spam.
*/
@Override
public void onLoad() {
}
/**
* onCommand
*/
@ -356,19 +356,31 @@ public class MultiVerseCore extends JavaPlugin {
}
/**
* Basic Debug Output function, if we've enabled debugging we'll output more information.
* Print messages to the server Log as well as to our DebugLog.
* 'debugLog' is used to seperate Heroes information from the Servers Log Output.
* @param level
* @param msg
*/
public static void debugMsg(String msg) {
debugMsg(msg, null);
public void log(Level level, String msg) {
log.log(level, "[Multiverse-Core] " + msg);
debugLog.log(level, "[Multiverse-Core] " + msg);
}
public static void debugMsg(String msg, Player p) {
if (debug) {
log.info(msg);
if (p != null) {
p.sendMessage(msg);
}
/**
* Print messages to the Debug Log, if the servers in Debug Mode then we
* also wan't to print the messages to the standard Server Console.
* @param level
* @param msg
*/
public void debugLog(Level level, String msg) {
if (MultiverseCore.debug) {
log.log(level, "[Debug] " + msg);
}
debugLog.log(level, "[Debug] " + msg);
}
public Messaging getMessaging() {
return messaging;
}
/**

View File

@ -1,21 +1,20 @@
package com.onarandombox.MultiVerseCore.commands;
package com.onarandombox.MultiverseCore.commands;
import org.bukkit.ChatColor;
import org.bukkit.Material;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import com.onarandombox.MultiVerseCore.MVCommandHandler;
import com.onarandombox.MultiVerseCore.MultiVerseCore;
import com.onarandombox.MultiverseCore.MVCommandHandler;
import com.onarandombox.MultiverseCore.MultiverseCore;
import com.onarandombox.utils.LocationManipulation;
public class MVCoord extends MVCommandHandler {
private LocationManipulation locMan = new LocationManipulation();
public MVCoord(MultiVerseCore plugin) {
public MVCoord(MultiverseCore plugin) {
super(plugin);
// TODO Auto-generated constructor stub
}
@Override

View File

@ -1,4 +1,4 @@
package com.onarandombox.MultiVerseCore.commands;
package com.onarandombox.MultiverseCore.commands;
import java.io.File;
@ -6,12 +6,12 @@ import org.bukkit.ChatColor;
import org.bukkit.World.Environment;
import org.bukkit.command.CommandSender;
import com.onarandombox.MultiVerseCore.MVCommandHandler;
import com.onarandombox.MultiVerseCore.MultiVerseCore;
import com.onarandombox.MultiverseCore.MVCommandHandler;
import com.onarandombox.MultiverseCore.MultiverseCore;
public class MVCreate extends MVCommandHandler {
public MVCreate(MultiVerseCore plugin) {
public MVCreate(MultiverseCore plugin) {
super(plugin);
}

View File

@ -1,13 +1,13 @@
package com.onarandombox.MultiVerseCore.commands;
package com.onarandombox.MultiverseCore.commands;
import org.bukkit.command.CommandSender;
import com.onarandombox.MultiVerseCore.MVCommandHandler;
import com.onarandombox.MultiVerseCore.MultiVerseCore;
import com.onarandombox.MultiverseCore.MVCommandHandler;
import com.onarandombox.MultiverseCore.MultiverseCore;
public class MVImport extends MVCommandHandler {
public MVImport(MultiVerseCore plugin) {
public MVImport(MultiverseCore plugin) {
super(plugin);
// TODO Auto-generated constructor stub
}

View File

@ -1,4 +1,4 @@
package com.onarandombox.MultiVerseCore.commands;
package com.onarandombox.MultiverseCore.commands;
import org.bukkit.ChatColor;
import org.bukkit.World;
@ -6,12 +6,12 @@ import org.bukkit.World.Environment;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import com.onarandombox.MultiVerseCore.MVCommandHandler;
import com.onarandombox.MultiVerseCore.MultiVerseCore;
import com.onarandombox.MultiverseCore.MVCommandHandler;
import com.onarandombox.MultiverseCore.MultiverseCore;
public class MVList extends MVCommandHandler {
public MVList(MultiVerseCore plugin) {
public MVList(MultiverseCore plugin) {
super(plugin);
}

View File

@ -1,13 +1,13 @@
package com.onarandombox.MultiVerseCore.commands;
package com.onarandombox.MultiverseCore.commands;
import org.bukkit.command.CommandSender;
import com.onarandombox.MultiVerseCore.MVCommandHandler;
import com.onarandombox.MultiVerseCore.MultiVerseCore;
import com.onarandombox.MultiverseCore.MVCommandHandler;
import com.onarandombox.MultiverseCore.MultiverseCore;
public class MVModify extends MVCommandHandler {
public MVModify(MultiVerseCore plugin) {
public MVModify(MultiverseCore plugin) {
super(plugin);
// TODO Auto-generated constructor stub
}

View File

@ -1,4 +1,4 @@
package com.onarandombox.MultiVerseCore.commands;
package com.onarandombox.MultiverseCore.commands;
import java.util.ArrayList;
import java.util.List;
@ -6,13 +6,13 @@ import java.util.List;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import com.onarandombox.MultiVerseCore.MVCommandHandler;
import com.onarandombox.MultiVerseCore.MultiVerseCore;
import com.onarandombox.MultiverseCore.MVCommandHandler;
import com.onarandombox.MultiverseCore.MultiverseCore;
import com.onarandombox.utils.PurgeWorlds;
public class MVPurge extends MVCommandHandler {
public MVPurge(MultiVerseCore plugin) {
public MVPurge(MultiverseCore plugin) {
super(plugin);
}

View File

@ -0,0 +1,26 @@
package com.onarandombox.MultiverseCore.commands;
import java.util.logging.Level;
import org.bukkit.command.CommandSender;
import com.onarandombox.MultiverseCore.MVCommandHandler;
import com.onarandombox.MultiverseCore.MultiverseCore;
public class MVReload extends MVCommandHandler {
public MVReload(MultiverseCore plugin) {
super(plugin);
}
@Override
public boolean perform(CommandSender sender, String[] args) {
// TODO: Implement Permissions
plugin.log(Level.INFO, "Reloading Multiverse-Core config");
plugin.loadConfigs();
plugin.loadWorlds();
plugin.log(Level.INFO, "Reload Complete!");
return true;
}
}

View File

@ -1,13 +1,13 @@
package com.onarandombox.MultiVerseCore.commands;
package com.onarandombox.MultiverseCore.commands;
import org.bukkit.command.CommandSender;
import com.onarandombox.MultiVerseCore.MVCommandHandler;
import com.onarandombox.MultiVerseCore.MultiVerseCore;
import com.onarandombox.MultiverseCore.MVCommandHandler;
import com.onarandombox.MultiverseCore.MultiverseCore;
public class MVRemove extends MVCommandHandler {
public MVRemove(MultiVerseCore plugin) {
public MVRemove(MultiverseCore plugin) {
super(plugin);
// TODO Auto-generated constructor stub
}

View File

@ -1,16 +1,16 @@
package com.onarandombox.MultiVerseCore.commands;
package com.onarandombox.MultiverseCore.commands;
import org.bukkit.Location;
import org.bukkit.World;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import com.onarandombox.MultiVerseCore.MVCommandHandler;
import com.onarandombox.MultiVerseCore.MultiVerseCore;
import com.onarandombox.MultiverseCore.MVCommandHandler;
import com.onarandombox.MultiverseCore.MultiverseCore;
public class MVSetSpawn extends MVCommandHandler {
public MVSetSpawn(MultiVerseCore plugin) {
public MVSetSpawn(MultiverseCore plugin) {
super(plugin);
}

View File

@ -1,14 +1,14 @@
package com.onarandombox.MultiVerseCore.commands;
package com.onarandombox.MultiverseCore.commands;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import com.onarandombox.MultiVerseCore.MVCommandHandler;
import com.onarandombox.MultiVerseCore.MultiVerseCore;
import com.onarandombox.MultiverseCore.MVCommandHandler;
import com.onarandombox.MultiverseCore.MultiverseCore;
public class MVSpawn extends MVCommandHandler {
public MVSpawn(MultiVerseCore plugin) {
public MVSpawn(MultiverseCore plugin) {
super(plugin);
}

View File

@ -1,13 +1,13 @@
package com.onarandombox.MultiVerseCore.commands;
package com.onarandombox.MultiverseCore.commands;
import org.bukkit.command.CommandSender;
import com.onarandombox.MultiVerseCore.MVCommandHandler;
import com.onarandombox.MultiVerseCore.MultiVerseCore;
import com.onarandombox.MultiverseCore.MVCommandHandler;
import com.onarandombox.MultiverseCore.MultiverseCore;
public class MVTP extends MVCommandHandler {
public MVTP(MultiVerseCore plugin) {
public MVTP(MultiverseCore plugin) {
super(plugin);
// TODO Auto-generated constructor stub
}

View File

@ -1,4 +1,4 @@
package com.onarandombox.MultiVerseCore.commands;
package com.onarandombox.MultiverseCore.commands;
import java.util.ArrayList;
import java.util.List;
@ -9,12 +9,12 @@ import org.bukkit.World.Environment;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import com.onarandombox.MultiVerseCore.MVCommandHandler;
import com.onarandombox.MultiVerseCore.MultiVerseCore;
import com.onarandombox.MultiverseCore.MVCommandHandler;
import com.onarandombox.MultiverseCore.MultiverseCore;
public class MVWho extends MVCommandHandler {
public MVWho(MultiVerseCore plugin) {
public MVWho(MultiverseCore plugin) {
super(plugin);
}

View File

@ -1,4 +1,4 @@
package com.onarandombox.MultiVerseCore.configuration;
package com.onarandombox.MultiverseCore.configuration;
import java.io.BufferedReader;
import java.io.BufferedWriter;
@ -10,7 +10,7 @@ import java.io.FileWriter;
import java.io.InputStream;
import java.io.InputStreamReader;
import com.onarandombox.MultiVerseCore.MultiVerseCore;
import com.onarandombox.MultiverseCore.MultiverseCore;
/**
* https://github.com/Nijikokun/iConomy3/blob/master/com/nijiko/coelho/iConomy/iConomy.java
@ -39,7 +39,7 @@ public class DefaultConfiguration {
output.write(buf, 0, length);
}
MultiVerseCore.log.info(MultiVerseCore.logPrefix + "Default config file written: " + name);
//MultiverseCore.log.info(MultiverseCore.logPrefix + "Default config file written: " + name);
} catch (Exception e) {
e.printStackTrace();
} finally {

View File

@ -19,13 +19,13 @@ import org.bukkit.entity.Spider;
import org.bukkit.entity.Squid;
import org.bukkit.entity.Zombie;
import com.onarandombox.MultiVerseCore.MultiVerseCore;
import com.onarandombox.MultiverseCore.MultiverseCore;
public class PurgeWorlds {
MultiVerseCore plugin;
MultiverseCore plugin;
public PurgeWorlds(MultiVerseCore plugin) {
public PurgeWorlds(MultiverseCore plugin) {
this.plugin = plugin;
}

View File

@ -1,6 +1,6 @@
name: MultiVerse-Core
main: com.onarandombox.MultiVerseCore.MultiVerseCore
authors: ['Rigby','Protected']
name: Multiverse-Core
main: com.onarandombox.MultiverseCore.MultiverseCore
authors: ['Rigby', 'Herocraft Coding Team']
version: 2.0
commands:
mvcreate: