minor changes to LWC integration
This commit is contained in:
@@ -14,10 +14,6 @@ import org.bukkit.event.Event;
|
||||
import org.bukkit.event.player.PlayerChatEvent;
|
||||
import org.bukkit.plugin.Plugin;
|
||||
|
||||
import com.earth2me.essentials.chat.EssentialsChat;
|
||||
import com.google.gson.GsonBuilder;
|
||||
import com.google.gson.reflect.TypeToken;
|
||||
import com.griefcraft.lwc.LWCPlugin;
|
||||
import com.massivecraft.factions.cmd.CmdAutoHelp;
|
||||
import com.massivecraft.factions.cmd.FCmdRoot;
|
||||
import com.massivecraft.factions.integration.Econ;
|
||||
@@ -35,6 +31,11 @@ import com.massivecraft.factions.struct.ChatMode;
|
||||
import com.massivecraft.factions.util.MapFLocToStringSetTypeAdapter;
|
||||
import com.massivecraft.factions.util.MyLocationTypeAdapter;
|
||||
import com.massivecraft.factions.zcore.MPlugin;
|
||||
|
||||
import com.earth2me.essentials.chat.EssentialsChat;
|
||||
import com.google.gson.GsonBuilder;
|
||||
import com.google.gson.reflect.TypeToken;
|
||||
import com.griefcraft.lwc.LWCPlugin;
|
||||
import com.nijiko.permissions.PermissionHandler;
|
||||
|
||||
public class P extends MPlugin
|
||||
@@ -210,7 +211,7 @@ public class P extends MPlugin
|
||||
|
||||
Plugin test = this.getServer().getPluginManager().getPlugin("LWC");
|
||||
|
||||
if(test != null && test.isEnabled() && Conf.lwcIntegration)
|
||||
if(test != null && test.isEnabled())
|
||||
{
|
||||
LWCFeatures.integrateLWC((LWCPlugin)test);
|
||||
}
|
||||
|
||||
@@ -12,6 +12,7 @@ import org.bukkit.block.BlockState;
|
||||
|
||||
import com.griefcraft.lwc.LWC;
|
||||
import com.griefcraft.lwc.LWCPlugin;
|
||||
import com.massivecraft.factions.Conf;
|
||||
import com.massivecraft.factions.FLocation;
|
||||
import com.massivecraft.factions.FPlayers;
|
||||
import com.massivecraft.factions.Faction;
|
||||
@@ -21,14 +22,12 @@ public class LWCFeatures
|
||||
{
|
||||
|
||||
private static LWC lwc;
|
||||
private static boolean isEnabled = false;
|
||||
|
||||
public static void integrateLWC(LWCPlugin test)
|
||||
{
|
||||
lwc = test.getLWC();
|
||||
isEnabled = true;
|
||||
|
||||
P.p.log("Successfully hooked into LWC!");
|
||||
P.p.log("Successfully hooked into LWC!"+(Conf.lwcIntegration ? "" : " Integration is currently disabled, though (\"lwcIntegration\")."));
|
||||
}
|
||||
|
||||
public static void clearOtherChests(FLocation flocation, Faction faction)
|
||||
@@ -82,6 +81,6 @@ public class LWCFeatures
|
||||
|
||||
public static boolean getEnabled()
|
||||
{
|
||||
return isEnabled;
|
||||
return Conf.lwcIntegration && lwc != null;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user