MCorify the MPlugin class Factions slightly.
This commit is contained in:
@ -32,22 +32,22 @@ public class Econ
|
||||
|
||||
if (Bukkit.getServer().getPluginManager().getPlugin("Vault") == null)
|
||||
{
|
||||
Factions.p.log(integrationFail+"is not installed.");
|
||||
Factions.get().log(integrationFail+"is not installed.");
|
||||
return;
|
||||
}
|
||||
|
||||
RegisteredServiceProvider<Economy> rsp = Bukkit.getServer().getServicesManager().getRegistration(Economy.class);
|
||||
if (rsp == null)
|
||||
{
|
||||
Factions.p.log(integrationFail+"is not hooked into an economy plugin.");
|
||||
Factions.get().log(integrationFail+"is not hooked into an economy plugin.");
|
||||
return;
|
||||
}
|
||||
econ = rsp.getProvider();
|
||||
|
||||
Factions.p.log("Economy integration through Vault plugin successful.");
|
||||
Factions.get().log("Economy integration through Vault plugin successful.");
|
||||
|
||||
if ( ! Conf.econEnabled)
|
||||
Factions.p.log("NOTE: Economy is disabled. You can enable it with the command: f config econEnabled true");
|
||||
Factions.get().log("NOTE: Economy is disabled. You can enable it with the command: f config econEnabled true");
|
||||
|
||||
oldMoneyDoTransfer();
|
||||
}
|
||||
@ -78,7 +78,7 @@ public class Econ
|
||||
{
|
||||
if (!shouldBeUsed())
|
||||
{
|
||||
Factions.p.log(Level.WARNING, "Vault does not appear to be hooked into an economy plugin.");
|
||||
Factions.get().log(Level.WARNING, "Vault does not appear to be hooked into an economy plugin.");
|
||||
return;
|
||||
}
|
||||
to.msg("<a>%s's<i> balance is <h>%s<i>.", about.describeTo(to, true), Econ.moneyString(econ.getBalance(about.getAccountId())));
|
||||
|
@ -92,8 +92,8 @@ public class EssentialsFeatures
|
||||
essChat = instance;
|
||||
try
|
||||
{
|
||||
Bukkit.getServer().getPluginManager().registerEvents(new LocalChatListener(), Factions.p);
|
||||
Factions.p.log("Found and will integrate chat with newer "+essChat.getDescription().getFullName());
|
||||
Bukkit.getServer().getPluginManager().registerEvents(new LocalChatListener(), Factions.get());
|
||||
Factions.get().log("Found and will integrate chat with newer "+essChat.getDescription().getFullName());
|
||||
}
|
||||
catch (NoSuchMethodError ex)
|
||||
{
|
||||
|
@ -29,7 +29,7 @@ public class LWCFeatures
|
||||
if(test == null || !test.isEnabled()) return;
|
||||
|
||||
lwc = ((LWCPlugin)test).getLWC();
|
||||
Factions.p.log("Successfully hooked into LWC!"+(Conf.lwcIntegration ? "" : " Integration is currently disabled, though (\"lwcIntegration\")."));
|
||||
Factions.get().log("Successfully hooked into LWC!"+(Conf.lwcIntegration ? "" : " Integration is currently disabled, though (\"lwcIntegration\")."));
|
||||
}
|
||||
|
||||
public static boolean getEnabled()
|
||||
|
@ -50,9 +50,9 @@ public class SpoutFeatures
|
||||
if (enabled == true) return true;
|
||||
enabled = true;
|
||||
|
||||
Factions.p.log("Found and will use features of "+plugin.getDescription().getFullName());
|
||||
Factions.get().log("Found and will use features of "+plugin.getDescription().getFullName());
|
||||
mainListener = new SpoutMainListener();
|
||||
Bukkit.getPluginManager().registerEvents(mainListener, Factions.p);
|
||||
Bukkit.getPluginManager().registerEvents(mainListener, Factions.get());
|
||||
|
||||
return true;
|
||||
}
|
||||
@ -112,7 +112,7 @@ public class SpoutFeatures
|
||||
|
||||
public static void updateCapeShortly(final Object ofrom, final Object oto)
|
||||
{
|
||||
Factions.p.getServer().getScheduler().scheduleSyncDelayedTask(Factions.p, new Runnable()
|
||||
Factions.get().getServer().getScheduler().scheduleSyncDelayedTask(Factions.get(), new Runnable()
|
||||
{
|
||||
@Override
|
||||
public void run()
|
||||
@ -168,7 +168,7 @@ public class SpoutFeatures
|
||||
|
||||
public static void updateTitleShortly(final Object ofrom, final Object oto)
|
||||
{
|
||||
Factions.p.getServer().getScheduler().scheduleSyncDelayedTask(Factions.p, new Runnable()
|
||||
Factions.get().getServer().getScheduler().scheduleSyncDelayedTask(Factions.get(), new Runnable()
|
||||
{
|
||||
@Override
|
||||
public void run()
|
||||
|
@ -107,7 +107,7 @@ public class SpoutMainListener implements Listener
|
||||
label.setWidth(1).setHeight(1); // prevent Spout's questionable new "no default size" warning
|
||||
label.setScale(Conf.spoutTerritoryDisplaySize);
|
||||
|
||||
sPlayer.getMainScreen().attachWidget(Factions.p, label);
|
||||
sPlayer.getMainScreen().attachWidget(Factions.get(), label);
|
||||
territoryLabels.put(player.getName(), label);
|
||||
}
|
||||
|
||||
@ -135,7 +135,7 @@ public class SpoutMainListener implements Listener
|
||||
label.setWidth(1).setHeight(1); // prevent Spout's questionable new "no default size" warning
|
||||
label.setScale(Conf.spoutTerritoryNoticeSize);
|
||||
label.setY(Conf.spoutTerritoryNoticeTop);
|
||||
sPlayer.getMainScreen().attachWidget(Factions.p, label);
|
||||
sPlayer.getMainScreen().attachWidget(Factions.get(), label);
|
||||
territoryChangeLabels.put(player.getName(), label);
|
||||
}
|
||||
|
||||
@ -172,7 +172,7 @@ public class SpoutMainListener implements Listener
|
||||
label.setWidth(1).setHeight(1); // prevent Spout's questionable new "no default size" warning
|
||||
label.setScale(Conf.spoutTerritoryDisplaySize);
|
||||
label.setY((int)(10 * Conf.spoutTerritoryDisplaySize));
|
||||
sPlayer.getMainScreen().attachWidget(Factions.p, label);
|
||||
sPlayer.getMainScreen().attachWidget(Factions.get(), label);
|
||||
accessLabels.put(player.getName(), label);
|
||||
}
|
||||
|
||||
|
@ -39,13 +39,13 @@ public class Worldguard
|
||||
{
|
||||
enabled = false;
|
||||
wg = null;
|
||||
Factions.p.log("Could not hook to WorldGuard. WorldGuard checks are disabled.");
|
||||
Factions.get().log("Could not hook to WorldGuard. WorldGuard checks are disabled.");
|
||||
}
|
||||
else
|
||||
{
|
||||
wg = (WorldGuardPlugin) wgplug;
|
||||
enabled = true;
|
||||
Factions.p.log("Successfully hooked to WorldGuard.");
|
||||
Factions.get().log("Successfully hooked to WorldGuard.");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -13,7 +13,7 @@ public class HerochatFeatures implements Listener
|
||||
Plugin plug = Bukkit.getServer().getPluginManager().getPlugin("Herochat");
|
||||
if (plug == null) return;
|
||||
if (!plug.getClass().getName().equals("com.dthielke.herochat.Herochat")) return;
|
||||
Bukkit.getPluginManager().registerEvents(new HerochatListener(Factions.p), Factions.p);
|
||||
Factions.p.log("Integration with Herochat successful");
|
||||
Bukkit.getPluginManager().registerEvents(new HerochatListener(Factions.get()), Factions.get());
|
||||
Factions.get().log("Integration with Herochat successful");
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user