Added a few things
This commit is contained in:
parent
abe5fda8b6
commit
12488b198c
@ -722,13 +722,8 @@ public class FactionsEntityListener implements Listener {
|
|||||||
Entity entity = event.getRightClicked();
|
Entity entity = event.getRightClicked();
|
||||||
|
|
||||||
// only need to check for armor stand and item frames
|
// only need to check for armor stand and item frames
|
||||||
if (entity.getType() != EntityType.ARMOR_STAND) {
|
if (entity == null || entity.getType() != EntityType.ARMOR_STAND ) return;
|
||||||
return;
|
if (!FactionsBlockListener.playerCanBuildDestroyBlock(event.getPlayer(), entity.getLocation(), "use armor stands", false)) event.setCancelled(true);
|
||||||
}
|
|
||||||
|
|
||||||
if (!FactionsBlockListener.playerCanBuildDestroyBlock(event.getPlayer(), entity.getLocation(), "use armor stands", false)) {
|
|
||||||
event.setCancelled(true);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean stopEndermanBlockManipulation(Location loc) {
|
private boolean stopEndermanBlockManipulation(Location loc) {
|
||||||
|
@ -410,8 +410,9 @@ public class FactionsPlayerListener implements Listener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void enableFly(FPlayer me) {
|
public void enableFly(FPlayer me) {
|
||||||
if (SaberFactions.plugin.getConfig().getBoolean("ffly.AutoEnable")) {
|
if(!me.getPlayer().hasPermission("factions.fly")) return;
|
||||||
|
|
||||||
|
if (SaberFactions.plugin.getConfig().getBoolean("ffly.AutoEnable")) {
|
||||||
me.setFlying(true);
|
me.setFlying(true);
|
||||||
CmdFly.flyMap.put(me.getName(), true);
|
CmdFly.flyMap.put(me.getName(), true);
|
||||||
if (CmdFly.id == -1) {
|
if (CmdFly.id == -1) {
|
||||||
|
@ -112,6 +112,8 @@ public class ClipPlaceholderAPIManager extends PlaceholderExpansion implements R
|
|||||||
return (faction.getOpen() ? TL.COMMAND_SHOW_UNINVITED.toString() : TL.COMMAND_SHOW_INVITATION.toString());
|
return (faction.getOpen() ? TL.COMMAND_SHOW_UNINVITED.toString() : TL.COMMAND_SHOW_INVITATION.toString());
|
||||||
case "faction_peaceful":
|
case "faction_peaceful":
|
||||||
return faction.isPeaceful() ? Conf.colorNeutral + TL.COMMAND_SHOW_PEACEFUL.toString() : "";
|
return faction.isPeaceful() ? Conf.colorNeutral + TL.COMMAND_SHOW_PEACEFUL.toString() : "";
|
||||||
|
case "faction_tntbank_balance":
|
||||||
|
return String.valueOf(faction.getTnt());
|
||||||
case "faction_powerboost":
|
case "faction_powerboost":
|
||||||
double powerBoost = faction.getPowerBoost();
|
double powerBoost = faction.getPowerBoost();
|
||||||
return (powerBoost == 0.0) ? "" : (powerBoost > 0.0 ? TL.COMMAND_SHOW_BONUS.toString() : TL.COMMAND_SHOW_PENALTY.toString() + powerBoost + ")");
|
return (powerBoost == 0.0) ? "" : (powerBoost > 0.0 ? TL.COMMAND_SHOW_BONUS.toString() : TL.COMMAND_SHOW_PENALTY.toString() + powerBoost + ")");
|
||||||
|
Loading…
Reference in New Issue
Block a user