diff --git a/pom.xml b/pom.xml index 6b2282f..575ac05 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 net.sourcewriters.minecraft vcompat-parent - 3.0.0 + 3.0.1 pom diff --git a/vcompat-1_17_R1/pom.xml b/vcompat-1_17_R1/pom.xml index 3ff304f..2c79d40 100644 --- a/vcompat-1_17_R1/pom.xml +++ b/vcompat-1_17_R1/pom.xml @@ -5,7 +5,7 @@ net.sourcewriters.minecraft vcompat-parent - 3.0.0 + 3.0.1 vcompat-1_17_R1 @@ -19,7 +19,7 @@ net.sourcewriters.minecraft vcompat-api - 3.0.0 + ${project.parent.version} provided diff --git a/vcompat-1_18_R1/pom.xml b/vcompat-1_18_R1/pom.xml index 6c0e105..df7dc73 100644 --- a/vcompat-1_18_R1/pom.xml +++ b/vcompat-1_18_R1/pom.xml @@ -5,7 +5,7 @@ net.sourcewriters.minecraft vcompat-parent - 3.0.0 + 3.0.1 vcompat-1_18_R1 @@ -27,7 +27,7 @@ net.sourcewriters.minecraft vcompat-api - 3.0.0 + ${project.parent.version} provided diff --git a/vcompat-api/pom.xml b/vcompat-api/pom.xml index 3a9bd4a..5a7724d 100644 --- a/vcompat-api/pom.xml +++ b/vcompat-api/pom.xml @@ -3,7 +3,7 @@ net.sourcewriters.minecraft vcompat-parent - 3.0.0 + 3.0.1 vcompat-api diff --git a/vcompat-api/src/main/java/net/sourcewriters/minecraft/vcompat/provider/DataProvider.java b/vcompat-api/src/main/java/net/sourcewriters/minecraft/vcompat/provider/DataProvider.java index d7c7943..d40a58a 100644 --- a/vcompat-api/src/main/java/net/sourcewriters/minecraft/vcompat/provider/DataProvider.java +++ b/vcompat-api/src/main/java/net/sourcewriters/minecraft/vcompat/provider/DataProvider.java @@ -19,8 +19,7 @@ public class DataProvider extends VersionHandler { public static final Supplier DEFAULT_RANDOM = UUID::randomUUID; protected final NbtAdapterRegistry registry = new NbtAdapterRegistry(); - protected final DataDistributor defaultDistributor = createDistributor( - new File(Bukkit.getWorlds().get(0).getWorldFolder(), "pluginData")); + private DataDistributor defaultDistributor; protected DataProvider(VersionControl versionControl) { super(versionControl); @@ -35,10 +34,13 @@ public WrappedContainer createContainer() { } public WrappedContainer createPersistentContainer() { - return new SimpleSyntaxContainer<>(defaultDistributor.create()); + return new SimpleSyntaxContainer<>(getDefaultDistributor().create()); } public DataDistributor getDefaultDistributor() { + if (defaultDistributor == null) { + return defaultDistributor = createDistributor(new File(Bukkit.getWorlds().get(0).getWorldFolder(), "pluginData")); + } return defaultDistributor; } diff --git a/vcompat-core/pom.xml b/vcompat-core/pom.xml index 4d3a05a..ac88914 100644 --- a/vcompat-core/pom.xml +++ b/vcompat-core/pom.xml @@ -3,7 +3,7 @@ net.sourcewriters.minecraft vcompat-parent - 3.0.0 + 3.0.1 vcompat @@ -14,7 +14,7 @@ net.sourcewriters.minecraft vcompat-api - 3.0.0 + ${project.parent.version} @@ -22,17 +22,17 @@ net.sourcewriters.minecraft vcompat-legacy - 3.0.0 + ${project.parent.version} net.sourcewriters.minecraft vcompat-1_17_R1 - 3.0.0 + ${project.parent.version} net.sourcewriters.minecraft vcompat-1_18_R1 - 3.0.0 + ${project.parent.version} diff --git a/vcompat-legacy/pom.xml b/vcompat-legacy/pom.xml index 654cf49..454dc64 100644 --- a/vcompat-legacy/pom.xml +++ b/vcompat-legacy/pom.xml @@ -3,7 +3,7 @@ net.sourcewriters.minecraft vcompat-parent - 3.0.0 + 3.0.1 vcompat-legacy @@ -15,7 +15,7 @@ net.sourcewriters.minecraft vcompat-api - 3.0.0 + ${project.parent.version} provided