mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2025-12-29 12:09:07 +00:00
Cleanup
This commit is contained in:
@@ -30,7 +30,7 @@ import com.volmit.iris.core.loader.IrisData;
|
||||
import com.volmit.iris.core.nms.INMS;
|
||||
import com.volmit.iris.core.nms.v1X.NMSBinding1X;
|
||||
import com.volmit.iris.core.pregenerator.LazyPregenerator;
|
||||
import com.volmit.iris.core.ChunkHandler;
|
||||
import com.volmit.iris.core.service.ChunkHandlerSVC;
|
||||
import com.volmit.iris.core.service.StudioSVC;
|
||||
import com.volmit.iris.core.tools.IrisToolbelt;
|
||||
import com.volmit.iris.engine.EnginePanic;
|
||||
@@ -441,7 +441,7 @@ public class Iris extends VolmitPlugin implements Listener {
|
||||
private static void fixShading() {
|
||||
ShadeFix.fix(ComponentSerializer.class);
|
||||
}
|
||||
private ChunkHandler chunkHandler;
|
||||
private ChunkHandlerSVC chunkHandlerSVC;
|
||||
private void enable() {
|
||||
instance = this;
|
||||
services = new KMap<>();
|
||||
@@ -459,10 +459,6 @@ public class Iris extends VolmitPlugin implements Listener {
|
||||
configWatcher = new FileWatcher(getDataFile("settings.json"));
|
||||
services.values().forEach(IrisService::onEnable);
|
||||
services.values().forEach(this::registerListener);
|
||||
if(IrisSettings.get().getGeneral().useIntegratedChunkHandler) {
|
||||
chunkHandler = new ChunkHandler(this);
|
||||
Iris.info("Started Intergrated ChunkHandler");
|
||||
}
|
||||
J.s(() -> {
|
||||
J.a(() -> PaperLib.suggestPaper(this));
|
||||
J.a(() -> IO.delete(getTemp()));
|
||||
@@ -476,9 +472,11 @@ public class Iris extends VolmitPlugin implements Listener {
|
||||
UtilsSFG.UnstableMode();
|
||||
UtilsSFG.SupportedServerSoftware();
|
||||
UtilsSFG.printIncompatiblePluginWarnings();
|
||||
|
||||
UtilsSFG.unstablePrompt();
|
||||
|
||||
if(IrisSettings.get().getGeneral().useIntegratedChunkHandler) {
|
||||
chunkHandlerSVC = new ChunkHandlerSVC(this);
|
||||
Iris.info(C.LIGHT_PURPLE + "Started Intergrated ChunkHandlerSVC");
|
||||
}
|
||||
autoStartStudio();
|
||||
checkForBukkitWorlds();
|
||||
IrisToolbelt.retainMantleDataForSlice(String.class.getCanonicalName());
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
package com.volmit.iris.core.commands;
|
||||
|
||||
import com.volmit.iris.Iris;
|
||||
import com.volmit.iris.core.ChunkHandler;
|
||||
import com.volmit.iris.core.service.ChunkHandlerSVC;
|
||||
import com.volmit.iris.core.IrisSettings;
|
||||
import com.volmit.iris.core.service.StudioSVC;
|
||||
import com.volmit.iris.core.tools.IrisBenchmarking;
|
||||
@@ -212,7 +212,7 @@ public class CommandIris implements DecreeExecutor {
|
||||
}
|
||||
@Decree(description = "TEST")
|
||||
public void cpspaper() {
|
||||
ChunkHandler.exit();
|
||||
ChunkHandlerSVC.exit();
|
||||
}
|
||||
|
||||
@Decree(description = "QOL command to open a overworld studio world.", sync = true)
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package com.volmit.iris.core;
|
||||
package com.volmit.iris.core.service;
|
||||
|
||||
import com.volmit.iris.Iris;
|
||||
import com.volmit.iris.core.tools.IrisToolbelt;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Chunk;
|
||||
@@ -22,7 +21,7 @@ import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
public class ChunkHandler implements Listener {
|
||||
public class ChunkHandlerSVC implements Listener {
|
||||
// Idk how it works but it works lol
|
||||
private final JavaPlugin plugin;
|
||||
private static BukkitTask task;
|
||||
@@ -30,7 +29,7 @@ public class ChunkHandler implements Listener {
|
||||
|
||||
private static final Map<Chunk, Set<Player>> playersInChunk = new ConcurrentHashMap<>();
|
||||
|
||||
public ChunkHandler(JavaPlugin plugin) {
|
||||
public ChunkHandlerSVC(JavaPlugin plugin) {
|
||||
this.plugin = plugin;
|
||||
Bukkit.getPluginManager().registerEvents(this, plugin);
|
||||
|
||||
Reference in New Issue
Block a user