Added a few things

This commit is contained in:
Driftay 2019-07-06 18:20:27 -04:00
parent abe5fda8b6
commit 12488b198c
3 changed files with 6 additions and 8 deletions

View File

@ -722,13 +722,8 @@ public class FactionsEntityListener implements Listener {
Entity entity = event.getRightClicked();
// only need to check for armor stand and item frames
if (entity.getType() != EntityType.ARMOR_STAND) {
return;
}
if (!FactionsBlockListener.playerCanBuildDestroyBlock(event.getPlayer(), entity.getLocation(), "use armor stands", false)) {
event.setCancelled(true);
}
if (entity == null || entity.getType() != EntityType.ARMOR_STAND ) return;
if (!FactionsBlockListener.playerCanBuildDestroyBlock(event.getPlayer(), entity.getLocation(), "use armor stands", false)) event.setCancelled(true);
}
private boolean stopEndermanBlockManipulation(Location loc) {

View File

@ -410,8 +410,9 @@ public class FactionsPlayerListener implements Listener {
}
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);
CmdFly.flyMap.put(me.getName(), true);
if (CmdFly.id == -1) {

View File

@ -112,6 +112,8 @@ public class ClipPlaceholderAPIManager extends PlaceholderExpansion implements R
return (faction.getOpen() ? TL.COMMAND_SHOW_UNINVITED.toString() : TL.COMMAND_SHOW_INVITATION.toString());
case "faction_peaceful":
return faction.isPeaceful() ? Conf.colorNeutral + TL.COMMAND_SHOW_PEACEFUL.toString() : "";
case "faction_tntbank_balance":
return String.valueOf(faction.getTnt());
case "faction_powerboost":
double powerBoost = faction.getPowerBoost();
return (powerBoost == 0.0) ? "" : (powerBoost > 0.0 ? TL.COMMAND_SHOW_BONUS.toString() : TL.COMMAND_SHOW_PENALTY.toString() + powerBoost + ")");