Fixed NPE With Essentials for CMI users
This commit is contained in:
parent
e1158ac370
commit
f303a4b497
@ -2,14 +2,12 @@ package com.massivecraft.factions;
|
||||
|
||||
import ch.njol.skript.Skript;
|
||||
import ch.njol.skript.SkriptAddon;
|
||||
import com.earth2me.essentials.IEssentials;
|
||||
import com.google.gson.GsonBuilder;
|
||||
import com.google.gson.reflect.TypeToken;
|
||||
import com.massivecraft.factions.cmd.CmdAutoHelp;
|
||||
import com.massivecraft.factions.cmd.FCmdRoot;
|
||||
import com.massivecraft.factions.cmd.chest.ChestLogsHandler;
|
||||
import com.massivecraft.factions.integration.Econ;
|
||||
import com.massivecraft.factions.integration.Essentials;
|
||||
import com.massivecraft.factions.integration.Worldguard;
|
||||
import com.massivecraft.factions.integration.dynmap.EngineDynmap;
|
||||
import com.massivecraft.factions.listeners.*;
|
||||
@ -267,12 +265,6 @@ public class P extends MPlugin {
|
||||
for (Listener eventListener : eventsListener)
|
||||
getServer().getPluginManager().registerEvents(eventListener, this);
|
||||
|
||||
IEssentials ess = Essentials.setup();
|
||||
|
||||
if (ess != null && Conf.removeHomesOnLeave) {
|
||||
getServer().getPluginManager().registerEvents(new EssentialsHomeHandler(ess), this);
|
||||
}
|
||||
|
||||
// since some other plugins execute commands directly through this command interface, provide it
|
||||
getCommand(this.refCommand).setExecutor(this);
|
||||
getCommand(this.refCommand).setTabCompleter(this);
|
||||
|
@ -19,12 +19,11 @@ public class Essentials {
|
||||
|
||||
private static IEssentials essentials;
|
||||
|
||||
public static IEssentials setup() {
|
||||
public static void setup() {
|
||||
Plugin ess = Bukkit.getPluginManager().getPlugin("Essentials");
|
||||
if (ess != null) {
|
||||
return Essentials.essentials = (IEssentials) ess;
|
||||
essentials = (IEssentials) ess;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static boolean isOverBalCap(EconomyParticipator participator, double amount) {
|
||||
|
Loading…
Reference in New Issue
Block a user