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