mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2025-07-19 18:55:18 +00:00
Auto stash before merge of "master" and "origin/master"
This commit is contained in:
parent
03c535e80d
commit
e1aa2f651a
@ -50,12 +50,17 @@ import com.volmit.iris.util.plugin.Metrics;
|
|||||||
import com.volmit.iris.util.plugin.Permission;
|
import com.volmit.iris.util.plugin.Permission;
|
||||||
import com.volmit.iris.util.plugin.VolmitPlugin;
|
import com.volmit.iris.util.plugin.VolmitPlugin;
|
||||||
import com.volmit.iris.util.plugin.VolmitSender;
|
import com.volmit.iris.util.plugin.VolmitSender;
|
||||||
|
import com.volmit.iris.util.reflect.ShadeFix;
|
||||||
import com.volmit.iris.util.scheduling.GroupedExecutor;
|
import com.volmit.iris.util.scheduling.GroupedExecutor;
|
||||||
import com.volmit.iris.util.scheduling.J;
|
import com.volmit.iris.util.scheduling.J;
|
||||||
import com.volmit.iris.util.scheduling.Queue;
|
import com.volmit.iris.util.scheduling.Queue;
|
||||||
import com.volmit.iris.util.scheduling.ShurikenQueue;
|
import com.volmit.iris.util.scheduling.ShurikenQueue;
|
||||||
import io.papermc.lib.PaperLib;
|
import io.papermc.lib.PaperLib;
|
||||||
import org.bukkit.*;
|
import net.kyori.adventure.platform.AudienceProvider;
|
||||||
|
import net.kyori.adventure.platform.bukkit.BukkitAudiences;
|
||||||
|
import net.kyori.adventure.text.serializer.ComponentSerializer;
|
||||||
|
import org.bukkit.Bukkit;
|
||||||
|
import org.bukkit.World;
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
@ -74,6 +79,7 @@ import java.util.*;
|
|||||||
public class Iris extends VolmitPlugin implements Listener {
|
public class Iris extends VolmitPlugin implements Listener {
|
||||||
public static KList<GroupedExecutor> executors = new KList<>();
|
public static KList<GroupedExecutor> executors = new KList<>();
|
||||||
public static Iris instance;
|
public static Iris instance;
|
||||||
|
public static BukkitAudiences audiences;
|
||||||
public static ProjectManager proj;
|
public static ProjectManager proj;
|
||||||
public static ConversionManager convert;
|
public static ConversionManager convert;
|
||||||
public static WandManager wand;
|
public static WandManager wand;
|
||||||
@ -86,6 +92,7 @@ public class Iris extends VolmitPlugin implements Listener {
|
|||||||
private static final Queue<Runnable> syncJobs = new ShurikenQueue<>();
|
private static final Queue<Runnable> syncJobs = new ShurikenQueue<>();
|
||||||
public static IrisCompat compat;
|
public static IrisCompat compat;
|
||||||
public static FileWatcher configWatcher;
|
public static FileWatcher configWatcher;
|
||||||
|
private static VolmitSender sender;
|
||||||
|
|
||||||
@Permission
|
@Permission
|
||||||
public static PermissionIris perm;
|
public static PermissionIris perm;
|
||||||
@ -103,6 +110,30 @@ public class Iris extends VolmitPlugin implements Listener {
|
|||||||
installDataPacks();
|
installDataPacks();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void onEnable() {
|
||||||
|
audiences = BukkitAudiences.create(this);
|
||||||
|
fixShading();
|
||||||
|
sender = new VolmitSender(Bukkit.getConsoleSender());
|
||||||
|
sender.setTag(getTag());
|
||||||
|
instance = this;
|
||||||
|
compat = IrisCompat.configured(getDataFile("compat.json"));
|
||||||
|
proj = new ProjectManager();
|
||||||
|
convert = new ConversionManager();
|
||||||
|
wand = new WandManager();
|
||||||
|
board = new IrisBoardManager();
|
||||||
|
linkMultiverseCore = new MultiverseCoreLink();
|
||||||
|
linkOraxen = new OraxenLink();
|
||||||
|
linkMythicMobs = new MythicMobsLink();
|
||||||
|
saplingManager = new TreeManager();
|
||||||
|
edit = new EditManager();
|
||||||
|
configWatcher = new FileWatcher(getDataFile("settings.json"));
|
||||||
|
getServer().getPluginManager().registerEvents(new CommandLocate(), this);
|
||||||
|
getServer().getPluginManager().registerEvents(new WandManager(), this);
|
||||||
|
super.onEnable();
|
||||||
|
Bukkit.getPluginManager().registerEvents(this, this);
|
||||||
|
J.s(this::lateBind);
|
||||||
|
}
|
||||||
|
|
||||||
public static void callEvent(Event e) {
|
public static void callEvent(Event e) {
|
||||||
J.s(() -> Bukkit.getPluginManager().callEvent(e));
|
J.s(() -> Bukkit.getPluginManager().callEvent(e));
|
||||||
}
|
}
|
||||||
@ -124,26 +155,8 @@ public class Iris extends VolmitPlugin implements Listener {
|
|||||||
return v;
|
return v;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onEnable() {
|
private void fixShading() {
|
||||||
instance = this;
|
ShadeFix.fix(ComponentSerializer.class);
|
||||||
compat = IrisCompat.configured(getDataFile("compat.json"));
|
|
||||||
proj = new ProjectManager();
|
|
||||||
convert = new ConversionManager();
|
|
||||||
wand = new WandManager();
|
|
||||||
board = new IrisBoardManager();
|
|
||||||
linkMultiverseCore = new MultiverseCoreLink();
|
|
||||||
linkOraxen = new OraxenLink();
|
|
||||||
linkMythicMobs = new MythicMobsLink();
|
|
||||||
saplingManager = new TreeManager();
|
|
||||||
edit = new EditManager();
|
|
||||||
configWatcher = new FileWatcher(getDataFile("settings.json"));
|
|
||||||
getServer().getPluginManager().registerEvents(new CommandLocate(), this);
|
|
||||||
getServer().getPluginManager().registerEvents(new WandManager(), this);
|
|
||||||
getServer().getPluginManager().registerEvents(new DolphinManager(), this);
|
|
||||||
getServer().getPluginManager().registerEvents(new VillagerManager(), this);
|
|
||||||
super.onEnable();
|
|
||||||
Bukkit.getPluginManager().registerEvents(this, this);
|
|
||||||
J.s(this::lateBind);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void lateBind() {
|
private void lateBind() {
|
||||||
@ -426,15 +439,9 @@ public class Iris extends VolmitPlugin implements Listener {
|
|||||||
|
|
||||||
public static void msg(String string) {
|
public static void msg(String string) {
|
||||||
try {
|
try {
|
||||||
if (instance == null) {
|
sender.sendMessage(string);
|
||||||
System.out.println("[Iris]: " + string);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
String msg = C.GRAY + "[" + C.GREEN + "Iris" + C.GRAY + "]: " + string;
|
|
||||||
Bukkit.getConsoleSender().sendMessage(msg);
|
|
||||||
} catch (Throwable e) {
|
} catch (Throwable e) {
|
||||||
System.out.println("[Iris]: " + string);
|
System.out.println(string);
|
||||||
Iris.reportError(e);
|
Iris.reportError(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user