Updates
This commit is contained in:
parent
345491ce0b
commit
5842888fc2
@ -32,4 +32,5 @@ public class Event {
|
||||
private boolean timerEnabled;
|
||||
private boolean blockPlaceEventCancelled;
|
||||
private boolean blockBreakEventCancelled;
|
||||
private boolean started;
|
||||
}
|
||||
|
@ -76,7 +76,8 @@ public class EventManager {
|
||||
this.config.getBoolean("EVENT.TOGGLEABLE-OPTIONS.SCOREBOARD-ENABLED"),
|
||||
this.config.getBoolean("EVENT.TOGGLEABLE-OPTIONS.TIMER-ENABLED"),
|
||||
this.config.getBoolean("EVENT.TOGGLEABLE-OPTIONS.EVENTS.BLOCK-PLACE.CANCELLED"),
|
||||
this.config.getBoolean("EVENT.TOGGLEABLE-OPTIONS.EVENTS.BLOCK-BREAK.CANCELLED")
|
||||
this.config.getBoolean("EVENT.TOGGLEABLE-OPTIONS.EVENTS.BLOCK-BREAK.CANCELLED"),
|
||||
this.config.getBoolean("EVENT.STARTED")
|
||||
);
|
||||
} catch (NullPointerException exception) {
|
||||
this.main.getServer().getConsoleSender().sendMessage(ColorUtils.getMessageType("&cEvent information not found"));
|
||||
@ -93,6 +94,7 @@ public class EventManager {
|
||||
true,
|
||||
true,
|
||||
false,
|
||||
false,
|
||||
false
|
||||
);
|
||||
}
|
||||
@ -140,6 +142,7 @@ public class EventManager {
|
||||
this.config.set("EVENT.TOGGLEABLE-OPTIONS.TIMER-ENABLED", this.event.isTimerEnabled());
|
||||
this.config.set("EVENT.TOGGLEABLE-OPTIONS.EVENTS.BLOCK-PLACE.CANCELLED", this.event.isBlockPlaceEventCancelled());
|
||||
this.config.set("EVENT.TOGGLEABLE-OPTIONS.EVENTS.BLOCK-BREAK.CANCELLED", this.event.isBlockBreakEventCancelled());
|
||||
this.config.set("EVENT.STARTED", this.event.isStarted());
|
||||
this.main.getMainConfig().save();
|
||||
}
|
||||
}
|
||||
|
@ -4,12 +4,14 @@ import aether.scoreboard.Board;
|
||||
import aether.scoreboard.BoardAdapter;
|
||||
import aether.scoreboard.cooldown.BoardCooldown;
|
||||
import com.loganmagnan.eventcore.EventCore;
|
||||
import com.loganmagnan.eventcore.managers.event.teams.Team;
|
||||
import com.loganmagnan.eventcore.playerdata.PlayerData;
|
||||
import com.loganmagnan.eventcore.playerdata.PlayerSettings;
|
||||
import com.loganmagnan.eventcore.utils.ColorUtils;
|
||||
import com.loganmagnan.eventcore.utils.Constants;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.scoreboard.Scoreboard;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
@ -52,12 +54,19 @@ public class ScoreboardProvider implements BoardAdapter {
|
||||
|
||||
private List<String> getSpawnScoreboard(Player player, PlayerData playerData) {
|
||||
List<String> lines = new ArrayList<>();
|
||||
|
||||
int players = 0;
|
||||
|
||||
for (Team team : this.main.getEventManager().getEvent().getTeams()) {
|
||||
players += team.getPlayingPlayers().size();
|
||||
}
|
||||
|
||||
lines.add(ColorUtils.getMessageType(""));
|
||||
lines.add(ColorUtils.getMessageType("&b┏ &b&l" + player.getName()));
|
||||
lines.add(ColorUtils.getMessageType("&b┕ &fPing: &b" + player.getPing()));
|
||||
lines.add(ColorUtils.getMessageType(""));
|
||||
lines.add(ColorUtils.getMessageType("&b┏ &b&lEvent Information"));
|
||||
lines.add(ColorUtils.getMessageType("&b┝ &fPlayers: &b" + this.main.getServer().getOnlinePlayers().size()));
|
||||
lines.add(ColorUtils.getMessageType("&b┝ &fPlayers: &b" + (this.main.getEventManager().getEvent().isStarted() ? players : this.main.getServer().getOnlinePlayers().size())));
|
||||
lines.add(ColorUtils.getMessageType("&b┕ &fTeams: &b" + this.main.getEventManager().getEvent().getAmountOfTeams()));
|
||||
lines.add(ColorUtils.getMessageType(""));
|
||||
lines.add(ColorUtils.getMessageType("&7&o" + Constants.INFORMATION.get("server-ip-address")));
|
||||
|
Loading…
Reference in New Issue
Block a user