commit 68107d9df8eee267bb3ff245a439f9ac5ce8ec6c Author: Simon Rigby Date: Tue Feb 22 00:55:37 2011 +0000 Basics diff --git a/src/com/onarandombox/MultiVerseCore/MultiVerseCore.java b/src/com/onarandombox/MultiVerseCore/MultiVerseCore.java new file mode 100644 index 00000000..ecc8086f --- /dev/null +++ b/src/com/onarandombox/MultiVerseCore/MultiVerseCore.java @@ -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); + } + } + } +} \ No newline at end of file diff --git a/src/plugin.yml b/src/plugin.yml new file mode 100644 index 00000000..546bf0e7 --- /dev/null +++ b/src/plugin.yml @@ -0,0 +1,35 @@ +name: MultiVerse-Core +main: com.onarandombox.MultiVerseCore.MultiVerseCore +author: Rigby +version: 0.1 +commands: + mvcreate: + description: World create command + usage: / + mvimport: + description: World import command + usage: / + mvremove: + description: World delete command + usage: / + mvmodify: + description: Modify the settings of an existing world + usage: / + mvtp: + description: Command to teleport between Worlds + usage: / + mvtpt: + description: Command to teleport a target to a World/Portal + usage: / + mvlist: + description: Print list of loaded Worlds + usage: / + mvsetspawn: + description: Set the spawn area for a particular World + usage: / + mvspawn: + description: Teleport to the spawn area + usage: / + mvcoord: + description: Display World and Coordinates + usage: / \ No newline at end of file