Update dependencies and improve configuration management
- Updated LoLib dependency to version 3.0.0 in build.gradle.kts - Added HikariCP and MySQL connector dependencies for improved database handling - Enhanced jar minimization process to exclude JDBC pool and driver - Refactored configuration management by introducing ConfigAccessor and ConfigLoader for better file handling and validation - Removed deprecated GenerationOptions class and integrated its functionality into the new structure - Improved command error handling and added cooldown hints for admin commands
This commit is contained in:
parent
978f739045
commit
3100c53229
86 changed files with 4324 additions and 3248 deletions
|
|
@ -12,17 +12,18 @@ public final class RandomStyle implements Style {
|
|||
|
||||
public RandomStyle(String name, List<Material> materials) {
|
||||
this.name = name;
|
||||
this.materials = materials;
|
||||
this.materials = (materials == null || materials.isEmpty())
|
||||
? List.of(Material.STONE)
|
||||
: List.copyOf(materials);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Material getNext() {
|
||||
return materials.get(ThreadLocalRandom.current().nextInt(materials.size()));
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue