Updates And Started On The Scoreboard Management System
This commit is contained in:
parent
b804fa27d3
commit
c600ab9242
@ -1,6 +1,7 @@
|
|||||||
package com.loganmagnan.eventcore.listeners;
|
package com.loganmagnan.eventcore.listeners;
|
||||||
|
|
||||||
import com.loganmagnan.eventcore.EventCore;
|
import com.loganmagnan.eventcore.EventCore;
|
||||||
|
import org.bukkit.GameMode;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.entity.Entity;
|
import org.bukkit.entity.Entity;
|
||||||
import org.bukkit.entity.HumanEntity;
|
import org.bukkit.entity.HumanEntity;
|
||||||
|
@ -26,7 +26,7 @@ public class Event {
|
|||||||
|
|
||||||
private List<CustomLocation> teamSpawnPoints;
|
private List<CustomLocation> teamSpawnPoints;
|
||||||
|
|
||||||
private int duration;
|
private String duration;
|
||||||
|
|
||||||
private boolean scoreboardEnabled;
|
private boolean scoreboardEnabled;
|
||||||
private boolean timerEnabled;
|
private boolean timerEnabled;
|
||||||
|
@ -8,7 +8,6 @@ import lombok.Getter;
|
|||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
import org.bukkit.configuration.ConfigurationSection;
|
import org.bukkit.configuration.ConfigurationSection;
|
||||||
import org.bukkit.configuration.file.FileConfiguration;
|
import org.bukkit.configuration.file.FileConfiguration;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
@ -73,7 +72,7 @@ public class EventManager {
|
|||||||
this.config.getInt("EVENT.AMOUNT-OF-TEAMS"),
|
this.config.getInt("EVENT.AMOUNT-OF-TEAMS"),
|
||||||
this.config.getInt("EVENT.AMOUNT-PER-TEAM"),
|
this.config.getInt("EVENT.AMOUNT-PER-TEAM"),
|
||||||
teamSpawnPoints,
|
teamSpawnPoints,
|
||||||
this.config.getInt("EVENT.DURATION"),
|
this.config.getString("EVENT.DURATION"),
|
||||||
this.config.getBoolean("EVENT.TOGGLEABLE-OPTIONS.SCOREBOARD-ENABLED"),
|
this.config.getBoolean("EVENT.TOGGLEABLE-OPTIONS.SCOREBOARD-ENABLED"),
|
||||||
this.config.getBoolean("EVENT.TOGGLEABLE-OPTIONS.TIMER-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-PLACE.CANCELLED"),
|
||||||
@ -90,7 +89,7 @@ public class EventManager {
|
|||||||
2,
|
2,
|
||||||
10,
|
10,
|
||||||
new ArrayList<CustomLocation>(),
|
new ArrayList<CustomLocation>(),
|
||||||
600,
|
"10m",
|
||||||
true,
|
true,
|
||||||
true,
|
true,
|
||||||
false,
|
false,
|
||||||
|
@ -7,6 +7,7 @@ import com.loganmagnan.eventcore.EventCore;
|
|||||||
import com.loganmagnan.eventcore.playerdata.PlayerData;
|
import com.loganmagnan.eventcore.playerdata.PlayerData;
|
||||||
import com.loganmagnan.eventcore.playerdata.PlayerSettings;
|
import com.loganmagnan.eventcore.playerdata.PlayerSettings;
|
||||||
import com.loganmagnan.eventcore.utils.ColorUtils;
|
import com.loganmagnan.eventcore.utils.ColorUtils;
|
||||||
|
import com.loganmagnan.eventcore.utils.Constants;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.scoreboard.Scoreboard;
|
import org.bukkit.scoreboard.Scoreboard;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
@ -19,7 +20,7 @@ public class ScoreboardProvider implements BoardAdapter {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getTitle(Player player) {
|
public String getTitle(Player player) {
|
||||||
return ColorUtils.getMessageType("&b&lEvent Core");
|
return ColorUtils.getMessageType("&b&l" + this.main.getEventManager().getEvent().getName());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -53,8 +54,13 @@ public class ScoreboardProvider implements BoardAdapter {
|
|||||||
List<String> lines = new ArrayList<>();
|
List<String> lines = new ArrayList<>();
|
||||||
|
|
||||||
lines.add(ColorUtils.getMessageType(""));
|
lines.add(ColorUtils.getMessageType(""));
|
||||||
lines.add(ColorUtils.getMessageType("&b&l" + player.getName()));
|
lines.add(ColorUtils.getMessageType("&b┏ &b&l" + player.getName()));
|
||||||
lines.add(ColorUtils.getMessageType("&7┃ &fOnline: &b" + this.main.getServer().getOnlinePlayers()));
|
lines.add(ColorUtils.getMessageType("&b┕ &fOnline: &b" + this.main.getServer().getOnlinePlayers().size()));
|
||||||
|
lines.add(ColorUtils.getMessageType(""));
|
||||||
|
lines.add(ColorUtils.getMessageType("&b┏ &b&lEvent Information"));
|
||||||
|
lines.add(ColorUtils.getMessageType("&b┕ &fTeams: &b" + this.main.getEventManager().getEvent().getTeams().size()));
|
||||||
|
lines.add(ColorUtils.getMessageType(""));
|
||||||
|
lines.add(ColorUtils.getMessageType("&7&o" + Constants.INFORMATION.get("server-ip-address")));
|
||||||
|
|
||||||
return lines;
|
return lines;
|
||||||
}
|
}
|
||||||
|
@ -11,6 +11,7 @@ public class Constants {
|
|||||||
public static Map<String, List<String>> LISTENER_MESSAGES = new HashMap<String, List<String>>();
|
public static Map<String, List<String>> LISTENER_MESSAGES = new HashMap<String, List<String>>();
|
||||||
public static Map<String, List<String>> CHAT_MANAGEMENT_MESSAGES = new HashMap<String, List<String>>();
|
public static Map<String, List<String>> CHAT_MANAGEMENT_MESSAGES = new HashMap<String, List<String>>();
|
||||||
public static Map<String, List<String>> STAFF_MANAGEMENT_MESSAGES = new HashMap<String, List<String>>();
|
public static Map<String, List<String>> STAFF_MANAGEMENT_MESSAGES = new HashMap<String, List<String>>();
|
||||||
|
public static Map<String, String> INFORMATION = new HashMap<String, String>();
|
||||||
public static Map<String, String> PERMISSION_NODES = new HashMap<String, String>();
|
public static Map<String, String> PERMISSION_NODES = new HashMap<String, String>();
|
||||||
|
|
||||||
public Constants() {
|
public Constants() {
|
||||||
@ -46,6 +47,9 @@ public class Constants {
|
|||||||
STAFF_MANAGEMENT_MESSAGES.put("vanish.enabled", Collections.singletonList(this.main.getMessagesConfig().getConfig().getString("MESSAGES.STAFF-MANAGEMENT.VANISH.ENABLED")));
|
STAFF_MANAGEMENT_MESSAGES.put("vanish.enabled", Collections.singletonList(this.main.getMessagesConfig().getConfig().getString("MESSAGES.STAFF-MANAGEMENT.VANISH.ENABLED")));
|
||||||
STAFF_MANAGEMENT_MESSAGES.put("vanish.disabled", Collections.singletonList(this.main.getMessagesConfig().getConfig().getString("MESSAGES.STAFF-MANAGEMENT.VANISH.DISABLED")));
|
STAFF_MANAGEMENT_MESSAGES.put("vanish.disabled", Collections.singletonList(this.main.getMessagesConfig().getConfig().getString("MESSAGES.STAFF-MANAGEMENT.VANISH.DISABLED")));
|
||||||
|
|
||||||
|
// Information
|
||||||
|
INFORMATION.put("server-ip-address", this.main.getMainConfig().getConfig().getString("SERVER-IP-ADDRESS"));
|
||||||
|
|
||||||
// Permission Nodes
|
// Permission Nodes
|
||||||
PERMISSION_NODES.put("chat.bypass", this.main.getMainConfig().getConfig().getString("PERMISSION-NODES.CHAT-BYPASS"));
|
PERMISSION_NODES.put("chat.bypass", this.main.getMainConfig().getConfig().getString("PERMISSION-NODES.CHAT-BYPASS"));
|
||||||
PERMISSION_NODES.put("staff-mode.bypass", this.main.getMainConfig().getConfig().getString("PERMISSION-NODES.STAFF-MODE-BYPASS"));
|
PERMISSION_NODES.put("staff-mode.bypass", this.main.getMainConfig().getConfig().getString("PERMISSION-NODES.STAFF-MODE-BYPASS"));
|
||||||
|
@ -16,5 +16,6 @@ MONGO:
|
|||||||
CONNECTION-STRING: ""
|
CONNECTION-STRING: ""
|
||||||
DATABASE-NAME: ""
|
DATABASE-NAME: ""
|
||||||
|
|
||||||
|
SERVER-IP-ADDRESS: "dev.loganmagnan.com"
|
||||||
PERMISSION-NODES:
|
PERMISSION-NODES:
|
||||||
CHAT-BYPASS: "eventcore.chat.bypass"
|
CHAT-BYPASS: "eventcore.chat.bypass"
|
Loading…
Reference in New Issue
Block a user