Change SavedDisguises to run before a normal event priority, so EventPriority.LOW. Hopefully fixes skbee

This commit is contained in:
libraryaddict 2024-11-24 19:25:32 +13:00
parent fedde0d3f4
commit 1051821175
3 changed files with 6 additions and 4 deletions

View File

@ -344,7 +344,7 @@ public class DisguiseListener implements Listener {
} }
} }
@EventHandler @EventHandler(priority = EventPriority.LOW)
public void onChunkLoad(ChunkLoadEvent event) { public void onChunkLoad(ChunkLoadEvent event) {
if (!DisguiseConfig.isSaveEntityDisguises() || NmsVersion.v1_18.isSupported()) { if (!DisguiseConfig.isSaveEntityDisguises() || NmsVersion.v1_18.isSupported()) {
return; return;
@ -366,7 +366,7 @@ public class DisguiseListener implements Listener {
} }
} }
@EventHandler @EventHandler(priority = EventPriority.LOW)
public void onWorldLoad(WorldLoadEvent event) { public void onWorldLoad(WorldLoadEvent event) {
if (!DisguiseConfig.isSaveEntityDisguises()) { if (!DisguiseConfig.isSaveEntityDisguises()) {
return; return;

View File

@ -5,12 +5,13 @@ import me.libraryaddict.disguise.disguisetypes.Disguise;
import me.libraryaddict.disguise.utilities.DisguiseUtilities; import me.libraryaddict.disguise.utilities.DisguiseUtilities;
import org.bukkit.entity.Entity; import org.bukkit.entity.Entity;
import org.bukkit.event.EventHandler; import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.Listener; import org.bukkit.event.Listener;
import org.bukkit.event.world.EntitiesLoadEvent; import org.bukkit.event.world.EntitiesLoadEvent;
import org.bukkit.event.world.EntitiesUnloadEvent; import org.bukkit.event.world.EntitiesUnloadEvent;
public class DisguiseListener1_18 implements Listener { public class DisguiseListener1_18 implements Listener {
@EventHandler @EventHandler(priority = EventPriority.LOW)
public void onEntitiesLoad(EntitiesLoadEvent event) { public void onEntitiesLoad(EntitiesLoadEvent event) {
if (!DisguiseConfig.isSaveEntityDisguises()) { if (!DisguiseConfig.isSaveEntityDisguises()) {
return; return;

View File

@ -11,6 +11,7 @@ import org.bukkit.Location;
import org.bukkit.entity.Entity; import org.bukkit.entity.Entity;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler; import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.Listener; import org.bukkit.event.Listener;
import org.bukkit.event.player.PlayerToggleSneakEvent; import org.bukkit.event.player.PlayerToggleSneakEvent;
import org.bukkit.scheduler.BukkitRunnable; import org.bukkit.scheduler.BukkitRunnable;
@ -21,7 +22,7 @@ public class PaperDisguiseListener implements Listener {
private Boolean isWeird; private Boolean isWeird;
private int count; private int count;
@EventHandler @EventHandler(priority = EventPriority.LOW)
public void onEntityLoad(EntityAddToWorldEvent event) { public void onEntityLoad(EntityAddToWorldEvent event) {
if (!DisguiseConfig.isSaveEntityDisguises()) { if (!DisguiseConfig.isSaveEntityDisguises()) {
return; return;