mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-10-26 05:50:08 +00:00
Forgot to invoke doVersionCheck lol
Signed-off-by: solonovamax <solonovamax@12oclockpoint.com>
This commit is contained in:
1 file changed
+15
-11
@@ -45,6 +45,10 @@ public class TerraBukkitPlugin extends JavaPlugin {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onEnable() {
|
public void onEnable() {
|
||||||
|
if(!doVersionCheck()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
terraPlugin.getEventManager().callEvent(new PlatformInitializationEvent());
|
terraPlugin.getEventManager().callEvent(new PlatformInitializationEvent());
|
||||||
|
|
||||||
new Metrics(this, 9017); // Set up bStats.
|
new Metrics(this, 9017); // Set up bStats.
|
||||||
@@ -127,17 +131,6 @@ public class TerraBukkitPlugin extends JavaPlugin {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public @Nullable
|
|
||||||
ChunkGenerator getDefaultWorldGenerator(@NotNull String worldName, @Nullable String id) {
|
|
||||||
return new BukkitChunkGeneratorWrapper(generatorMap.computeIfAbsent(worldName, name -> {
|
|
||||||
if(!terraPlugin.getConfigRegistry().contains(id)) throw new IllegalArgumentException("No such config pack \"" + id + "\"");
|
|
||||||
ConfigPack pack = terraPlugin.getConfigRegistry().get(id);
|
|
||||||
worlds.put(worldName, pack);
|
|
||||||
return pack.getGeneratorProvider().newInstance(pack);
|
|
||||||
}));
|
|
||||||
}
|
|
||||||
|
|
||||||
@SuppressWarnings({ "deprecation", "AccessOfSystemProperties" })
|
@SuppressWarnings({ "deprecation", "AccessOfSystemProperties" })
|
||||||
private boolean doVersionCheck() {
|
private boolean doVersionCheck() {
|
||||||
logger.info("Running on version {} with {}.", VersionUtil.getMinecraftVersionInfo(), VersionUtil.getSpigotVersionInfo());
|
logger.info("Running on version {} with {}.", VersionUtil.getMinecraftVersionInfo(), VersionUtil.getSpigotVersionInfo());
|
||||||
@@ -211,4 +204,15 @@ public class TerraBukkitPlugin extends JavaPlugin {
|
|||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public @Nullable
|
||||||
|
ChunkGenerator getDefaultWorldGenerator(@NotNull String worldName, @Nullable String id) {
|
||||||
|
return new BukkitChunkGeneratorWrapper(generatorMap.computeIfAbsent(worldName, name -> {
|
||||||
|
if(!terraPlugin.getConfigRegistry().contains(id)) throw new IllegalArgumentException("No such config pack \"" + id + "\"");
|
||||||
|
ConfigPack pack = terraPlugin.getConfigRegistry().get(id);
|
||||||
|
worlds.put(worldName, pack);
|
||||||
|
return pack.getGeneratorProvider().newInstance(pack);
|
||||||
|
}));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user