Fixing some NPE and similar small issues.
This commit is contained in:
@ -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();
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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();
|
||||
}
|
||||
|
||||
|
@ -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());
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user