mirror of
https://github.com/Multiverse/Multiverse-Core.git
synced 2025-01-05 15:57:37 +01:00
Update more allpay libraries
This commit is contained in:
parent
f3c67390ce
commit
55b873ddea
@ -1 +1 @@
|
||||
Subproject commit 8380320e0f8653d0361cd344101ca8d3fd620042
|
||||
Subproject commit a1624c1ed3977fc3170df5e5b847355e1e054e11
|
@ -1,22 +1,23 @@
|
||||
package com.onarandombox.MultiverseCore;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.logging.Level;
|
||||
|
||||
import org.bukkit.event.server.PluginDisableEvent;
|
||||
import org.bukkit.event.server.PluginEnableEvent;
|
||||
import org.bukkit.event.server.ServerListener;
|
||||
import org.bukkit.plugin.Plugin;
|
||||
|
||||
import com.fernferret.allpay.AllPay;
|
||||
import com.nijikokun.bukkit.Permissions.Permissions;
|
||||
|
||||
public class MVPluginListener extends ServerListener {
|
||||
|
||||
|
||||
MultiverseCore plugin;
|
||||
|
||||
|
||||
public MVPluginListener(MultiverseCore plugin) {
|
||||
this.plugin = plugin;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Keep an eye out for Plugins which we can utilize.
|
||||
*/
|
||||
@ -29,21 +30,12 @@ public class MVPluginListener extends ServerListener {
|
||||
this.plugin.ph.setPermissions(((Permissions) this.plugin.getServer().getPluginManager().getPlugin("Permissions")).getHandler());
|
||||
this.plugin.log(Level.INFO, "- Attached to Permissions");
|
||||
}
|
||||
// TODO: Use AllPay
|
||||
/**
|
||||
* Use the METHOD supplied by iConomy to register it etc...
|
||||
*/
|
||||
if(event.getPlugin().getDescription().getName().equals("iConomy")) {
|
||||
//Plugin iConomy = this.plugin.getServer().getPluginManager().getPlugin("iConomy");
|
||||
|
||||
// if (iConomy != null) {
|
||||
// if (iConomy.isEnabled()) {
|
||||
// MultiverseCore.iConomy = (iConomy) iConomy;
|
||||
// }
|
||||
// }
|
||||
// Let AllPay handle all econ plugin loadings, only go for econ plugins we support
|
||||
if (Arrays.asList(AllPay.validEconPlugins).contains(event.getPlugin().getDescription().getName())) {
|
||||
this.plugin.bank = this.plugin.banker.loadEconPlugin();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* We'll check if any of the plugins we rely on decide to Disable themselves.
|
||||
*/
|
||||
@ -56,13 +48,7 @@ public class MVPluginListener extends ServerListener {
|
||||
this.plugin.log(Level.INFO, "Permissions disabled");
|
||||
this.plugin.ph.setPermissions(null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Check to see if iConomy just disabled.
|
||||
*/
|
||||
// if (MultiverseCore.getiConomy() != null) {
|
||||
// MultiverseCore.iConomy = null;
|
||||
// }
|
||||
// TODO: Disable econ when it disables.
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -21,6 +21,8 @@ import org.bukkit.plugin.PluginManager;
|
||||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
import org.bukkit.util.config.Configuration;
|
||||
|
||||
import com.fernferret.allpay.AllPay;
|
||||
import com.fernferret.allpay.GenericBank;
|
||||
import com.onarandombox.MultiverseCore.command.CommandManager;
|
||||
import com.onarandombox.MultiverseCore.command.commands.*;
|
||||
import com.onarandombox.MultiverseCore.configuration.DefaultConfiguration;
|
||||
@ -64,6 +66,8 @@ public class MultiverseCore extends JavaPlugin {
|
||||
// HashMap to contain information relating to the Players.
|
||||
public HashMap<String, MVPlayerSession> playerSessions = new HashMap<String, MVPlayerSession>();
|
||||
private PurgeWorlds worldPurger;
|
||||
public GenericBank bank = null;
|
||||
public AllPay banker = new AllPay(this, "[Multiverse-Core] ");;
|
||||
|
||||
@Override
|
||||
public void onLoad() {
|
||||
@ -84,6 +88,8 @@ public class MultiverseCore extends JavaPlugin {
|
||||
this.registerEvents();
|
||||
// Setup Permissions, we'll do an initial check for the Permissions plugin then fall back on isOP().
|
||||
this.ph = new MVPermissions(this);
|
||||
|
||||
this.bank = this.banker.loadEconPlugin();
|
||||
// Setup the command manager
|
||||
this.commandManager = new CommandManager(this);
|
||||
// Setup the world purger
|
||||
|
Loading…
Reference in New Issue
Block a user