1.4-STABLE
------------------------------------------------------------------ No Enderpearls in fly fixed - The option was bugged, so if it was true it would do the opposite. Improved /f map visuals and title! Title fadeout time, showtime, and fadeintime options added for 1.9+ servers Fixed Bug in /f upgrades where the slots option for exp would move the spawner instead. Added Faction chest, an upgradable shared "enderchest" for factions to share! Added some more entries into /f help in config. Added Upgrade for faction chest Banner pattern storage ------------------------------------------------------------------
This commit is contained in:
parent
de728ed55c
commit
243c2d19bd
@ -1,14 +1,12 @@
|
||||
package com.massivecraft.factions.listeners;
|
||||
|
||||
import com.massivecraft.factions.*;
|
||||
import com.massivecraft.factions.event.FPlayerJoinEvent;
|
||||
import com.massivecraft.factions.event.PowerLossEvent;
|
||||
import com.massivecraft.factions.struct.Relation;
|
||||
import com.massivecraft.factions.util.MiscUtil;
|
||||
import com.massivecraft.factions.zcore.util.TL;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.TravelAgent;
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.entity.*;
|
||||
@ -21,7 +19,6 @@ import org.bukkit.event.hanging.HangingBreakByEntityEvent;
|
||||
import org.bukkit.event.hanging.HangingBreakEvent;
|
||||
import org.bukkit.event.hanging.HangingBreakEvent.RemoveCause;
|
||||
import org.bukkit.event.hanging.HangingPlaceEvent;
|
||||
import org.bukkit.event.player.PlayerInteractEvent;
|
||||
import org.bukkit.event.player.PlayerPortalEvent;
|
||||
import org.bukkit.potion.PotionEffect;
|
||||
import org.bukkit.potion.PotionEffectType;
|
||||
@ -282,31 +279,13 @@ public class FactionsEntityListener implements Listener {
|
||||
faction.isSafeZone())) {
|
||||
// ghast fireball which needs prevention
|
||||
return false;
|
||||
} else if ((boomer instanceof TNTPrimed || boomer instanceof ExplosiveMinecart) && ((faction.isWilderness() && Conf.wildernessBlockTNT && !Conf.worldsNoWildernessProtection.contains(block.getWorld().getName())) ||
|
||||
(faction.isNormal() && (online ? Conf.territoryBlockTNT : Conf.territoryBlockTNTWhenOffline)) ||
|
||||
(faction.isWarZone() && Conf.warZoneBlockTNT) ||
|
||||
(faction.isSafeZone() && Conf.safeZoneBlockTNT))) {
|
||||
// TNT which needs prevention
|
||||
return false;
|
||||
}
|
||||
} else
|
||||
return (!(boomer instanceof TNTPrimed) && !(boomer instanceof ExplosiveMinecart)) || ((!faction.isWilderness() || !Conf.wildernessBlockTNT || Conf.worldsNoWildernessProtection.contains(block.getWorld().getName())) &&
|
||||
(!faction.isNormal() || (online ? !Conf.territoryBlockTNT : !Conf.territoryBlockTNTWhenOffline)) &&
|
||||
(!faction.isWarZone() || !Conf.warZoneBlockTNT) &&
|
||||
(!faction.isSafeZone() || !Conf.safeZoneBlockTNT));
|
||||
|
||||
// No condition retained, destroy the block!
|
||||
return true;
|
||||
}
|
||||
|
||||
//For disabling enderpearl throws
|
||||
@EventHandler
|
||||
public void onPearl(PlayerInteractEvent e) {
|
||||
Player player = e.getPlayer();
|
||||
if (player.getItemInHand().getType() == Material.ENDER_PEARL) {
|
||||
FPlayer fPlayer = FPlayers.getInstance().getByPlayer(player);
|
||||
if (fPlayer.isFlying()){
|
||||
if (!Conf.noEnderpearlsInFly){
|
||||
fPlayer.msg(TL.COMMAND_FLY_NO_EPEARL);
|
||||
e.setCancelled(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user