diff --git a/pom.xml b/pom.xml
index ebaf017..7fe8fcb 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1,59 +1,65 @@
-
- 4.0.0
-
- buttondevteam
- ChunkArchive
- 0.0.1-SNAPSHOT
- jar
-
-
-
- src/main/resources
-
- **/*.java
-
-
-
-
-
- maven-compiler-plugin
- 3.5.1
-
-
- 1.8
-
-
-
-
-
-
- spigot-repo
- https://hub.spigotmc.org/nexus/content/repositories/snapshots/
-
-
- jitpack.io
- https://jitpack.io/
-
-
-
-
- org.spigotmc
- spigot-api
- 1.12-R0.1-SNAPSHOT
- provided
-
-
- org.bukkit
- craftbukkit
- 1.12.2-R0.1-SNAPSHOT
- provided
-
-
- junit
- junit
- 3.8.1
- test
-
-
-
+
+ 4.0.0
+
+ buttondevteam
+ ChunkArchive
+ 0.0.1-SNAPSHOT
+ jar
+
+
+
+ src/main/resources
+
+ **/*.java
+
+
+
+
+
+ maven-compiler-plugin
+ 3.5.1
+
+
+ 1.8
+
+
+
+
+
+
+ spigot-repo
+ https://hub.spigotmc.org/nexus/content/repositories/snapshots/
+
+
+ jitpack.io
+ https://jitpack.io/
+
+
+
+
+ org.spigotmc
+ spigot-api
+ 1.12.2-R0.1-SNAPSHOT
+ provided
+
+
+ org.spigotmc
+ spigot
+ 1.12.2-R0.1-SNAPSHOT
+ provided
+
+
+ com.github.TBMCPlugins.ButtonCore
+ ButtonCore
+ master-SNAPSHOT
+ provided
+
+
+ junit
+ junit
+ 3.8.1
+ test
+
+
+
diff --git a/src/main/java/buttondevteam/ChunkArchive/Main.java b/src/main/java/buttondevteam/ChunkArchive/Main.java
index 7ed3c87..f98e526 100644
--- a/src/main/java/buttondevteam/ChunkArchive/Main.java
+++ b/src/main/java/buttondevteam/ChunkArchive/Main.java
@@ -11,31 +11,29 @@ import org.bukkit.event.Listener;
import org.bukkit.event.world.ChunkPopulateEvent;
import org.bukkit.plugin.java.JavaPlugin;
+import buttondevteam.lib.TBMCCoreAPI;
import net.minecraft.server.v1_12_R1.ChunkRegionLoader;
import net.minecraft.server.v1_12_R1.ExceptionWorldConflict;
-public class Main extends JavaPlugin implements Listener
-{
- public void onEnable()
- {
- getServer().getPluginManager().registerEvents(this, this);
+public class Main extends JavaPlugin implements Listener {
+ public void onEnable() {
+ TBMCCoreAPI.RegisterEventsForExceptions(this, this);
}
/*------------------------------------------------------------*/
-
- private final ChunkRegionLoader chunkRegionLoader =
-
- new ChunkRegionLoader(this.getDataFolder(), ((CraftServer) Bukkit.getServer())
- .getServer()
- .dataConverterManager);
-
+
+ private final ChunkRegionLoader chunkRegionLoader =
+
+ new ChunkRegionLoader(this.getDataFolder(),
+ ((CraftServer) Bukkit.getServer()).getServer().dataConverterManager);
+
/*------------------------------------------------------------*/
-
+
@EventHandler
public void onChunkPopulate(ChunkPopulateEvent event) throws IOException,
ExceptionWorldConflict
{
if (event.getWorld().getName().equals("world"))
chunkRegionLoader.saveChunk(((CraftWorld) event.getWorld()).getHandle(),
- ((CraftChunk) event.getChunk()).getHandle());
+ ((CraftChunk) event.getChunk()).getHandle(), false);
}
}