mirror of
https://github.com/essentials/Essentials.git
synced 2025-09-24 21:31:32 +02:00
Working with ico 5.0 plugins. Not sure about banks . . no plugins to test it with . . . yet! Reverse compatability broken, ico decided to switch packages.
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1327 e251c2fe-e539-e718-e476-b85c1f46cddb
This commit is contained in:
@@ -1,12 +1,8 @@
|
||||
package com.nijiko.coelho.iConomy;
|
||||
|
||||
import com.earth2me.essentials.Essentials;
|
||||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
import com.nijiko.coelho.iConomy.system.Bank;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
import org.bukkit.plugin.Plugin;
|
||||
import org.bukkit.plugin.PluginManager;
|
||||
|
||||
|
||||
/**
|
||||
* This is not iConomy and I take NO credit for iConomy!
|
||||
@@ -14,42 +10,10 @@ import org.bukkit.plugin.PluginManager;
|
||||
* @author Xeology
|
||||
*/
|
||||
|
||||
public class iConomy extends JavaPlugin
|
||||
{
|
||||
public static Bank Bank = null;
|
||||
public class iConomy{
|
||||
public static Bank Bank = new Bank();
|
||||
private static final Logger logger = Logger.getLogger("Minecraft");
|
||||
|
||||
@Override
|
||||
public void onDisable()
|
||||
{
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onEnable()
|
||||
{
|
||||
PluginManager pm = this.getServer().getPluginManager();
|
||||
Plugin p = pm.getPlugin("Essentials");
|
||||
if (p != null)
|
||||
{
|
||||
if (!pm.isPluginEnabled(p))
|
||||
{
|
||||
pm.enablePlugin(p);
|
||||
}
|
||||
}
|
||||
|
||||
String version = this.getDescription().getDescription().replaceAll(".*: ", "");
|
||||
if (!version.equals(Essentials.getStatic().getDescription().getVersion()))
|
||||
{
|
||||
logger.log(Level.WARNING, "Version mismatch! Please update all Essentials jars to the same version.");
|
||||
}
|
||||
Essentials.getStatic().setIConomyFallback(false);
|
||||
|
||||
Bank = new Bank();
|
||||
|
||||
logger.info("Loaded " + this.getDescription().getDescription() + " by " + Essentials.AUTHORS);
|
||||
logger.info("Make sure you don't have iConomy installed, if you use this.");
|
||||
}
|
||||
|
||||
//Fake bank
|
||||
public static Bank getBank()
|
||||
{
|
||||
|
Reference in New Issue
Block a user