Main Class Renamed and Instance Method

This commit is contained in:
Driftay
2019-08-02 17:01:33 -04:00
parent 477041e223
commit f2892fdef3
121 changed files with 665 additions and 675 deletions

View File

@@ -3,7 +3,7 @@ package com.massivecraft.factions.integration;
import com.massivecraft.factions.Conf;
import com.massivecraft.factions.FPlayer;
import com.massivecraft.factions.Faction;
import com.massivecraft.factions.SaberFactions;
import com.massivecraft.factions.P;
import com.massivecraft.factions.iface.EconomyParticipator;
import com.massivecraft.factions.struct.Permission;
import com.massivecraft.factions.struct.Role;
@@ -34,24 +34,24 @@ public class Econ {
String integrationFail = "Economy integration is " + (Conf.econEnabled ? "enabled, but" : "disabled, and") + " the plugin \"Vault\" ";
if (Bukkit.getServer().getPluginManager().getPlugin("Vault") == null) {
SaberFactions.plugin.log(integrationFail + "is not installed.");
P.p.log(integrationFail + "is not installed.");
return;
}
RegisteredServiceProvider<Economy> rsp = Bukkit.getServer().getServicesManager().getRegistration(Economy.class);
if (rsp == null) {
SaberFactions.plugin.log(integrationFail + "is not hooked into an economy plugin.");
P.p.log(integrationFail + "is not hooked into an economy plugin.");
return;
}
econ = rsp.getProvider();
SaberFactions.plugin.log("Economy integration through Vault plugin successful.");
P.p.log("Economy integration through Vault plugin successful.");
if (!Conf.econEnabled) {
SaberFactions.plugin.log("NOTE: Economy is disabled. You can enable it with the command: f config econEnabled true");
P.p.log("NOTE: Economy is disabled. You can enable it with the command: f config econEnabled true");
}
SaberFactions.plugin.cmdBase.cmdHelp.updateHelp();
P.p.cmdBase.cmdHelp.updateHelp();
}
public static boolean shouldBeUsed() {
@@ -82,7 +82,7 @@ public class Econ {
public static void sendBalanceInfo(FPlayer to, EconomyParticipator about) {
if (!shouldBeUsed()) {
SaberFactions.plugin.log(Level.WARNING, "Vault does not appear to be hooked into an economy plugin.");
P.p.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())));

View File

@@ -1,7 +1,7 @@
package com.massivecraft.factions.integration;
import com.massivecraft.factions.FLocation;
import com.massivecraft.factions.SaberFactions;
import com.massivecraft.factions.P;
import com.sk89q.worldedit.BlockVector;
import com.sk89q.worldedit.Vector;
import com.sk89q.worldguard.bukkit.WorldGuardPlugin;
@@ -38,11 +38,11 @@ public class Worldguard {
if (wgplug == null || !(wgplug instanceof WorldGuardPlugin)) {
enabled = false;
wg = null;
SaberFactions.plugin.log("Could not hook to WorldGuard. WorldGuard checks are disabled.");
P.p.log("Could not hook to WorldGuard. WorldGuard checks are disabled.");
} else {
wg = (WorldGuardPlugin) wgplug;
enabled = true;
SaberFactions.plugin.log("Successfully hooked to WorldGuard.");
P.p.log("Successfully hooked to WorldGuard.");
}
}

View File

@@ -113,7 +113,7 @@ public class EngineDynmap {
}
// Shedule non thread safe sync at the end!
Bukkit.getScheduler().scheduleSyncRepeatingTask(SaberFactions.plugin, () -> {
Bukkit.getScheduler().scheduleSyncRepeatingTask(P.p, () -> {
final Map<String, TempMarker> homes = createHomes();
final Map<String, TempAreaMarker> areas = createAreas();