mirror of
https://github.com/MassiveCraft/Factions.git
synced 2024-11-23 18:55:25 +01:00
Fixing some NPE and similar small issues.
This commit is contained in:
parent
5ddfb19861
commit
f70cc283db
@ -226,6 +226,7 @@ public class FPlayer extends SenderEntity<FPlayer> implements EconomyParticipato
|
|||||||
// Next we must be attached and inited
|
// Next we must be attached and inited
|
||||||
if (!this.attached()) return;
|
if (!this.attached()) return;
|
||||||
if (!this.getColl().inited()) return;
|
if (!this.getColl().inited()) return;
|
||||||
|
if (!FactionColl.get().inited()) return;
|
||||||
|
|
||||||
// Spout Derp
|
// Spout Derp
|
||||||
SpoutFeatures.updateTitle(this, null);
|
SpoutFeatures.updateTitle(this, null);
|
||||||
@ -375,12 +376,12 @@ public class FPlayer extends SenderEntity<FPlayer> implements EconomyParticipato
|
|||||||
|
|
||||||
public double getPowerMax()
|
public double getPowerMax()
|
||||||
{
|
{
|
||||||
return ConfServer.powerMax + this.powerBoost;
|
return ConfServer.powerMax + this.getPowerBoost();
|
||||||
}
|
}
|
||||||
|
|
||||||
public double getPowerMin()
|
public double getPowerMin()
|
||||||
{
|
{
|
||||||
return ConfServer.powerMin + this.powerBoost;
|
return ConfServer.powerMin + this.getPowerBoost();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void recalculatePower()
|
public void recalculatePower()
|
||||||
|
@ -71,6 +71,7 @@ public class FPlayerColl extends SenderColl<FPlayer>
|
|||||||
|
|
||||||
// If inited ...
|
// If inited ...
|
||||||
if (!this.inited()) return ret;
|
if (!this.inited()) return ret;
|
||||||
|
if (!FactionColl.get().inited()) return ret;
|
||||||
|
|
||||||
// ... update the index.
|
// ... update the index.
|
||||||
Faction faction = entity.getFaction();
|
Faction faction = entity.getFaction();
|
||||||
|
@ -74,6 +74,7 @@ public class LWCFeatures
|
|||||||
for (BlockState blockState : chunk.getTileEntities())
|
for (BlockState blockState : chunk.getTileEntities())
|
||||||
{
|
{
|
||||||
// TODO: Can something else be protected by LWC? Or is it really only chests?
|
// 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;
|
if (blockState.getType() != Material.CHEST) continue;
|
||||||
Block block = blockState.getBlock();
|
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.ApplicableRegionSet;
|
||||||
import com.sk89q.worldguard.protection.regions.ProtectedCuboidRegion;
|
import com.sk89q.worldguard.protection.regions.ProtectedCuboidRegion;
|
||||||
import com.sk89q.worldguard.protection.regions.ProtectedRegion;
|
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.worldguard.protection.flags.DefaultFlag;
|
||||||
|
|
||||||
import com.sk89q.worldedit.Vector;
|
import com.sk89q.worldedit.Vector;
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
package com.massivecraft.factions.integration.herochat;
|
package com.massivecraft.factions.integration.herochat;
|
||||||
|
|
||||||
import com.dthielke.herochat.Herochat;
|
|
||||||
import com.massivecraft.mcore.integration.IntegrationFeaturesAbstract;
|
import com.massivecraft.mcore.integration.IntegrationFeaturesAbstract;
|
||||||
|
|
||||||
public class HerochatFeatures extends IntegrationFeaturesAbstract
|
public class HerochatFeatures extends IntegrationFeaturesAbstract
|
||||||
@ -20,8 +19,6 @@ public class HerochatFeatures extends IntegrationFeaturesAbstract
|
|||||||
@Override
|
@Override
|
||||||
public void activate()
|
public void activate()
|
||||||
{
|
{
|
||||||
Herochat.getChannelManager().addChannel(new FactionChannel());
|
|
||||||
Herochat.getChannelManager().addChannel(new AlliesChannel());
|
|
||||||
HerochatListener.get().activate();
|
HerochatListener.get().activate();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -7,6 +7,7 @@ import org.bukkit.event.HandlerList;
|
|||||||
import org.bukkit.event.Listener;
|
import org.bukkit.event.Listener;
|
||||||
|
|
||||||
import com.dthielke.herochat.ChannelChatEvent;
|
import com.dthielke.herochat.ChannelChatEvent;
|
||||||
|
import com.dthielke.herochat.Herochat;
|
||||||
import com.massivecraft.factions.ConfServer;
|
import com.massivecraft.factions.ConfServer;
|
||||||
import com.massivecraft.factions.Factions;
|
import com.massivecraft.factions.Factions;
|
||||||
import com.massivecraft.factions.chat.ChatFormatter;
|
import com.massivecraft.factions.chat.ChatFormatter;
|
||||||
@ -28,6 +29,9 @@ public class HerochatListener implements Listener
|
|||||||
|
|
||||||
public void activate()
|
public void activate()
|
||||||
{
|
{
|
||||||
|
Herochat.getChannelManager().addChannel(new FactionChannel());
|
||||||
|
Herochat.getChannelManager().addChannel(new AlliesChannel());
|
||||||
|
|
||||||
Bukkit.getPluginManager().registerEvents(this, Factions.get());
|
Bukkit.getPluginManager().registerEvents(this, Factions.get());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user