mirror of
https://github.com/Maxlego08/zKoth.git
synced 2024-11-22 11:55:12 +01:00
Add 2 placeholders
This commit is contained in:
parent
b6fd54bbb6
commit
1e5720b526
@ -3,6 +3,8 @@
|
||||
- Fix NMS
|
||||
- Fix ``/koth stop``
|
||||
- Create placeholder: ``%zkoth_capture_progress_bar%``
|
||||
- Create placeholder: ``%zkoth_progress_bar_score_points_<position>%``
|
||||
- Create placeholder: ``%zkoth_progress_bar_score%``
|
||||
|
||||
# 3.0.2
|
||||
|
||||
|
@ -42,13 +42,16 @@ public class KothPlaceholder extends ZUtils {
|
||||
this.register("capture_max_formats", koth -> TimerBuilder.getStringTime(koth.getCaptureSeconds()));
|
||||
|
||||
this.register("capture_progress_bar", koth -> getProgressBar(koth.getCaptureSeconds() - koth.getRemainingSeconds(), koth.getCaptureSeconds(), koth.getProgressBar()));
|
||||
this.registerPosition("progress_bar_score_points_", (position, koth) -> getProgressBar(koth.getPlayer(position).getPoints(), koth.getCaptureSeconds(), koth.getProgressBar()));
|
||||
|
||||
this.registerPosition("score_player_", (position, koth) -> koth.getPlayer(position).getPlayerName());
|
||||
this.registerPosition("score_points_", (position, koth) -> String.valueOf(koth.getPlayer(position).getPoints()));
|
||||
this.registerPosition("score_team_name_", (position, koth) -> koth.getPlayer(position).getTeamName());
|
||||
this.registerPosition("score_team_id_", (position, koth) -> koth.getPlayer(position).getTeamId());
|
||||
this.registerPosition("score_team_leader_", (position, koth) -> koth.getPlayer(position).getTeamLeader());
|
||||
|
||||
this.register("score", (player, koth) -> String.valueOf(koth.getScore(player)));
|
||||
this.register("progress_bar_score", (player, koth) -> getProgressBar(koth.getScore(player), koth.getCaptureSeconds(), koth.getProgressBar()));
|
||||
|
||||
this.register("player_name", koth -> koth.getCurrentPlayer() != null ? koth.getCurrentPlayer().getName() : Config.noPlayer);
|
||||
this.register("team_name", koth -> koth.getCurrentPlayer() != null ? this.kothManager.getKothTeam().getTeamName(koth.getCurrentPlayer()) : Config.noFaction);
|
||||
|
Loading…
Reference in New Issue
Block a user