Merge pull request #106 from Stefan923/1.6.x
Fixed some internal errors caused by using /f wild and a placeholder issue
This commit is contained in:
commit
78a5e65e5c
@ -115,8 +115,6 @@ public class CmdJoin extends FCommand {
|
||||
fplayer.msg(TL.COMMAND_JOIN_MOVED, context.fPlayer.describeTo(fplayer, true), faction.getTag(fplayer));
|
||||
}
|
||||
|
||||
faction.msg(TL.COMMAND_JOIN_JOINED, fplayer.describeTo(faction, true));
|
||||
|
||||
fplayer.resetFactionData();
|
||||
|
||||
if (faction.altInvited(fplayer)) {
|
||||
@ -144,6 +142,8 @@ public class CmdJoin extends FCommand {
|
||||
System.out.print(e.getMessage());
|
||||
}
|
||||
|
||||
faction.msg(TL.COMMAND_JOIN_JOINED, fplayer.describeTo(faction, true));
|
||||
|
||||
if (Conf.logFactionJoin) {
|
||||
if (samePlayer) {
|
||||
FactionsPlugin.getInstance().log(TL.COMMAND_JOIN_JOINEDLOG.toString(), fplayer.getName(), faction.getTag());
|
||||
|
@ -46,8 +46,6 @@ public class CmdWild extends FCommand implements WaitedTask {
|
||||
public void perform(CommandContext context) {
|
||||
if (!teleportRange.containsKey(context.player)) {
|
||||
context.player.openInventory(new WildGUI(context.player, context.fPlayer).getInventory());
|
||||
} else {
|
||||
context.fPlayer.msg(TL.COMMAND_WILD_WAIT);
|
||||
}
|
||||
}
|
||||
|
||||
@ -75,6 +73,7 @@ public class CmdWild extends FCommand implements WaitedTask {
|
||||
}
|
||||
if (!success) {
|
||||
p.sendMessage(TL.COMMAND_WILD_FAILED.toString());
|
||||
teleportRange.remove(p);
|
||||
}
|
||||
}
|
||||
|
||||
@ -114,6 +113,7 @@ public class CmdWild extends FCommand implements WaitedTask {
|
||||
@Override
|
||||
public void handleFailure(Player player) {
|
||||
player.sendMessage(TL.COMMAND_WILD_INTERUPTED.toString());
|
||||
teleportRange.remove(player);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -149,10 +149,7 @@ public enum FactionTag implements Tag {
|
||||
if (!this.foundInString(text)) {
|
||||
return text;
|
||||
}
|
||||
String result = null;
|
||||
if (this.biFunction != null) {
|
||||
result = this.function == null ? this.biFunction.apply(faction, player) : this.function.apply(faction);
|
||||
}
|
||||
String result = this.function == null ? this.biFunction.apply(faction, player) : this.function.apply(faction);
|
||||
return result == null ? null : text.replace(this.tag, result);
|
||||
}
|
||||
|
||||
|
@ -21,6 +21,7 @@ public enum PlayerTag implements Tag {
|
||||
}),
|
||||
PLAYER_BALANCE("{balance}", (fp) -> Econ.isSetup() ? Econ.getFriendlyBalance(fp) : (Tag.isMinimalShow() ? null : TL.ECON_OFF.format("balance"))),
|
||||
PLAYER_POWER("{player-power}", (fp) -> String.valueOf(fp.getPowerRounded())),
|
||||
ROLE("{player-role}", FPlayer::getRolePrefix),
|
||||
PLAYER_MAXPOWER("{player-maxpower}", (fp) -> String.valueOf(fp.getPowerMaxRounded())),
|
||||
PLAYER_KILLS("{player-kills}", (fp) -> String.valueOf(fp.getKills())),
|
||||
PLAYER_DEATHS("{player-deaths}", (fp) -> String.valueOf(fp.getDeaths())),
|
||||
|
Loading…
Reference in New Issue
Block a user