LoParkour/loparkour-vilib/src/main/java/dev/efnilite/vilib/schematic/Schematics.java
loki 8aeb547897 v1.2.4: Remove roguelike perks, update bStats to 3.2.1, add new game modes and lpschem system
- Removed roguelike perk system (double jump, magnet, shield, second chance)
- Updated bStats dependency to 3.2.1 with proper relocation
- Changed bStats plugin ID to 29754
- Added new game modes: Speedrun, Gravity Shift, Hardcore
- Implemented .lpschem format with GZIP + JSON compression
- Added JumpValidator for physics-based jump validation
- Added JumpType system (neo-jump, head-hitter, fence, trapdoor, ladder)
- Implemented Ghost system for recording/playback top players
- Added loparkour-vilib as local dependency
- Updated config with new mode settings and removed roguelike section
- Cleaned up TODO.md roadmap
2026-02-25 00:55:24 +01:00

40 lines
No EOL
1.2 KiB
Java

package dev.efnilite.vilib.schematic;
import org.bukkit.plugin.Plugin;
import org.jetbrains.annotations.NotNull;
import java.io.File;
import java.io.IOException;
import java.util.Collection;
import java.util.HashMap;
import java.util.Map;
import java.util.Set;
public class Schematics {
private static final Map<Plugin, Map<String, Schematic>> cache = new HashMap<>();
public static void addFromFiles(@NotNull Plugin plugin, @NotNull File... files) throws IOException, ClassNotFoundException {
Map<String, Schematic> current = cache.getOrDefault(plugin, new HashMap<>());
for (File file : files) {
current.put(file.getName(), Schematic.load(file, plugin));
}
cache.put(plugin, current);
plugin.getLogger().info("Loaded all schematics!");
}
public static Schematic getSchematic(@NotNull Plugin plugin, @NotNull String schematicName) {
return cache.get(plugin).get(schematicName);
}
public static Set<String> getSchematicNames(@NotNull Plugin plugin) {
return cache.get(plugin).keySet();
}
public static Collection<Schematic> getSchematics(@NotNull Plugin plugin) {
return cache.get(plugin).values();
}
}