Add support for custom world names

This commit is contained in:
Norbi Peti 2020-12-21 00:59:32 +01:00
parent 28b3965582
commit d70fb4f812
No known key found for this signature in database
GPG key ID: DBA4C4549A927E56
4 changed files with 6 additions and 4 deletions

View file

@ -1,4 +1,4 @@
![Java CI with Maven](https://github.com/Kas-tle/CustomDimensions/workflows/Java%20CI%20with%20Maven/badge.svg) ![Java CI with Maven](https://github.com/TBMCPlugins/CustomDimensions/workflows/Java%20CI%20with%20Maven/badge.svg)
# CustomDimensions # CustomDimensions
Custom dimension support for 1.16.4 Bukkit/Spigot/Paper servers Custom dimension support for 1.16.4 Bukkit/Spigot/Paper servers

View file

@ -6,7 +6,7 @@
<groupId>com.github.TBMCPlugins</groupId> <groupId>com.github.TBMCPlugins</groupId>
<artifactId>CustomDimensions</artifactId> <artifactId>CustomDimensions</artifactId>
<version>1.5.1</version> <version>1.5.0</version>
<build> <build>
<plugins> <plugins>
<plugin> <plugin>

View file

@ -69,7 +69,9 @@ public class CustomDimensions extends JavaPlugin implements Listener {
ResourceKey<World> worldKey = ResourceKey.a(IRegistry.L, dimKey.a()); ResourceKey<World> worldKey = ResourceKey.a(IRegistry.L, dimKey.a());
DimensionManager dimensionmanager = dimension.b(); DimensionManager dimensionmanager = dimension.b();
ChunkGenerator chunkgenerator = dimension.c(); ChunkGenerator chunkgenerator = dimension.c();
var name = dimKey.a().getKey(); String name = getConfig().getString("worldNames." + dimKey.a());
if (name == null)
name = dimKey.a().getKey();
if (Bukkit.getWorld(name) != null) { if (Bukkit.getWorld(name) != null) {
getLogger().info(name + " already loaded"); getLogger().info(name + " already loaded");
return; return;

View file

@ -1,6 +1,6 @@
name: CustomDimensions name: CustomDimensions
main: buttondevteam.customdimensions.CustomDimensions main: buttondevteam.customdimensions.CustomDimensions
version: '1.4' version: '1.5'
api-version: '1.16' api-version: '1.16'
loadbefore: loadbefore:
- Multiverse-Core - Multiverse-Core