summaryrefslogtreewikicommitdiff
path: root/src/main/java/net/tylermurphy/hideAndSeek/configuration/Config.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/net/tylermurphy/hideAndSeek/configuration/Config.java')
-rw-r--r--src/main/java/net/tylermurphy/hideAndSeek/configuration/Config.java18
1 files changed, 17 insertions, 1 deletions
diff --git a/src/main/java/net/tylermurphy/hideAndSeek/configuration/Config.java b/src/main/java/net/tylermurphy/hideAndSeek/configuration/Config.java
index 123432d..4130ec7 100644
--- a/src/main/java/net/tylermurphy/hideAndSeek/configuration/Config.java
+++ b/src/main/java/net/tylermurphy/hideAndSeek/configuration/Config.java
@@ -90,7 +90,8 @@ public class Config {
leaveOnEnd,
mapSaveEnabled,
allowNaturalCauses,
- saveInventory;
+ saveInventory,
+ blockhuntEnabled;
public static int
minPlayers,
@@ -126,6 +127,9 @@ public class Config {
blockedCommands,
blockedInteracts;
+ public static List<Material>
+ blockhuntBlocks;
+
public static String
LOBBY_TITLE,
GAME_TITLE,
@@ -288,6 +292,18 @@ public class Config {
}
bungeeLeave = config.getString("leaveType") == null || config.getString("leaveType").equalsIgnoreCase("proxy");
leaveServer = config.getString("leaveServer");
+ blockhuntEnabled = config.getBoolean("blockhunt.enabled") && Main.getInstance().supports(9);
+ blockhuntBlocks = new ArrayList<>();
+ tempInteracts = config.getStringList("blockhunt.blocks");
+ for(String id : tempInteracts) {
+ Optional<XMaterial> optional_mat = XMaterial.matchXMaterial(id);
+ if (optional_mat.isPresent()) {
+ Material mat = optional_mat.get().parseMaterial();
+ if (mat != null) {
+ blockhuntBlocks.add(mat);
+ }
+ }
+ }
//Leaderboard
LOBBY_TITLE = leaderboard.getString("lobby.title");