diff --git a/src/com/massivecraft/factions/FPlayer.java b/src/com/massivecraft/factions/FPlayer.java index 57e2edde..27482e63 100644 --- a/src/com/massivecraft/factions/FPlayer.java +++ b/src/com/massivecraft/factions/FPlayer.java @@ -226,6 +226,7 @@ public class FPlayer extends SenderEntity implements EconomyParticipato // Next we must be attached and inited if (!this.attached()) return; if (!this.getColl().inited()) return; + if (!FactionColl.get().inited()) return; // Spout Derp SpoutFeatures.updateTitle(this, null); @@ -375,12 +376,12 @@ public class FPlayer extends SenderEntity implements EconomyParticipato public double getPowerMax() { - return ConfServer.powerMax + this.powerBoost; + return ConfServer.powerMax + this.getPowerBoost(); } public double getPowerMin() { - return ConfServer.powerMin + this.powerBoost; + return ConfServer.powerMin + this.getPowerBoost(); } public void recalculatePower() diff --git a/src/com/massivecraft/factions/FPlayerColl.java b/src/com/massivecraft/factions/FPlayerColl.java index 9468185a..483df0fa 100644 --- a/src/com/massivecraft/factions/FPlayerColl.java +++ b/src/com/massivecraft/factions/FPlayerColl.java @@ -71,6 +71,7 @@ public class FPlayerColl extends SenderColl // If inited ... if (!this.inited()) return ret; + if (!FactionColl.get().inited()) return ret; // ... update the index. Faction faction = entity.getFaction(); diff --git a/src/com/massivecraft/factions/integration/LWCFeatures.java b/src/com/massivecraft/factions/integration/LWCFeatures.java index 06935274..62a905d8 100644 --- a/src/com/massivecraft/factions/integration/LWCFeatures.java +++ b/src/com/massivecraft/factions/integration/LWCFeatures.java @@ -74,6 +74,7 @@ public class LWCFeatures for (BlockState blockState : chunk.getTileEntities()) { // TODO: Can something else be protected by LWC? Or is it really only chests? + // TODO: How about we run through each block in the chunk just to be on the safe side? if (blockState.getType() != Material.CHEST) continue; Block block = blockState.getBlock(); diff --git a/src/com/massivecraft/factions/integration/Worldguard.java b/src/com/massivecraft/factions/integration/Worldguard.java index b1457c73..f1dbb5bf 100644 --- a/src/com/massivecraft/factions/integration/Worldguard.java +++ b/src/com/massivecraft/factions/integration/Worldguard.java @@ -10,7 +10,7 @@ import com.sk89q.worldguard.protection.managers.RegionManager; import com.sk89q.worldguard.protection.ApplicableRegionSet; import com.sk89q.worldguard.protection.regions.ProtectedCuboidRegion; import com.sk89q.worldguard.protection.regions.ProtectedRegion; -import static com.sk89q.worldguard.bukkit.BukkitUtil.*; +import static com.sk89q.worldguard.bukkit.BukkitUtil.toVector; import com.sk89q.worldguard.protection.flags.DefaultFlag; import com.sk89q.worldedit.Vector; @@ -60,7 +60,7 @@ public class Worldguard // False: PVP is disallowed public static boolean isPVP(Player player) { - if( ! enabled) + if ( ! enabled) { // No WG hooks so we'll always bypass this check. return true; @@ -81,7 +81,7 @@ public class Worldguard // False: No regions found within chunk public static boolean checkForRegionsInChunk(Location loc) { - if( ! enabled) + if ( ! enabled) { // No WG hooks so we'll always bypass this check. return false; @@ -109,7 +109,7 @@ public class Worldguard try { overlaps = region.getIntersectingRegions(allregionslist); - if(overlaps == null || overlaps.isEmpty()) + if (overlaps == null || overlaps.isEmpty()) { foundregions = false; } diff --git a/src/com/massivecraft/factions/integration/herochat/HerochatFeatures.java b/src/com/massivecraft/factions/integration/herochat/HerochatFeatures.java index e0b2b0af..b77691ea 100644 --- a/src/com/massivecraft/factions/integration/herochat/HerochatFeatures.java +++ b/src/com/massivecraft/factions/integration/herochat/HerochatFeatures.java @@ -1,6 +1,5 @@ package com.massivecraft.factions.integration.herochat; -import com.dthielke.herochat.Herochat; import com.massivecraft.mcore.integration.IntegrationFeaturesAbstract; public class HerochatFeatures extends IntegrationFeaturesAbstract @@ -20,8 +19,6 @@ public class HerochatFeatures extends IntegrationFeaturesAbstract @Override public void activate() { - Herochat.getChannelManager().addChannel(new FactionChannel()); - Herochat.getChannelManager().addChannel(new AlliesChannel()); HerochatListener.get().activate(); } diff --git a/src/com/massivecraft/factions/integration/herochat/HerochatListener.java b/src/com/massivecraft/factions/integration/herochat/HerochatListener.java index 601c91f0..153cf006 100644 --- a/src/com/massivecraft/factions/integration/herochat/HerochatListener.java +++ b/src/com/massivecraft/factions/integration/herochat/HerochatListener.java @@ -7,6 +7,7 @@ import org.bukkit.event.HandlerList; import org.bukkit.event.Listener; import com.dthielke.herochat.ChannelChatEvent; +import com.dthielke.herochat.Herochat; import com.massivecraft.factions.ConfServer; import com.massivecraft.factions.Factions; import com.massivecraft.factions.chat.ChatFormatter; @@ -28,6 +29,9 @@ public class HerochatListener implements Listener public void activate() { + Herochat.getChannelManager().addChannel(new FactionChannel()); + Herochat.getChannelManager().addChannel(new AlliesChannel()); + Bukkit.getPluginManager().registerEvents(this, Factions.get()); }