This commit is contained in:
Simon Rigby 2011-02-22 00:55:37 +00:00
commit 68107d9df8
2 changed files with 110 additions and 0 deletions

View File

@ -0,0 +1,75 @@
package com.onarandombox.MultiVerseCore;
import java.io.File;
import java.util.logging.Logger;
import org.bukkit.Server;
import org.bukkit.entity.Player;
import org.bukkit.plugin.Plugin;
import org.bukkit.plugin.PluginDescriptionFile;
import org.bukkit.plugin.PluginLoader;
import org.bukkit.plugin.java.JavaPlugin;
import org.bukkit.util.config.Configuration;
import com.nijikokun.bukkit.Permissions.Permissions;
import com.nijiko.permissions.PermissionHandler;
import com.nijikokun.bukkit.iConomy.iConomy;
@SuppressWarnings("unused")
public class MultiVerseCore extends JavaPlugin {
/**
* Variable for whether we are going to allow Debug Messages or not.
*/
public boolean debug = false;
/**
* Variable to hold the Server Instance.
*/
public static Server server;
/**
* Permissions Plugin
*/
public static PermissionHandler Permissions = null;
/**
* Setup the Logger, also set a public variable which contains the prefix
* for all log messages, this allows for easy change.
*/
private final Logger log = Logger.getLogger("Minecraft");
public final String logPrefix = "[MultiVerse-Core] ";
/**
* Variable to hold the Plugin instance.
*/
public static Plugin instance;
/**
* Variable to hold the Plugins Description
*/
public static PluginDescriptionFile description;
/**
* What happens when the plugin gets around to be enabled...
*/
@Override
public void onEnable() {
this.getDataFolder().mkdir();
/**
* Output a little snippet to state that the plugin is now enabled.
*/
log.info(logPrefix + "- Version " + this.getDescription().getVersion() + " Enabled");
}
/**
* What happens when the plugin gets disabled...
*/
@Override
public void onDisable() {
log.info(logPrefix + "- Disabled");
}
/**
* Basic Debug Output function, if we've enabled debugging we'll output more information.
*/
public void debugMsg(String msg, Player p){
if(this.debug){
log.info(msg);
if(p!=null){
p.sendMessage(msg);
}
}
}
}

35
src/plugin.yml Normal file
View File

@ -0,0 +1,35 @@
name: MultiVerse-Core
main: com.onarandombox.MultiVerseCore.MultiVerseCore
author: Rigby
version: 0.1
commands:
mvcreate:
description: World create command
usage: /<command>
mvimport:
description: World import command
usage: /<command>
mvremove:
description: World delete command
usage: /<command>
mvmodify:
description: Modify the settings of an existing world
usage: /<command>
mvtp:
description: Command to teleport between Worlds
usage: /<command>
mvtpt:
description: Command to teleport a target to a World/Portal
usage: /<command>
mvlist:
description: Print list of loaded Worlds
usage: /<command>
mvsetspawn:
description: Set the spawn area for a particular World
usage: /<command>
mvspawn:
description: Teleport to the spawn area
usage: /<command>
mvcoord:
description: Display World and Coordinates
usage: /<command>