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:
ProSavage 2018-05-11 17:49:50 -05:00
parent de728ed55c
commit 243c2d19bd

View File

@ -1,14 +1,12 @@
package com.massivecraft.factions.listeners; package com.massivecraft.factions.listeners;
import com.massivecraft.factions.*; import com.massivecraft.factions.*;
import com.massivecraft.factions.event.FPlayerJoinEvent;
import com.massivecraft.factions.event.PowerLossEvent; import com.massivecraft.factions.event.PowerLossEvent;
import com.massivecraft.factions.struct.Relation; import com.massivecraft.factions.struct.Relation;
import com.massivecraft.factions.util.MiscUtil; import com.massivecraft.factions.util.MiscUtil;
import com.massivecraft.factions.zcore.util.TL; import com.massivecraft.factions.zcore.util.TL;
import org.bukkit.Bukkit; import org.bukkit.Bukkit;
import org.bukkit.Location; import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.TravelAgent; import org.bukkit.TravelAgent;
import org.bukkit.block.Block; import org.bukkit.block.Block;
import org.bukkit.entity.*; 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;
import org.bukkit.event.hanging.HangingBreakEvent.RemoveCause; import org.bukkit.event.hanging.HangingBreakEvent.RemoveCause;
import org.bukkit.event.hanging.HangingPlaceEvent; import org.bukkit.event.hanging.HangingPlaceEvent;
import org.bukkit.event.player.PlayerInteractEvent;
import org.bukkit.event.player.PlayerPortalEvent; import org.bukkit.event.player.PlayerPortalEvent;
import org.bukkit.potion.PotionEffect; import org.bukkit.potion.PotionEffect;
import org.bukkit.potion.PotionEffectType; import org.bukkit.potion.PotionEffectType;
@ -282,31 +279,13 @@ public class FactionsEntityListener implements Listener {
faction.isSafeZone())) { faction.isSafeZone())) {
// ghast fireball which needs prevention // ghast fireball which needs prevention
return false; return false;
} else if ((boomer instanceof TNTPrimed || boomer instanceof ExplosiveMinecart) && ((faction.isWilderness() && Conf.wildernessBlockTNT && !Conf.worldsNoWildernessProtection.contains(block.getWorld().getName())) || } else
(faction.isNormal() && (online ? Conf.territoryBlockTNT : Conf.territoryBlockTNTWhenOffline)) || return (!(boomer instanceof TNTPrimed) && !(boomer instanceof ExplosiveMinecart)) || ((!faction.isWilderness() || !Conf.wildernessBlockTNT || Conf.worldsNoWildernessProtection.contains(block.getWorld().getName())) &&
(faction.isWarZone() && Conf.warZoneBlockTNT) || (!faction.isNormal() || (online ? !Conf.territoryBlockTNT : !Conf.territoryBlockTNTWhenOffline)) &&
(faction.isSafeZone() && Conf.safeZoneBlockTNT))) { (!faction.isWarZone() || !Conf.warZoneBlockTNT) &&
// TNT which needs prevention (!faction.isSafeZone() || !Conf.safeZoneBlockTNT));
return false;
}
// No condition retained, destroy the block! // 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);
}
}
}
} }