mirror of
https://github.com/MassiveCraft/Factions.git
synced 2024-12-29 12:07:59 +01:00
Delayed Vault economy integration not necessary after all; reverting added delay
This commit is contained in:
parent
d3645d3c95
commit
848d0463db
@ -99,7 +99,8 @@ public class P extends MPlugin
|
|||||||
//setupPermissions();
|
//setupPermissions();
|
||||||
integrateEssentialsChat();
|
integrateEssentialsChat();
|
||||||
setupSpout(this);
|
setupSpout(this);
|
||||||
Econ.initialSetup(this);
|
Econ.doSetup();
|
||||||
|
Econ.oldMoneyDoTransfer();
|
||||||
CapiFeatures.setup();
|
CapiFeatures.setup();
|
||||||
setupLWC();
|
setupLWC();
|
||||||
|
|
||||||
|
@ -33,35 +33,22 @@ public class Econ
|
|||||||
return econ != null;
|
return econ != null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void initialSetup(P p)
|
|
||||||
{
|
|
||||||
if (Bukkit.getServer().getPluginManager().getPlugin("Vault") == null)
|
|
||||||
{
|
|
||||||
P.p.log("Economy integration is "+(Conf.econEnabled ? "enabled, but" : "disabled, and")+" the plugin \"Vault\" is not installed.");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
p.getServer().getScheduler().scheduleSyncDelayedTask(p, new Runnable()
|
|
||||||
{
|
|
||||||
@Override
|
|
||||||
public void run()
|
|
||||||
{
|
|
||||||
doSetup();
|
|
||||||
oldMoneyDoTransfer();
|
|
||||||
}
|
|
||||||
}, 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void doSetup()
|
public static void doSetup()
|
||||||
{
|
{
|
||||||
if (isSetup()) return;
|
if (isSetup()) return;
|
||||||
|
|
||||||
if (Bukkit.getServer().getPluginManager().getPlugin("Vault") != null)
|
String integrationFail = "Economy integration is "+(Conf.econEnabled ? "enabled, but" : "disabled, and")+" the plugin \"Vault\" ";
|
||||||
|
|
||||||
|
if (Bukkit.getServer().getPluginManager().getPlugin("Vault") == null)
|
||||||
{
|
{
|
||||||
|
P.p.log(integrationFail+"is not installed.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
RegisteredServiceProvider<Economy> rsp = Bukkit.getServer().getServicesManager().getRegistration(Economy.class);
|
RegisteredServiceProvider<Economy> rsp = Bukkit.getServer().getServicesManager().getRegistration(Economy.class);
|
||||||
if (rsp == null)
|
if (rsp == null)
|
||||||
{
|
{
|
||||||
P.p.log("Economy integration is "+(Conf.econEnabled ? "enabled" : "disabled")+", but the plugin \"Vault\" is not hooked into an economy plugin.");
|
P.p.log(integrationFail+"is not hooked into an economy plugin.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
econ = rsp.getProvider();
|
econ = rsp.getProvider();
|
||||||
@ -69,12 +56,12 @@ public class Econ
|
|||||||
P.p.log("Economy integration through Vault plugin successful.");
|
P.p.log("Economy integration through Vault plugin successful.");
|
||||||
|
|
||||||
if ( ! Conf.econEnabled)
|
if ( ! Conf.econEnabled)
|
||||||
P.p.log("NOTE: Economy is disabled. Enable with command: f config econEnabled true");
|
P.p.log("NOTE: Economy is disabled. You can enable it with the command: f config econEnabled true");
|
||||||
}
|
|
||||||
|
|
||||||
P.p.cmdBase.cmdHelp.updateHelp();
|
P.p.cmdBase.cmdHelp.updateHelp();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public static void modifyUniverseMoney(double delta)
|
public static void modifyUniverseMoney(double delta)
|
||||||
{
|
{
|
||||||
if (!shouldBeUsed()) return;
|
if (!shouldBeUsed()) return;
|
||||||
|
Loading…
Reference in New Issue
Block a user