Allowed players to continue using Essentials fly is Factions Fly is Disabled
This commit is contained in:
parent
086ec3e145
commit
5145ae1714
@ -82,19 +82,19 @@ public class CmdDisband extends FCommand {
|
||||
String amountString = context.sender instanceof ConsoleCommandSender ? TL.GENERIC_SERVERADMIN.toString() : context.fPlayer.describeTo(follower);
|
||||
if (follower.getFaction() == faction) {
|
||||
follower.msg(TL.COMMAND_DISBAND_BROADCAST_YOURS, amountString);
|
||||
if (!follower.canFlyAtLocation()) {
|
||||
if (!follower.canFlyAtLocation() && FactionsPlugin.getInstance().getConfig().getBoolean("enable-faction-flight")) {
|
||||
follower.setFFlying(false, false);
|
||||
}
|
||||
} else {
|
||||
follower.msg(TL.COMMAND_DISBAND_BROADCAST_NOTYOURS, amountString, faction.getTag(follower));
|
||||
}
|
||||
}
|
||||
context.fPlayer.setFFlying(false, false);
|
||||
if(FactionsPlugin.getInstance().getConfig().getBoolean("enable-faction-flight")) context.fPlayer.setFFlying(false, false);
|
||||
} else {
|
||||
context.player.sendMessage(String.valueOf(TL.COMMAND_DISBAND_PLAYER));
|
||||
}
|
||||
faction.disband(context.player, PlayerDisbandReason.COMMAND);
|
||||
if (!context.fPlayer.canFlyAtLocation()) {
|
||||
if (!context.fPlayer.canFlyAtLocation() && FactionsPlugin.getInstance().getConfig().getBoolean("enable-faction-flight")) {
|
||||
context.fPlayer.setFFlying(false, false);
|
||||
}
|
||||
}
|
||||
|
@ -552,7 +552,6 @@ public class FactionsPlayerListener implements Listener {
|
||||
|
||||
public String parseAllPlaceholders(String string, Faction faction, Player player) {
|
||||
string = TagUtil.parsePlaceholders(player, string);
|
||||
|
||||
string = string.replace("{Faction}", faction.getTag())
|
||||
.replace("{online}", faction.getOnlinePlayers().size() + "")
|
||||
.replace("{offline}", faction.getFPlayers().size() - faction.getOnlinePlayers().size() + "")
|
||||
@ -563,13 +562,13 @@ public class FactionsPlayerListener implements Listener {
|
||||
}
|
||||
|
||||
public void checkCanFly(FPlayer me) {
|
||||
if (!FactionsPlugin.getInstance().getConfig().getBoolean("enable-faction-flight")) return;
|
||||
if (me.isFlying() && (!me.canFlyAtLocation() || me.checkIfNearbyEnemies())) {
|
||||
me.setFFlying(false, false);
|
||||
me.msg(TL.COMMAND_FLY_NO_ACCESS, Board.getInstance().getFactionAt(me.getLastStoodAt()).getTag());
|
||||
return;
|
||||
}
|
||||
if (me.isFlying() || !FactionsPlugin.instance.getConfig().getBoolean("ffly.AutoEnable"))
|
||||
return;
|
||||
if (me.isFlying() || !FactionsPlugin.instance.getConfig().getBoolean("ffly.AutoEnable")) return;
|
||||
me.setFFlying(true, false);
|
||||
CmdFly.flyMap.put(me.getName(), true);
|
||||
if (CmdFly.particleTask == null)
|
||||
|
Loading…
Reference in New Issue
Block a user