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));
|
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();
|
fplayer.resetFactionData();
|
||||||
|
|
||||||
if (faction.altInvited(fplayer)) {
|
if (faction.altInvited(fplayer)) {
|
||||||
@ -144,6 +142,8 @@ public class CmdJoin extends FCommand {
|
|||||||
System.out.print(e.getMessage());
|
System.out.print(e.getMessage());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
faction.msg(TL.COMMAND_JOIN_JOINED, fplayer.describeTo(faction, true));
|
||||||
|
|
||||||
if (Conf.logFactionJoin) {
|
if (Conf.logFactionJoin) {
|
||||||
if (samePlayer) {
|
if (samePlayer) {
|
||||||
FactionsPlugin.getInstance().log(TL.COMMAND_JOIN_JOINEDLOG.toString(), fplayer.getName(), faction.getTag());
|
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) {
|
public void perform(CommandContext context) {
|
||||||
if (!teleportRange.containsKey(context.player)) {
|
if (!teleportRange.containsKey(context.player)) {
|
||||||
context.player.openInventory(new WildGUI(context.player, context.fPlayer).getInventory());
|
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) {
|
if (!success) {
|
||||||
p.sendMessage(TL.COMMAND_WILD_FAILED.toString());
|
p.sendMessage(TL.COMMAND_WILD_FAILED.toString());
|
||||||
|
teleportRange.remove(p);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -114,6 +113,7 @@ public class CmdWild extends FCommand implements WaitedTask {
|
|||||||
@Override
|
@Override
|
||||||
public void handleFailure(Player player) {
|
public void handleFailure(Player player) {
|
||||||
player.sendMessage(TL.COMMAND_WILD_INTERUPTED.toString());
|
player.sendMessage(TL.COMMAND_WILD_INTERUPTED.toString());
|
||||||
|
teleportRange.remove(player);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -149,10 +149,7 @@ public enum FactionTag implements Tag {
|
|||||||
if (!this.foundInString(text)) {
|
if (!this.foundInString(text)) {
|
||||||
return text;
|
return text;
|
||||||
}
|
}
|
||||||
String result = null;
|
String result = this.function == null ? this.biFunction.apply(faction, player) : this.function.apply(faction);
|
||||||
if (this.biFunction != null) {
|
|
||||||
result = this.function == null ? this.biFunction.apply(faction, player) : this.function.apply(faction);
|
|
||||||
}
|
|
||||||
return result == null ? null : text.replace(this.tag, result);
|
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_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())),
|
PLAYER_POWER("{player-power}", (fp) -> String.valueOf(fp.getPowerRounded())),
|
||||||
|
ROLE("{player-role}", FPlayer::getRolePrefix),
|
||||||
PLAYER_MAXPOWER("{player-maxpower}", (fp) -> String.valueOf(fp.getPowerMaxRounded())),
|
PLAYER_MAXPOWER("{player-maxpower}", (fp) -> String.valueOf(fp.getPowerMaxRounded())),
|
||||||
PLAYER_KILLS("{player-kills}", (fp) -> String.valueOf(fp.getKills())),
|
PLAYER_KILLS("{player-kills}", (fp) -> String.valueOf(fp.getKills())),
|
||||||
PLAYER_DEATHS("{player-deaths}", (fp) -> String.valueOf(fp.getDeaths())),
|
PLAYER_DEATHS("{player-deaths}", (fp) -> String.valueOf(fp.getDeaths())),
|
||||||
|
Loading…
Reference in New Issue
Block a user