mirror of
https://github.com/darksaid98/SiegeEngines.git
synced 2026-12-01 14:38:55 +00:00
Version Bump v0.7.2
More small Fixes, repaired the ability to destroy siege engines with other projectiles/arrows/fired weapons
This commit is contained in:
1 parent
d7276d323a
commit
7e1a4a6269
6 files changed
+53
-36
No files matched your search
@@ -1,8 +1,11 @@
|
||||
package com.github.alathra.siegeengines.config;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.LinkedHashMap;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.Sound;
|
||||
import org.bukkit.configuration.file.FileConfiguration;
|
||||
@@ -31,6 +34,9 @@ public class Config {
|
||||
public static int maxSiegeEnginesControlled = 5;
|
||||
public static boolean autoReload = false;
|
||||
|
||||
|
||||
public static HashSet<World> disabledWorlds = new HashSet<>();
|
||||
|
||||
// Siege Engine Options - Defaults
|
||||
public static int trebuchetShotAmount = 1;
|
||||
public static float trebuchetVelocityPerFuel = 0.3f;
|
||||
@@ -87,6 +93,18 @@ public class Config {
|
||||
}
|
||||
|
||||
private static void loadSiegeEngineConfig() {
|
||||
try {
|
||||
for (String worldName : config.getStringList("DisabledWorlds")) {
|
||||
World world = Bukkit.getWorld(worldName);
|
||||
if (world != null) {
|
||||
disabledWorlds.add(world);
|
||||
}
|
||||
}
|
||||
SiegeEnginesLogger.info("Disabled in worlds: "+ config.getStringList("DisabledWorlds"));
|
||||
} catch (Exception e) {
|
||||
SiegeEnginesLogger.warn("Missing Disabled Worlds-List");
|
||||
}
|
||||
|
||||
trebuchetShotAmount = config.getInt("SiegeEngines.Trebuchet.ShotAmount");
|
||||
trebuchetVelocityPerFuel = (float) config.getDouble("SiegeEngines.Trebuchet.VelocityPerFuel");
|
||||
trebuchetMaxFuel = config.getInt("SiegeEngines.Trebuchet.MaxFuel");
|
||||
|
||||
Reference in new issue
Block a user