Skip to content

Commit

Permalink
Change SavedDisguises to run before a normal event priority, so Event…
Browse files Browse the repository at this point in the history
…Priority.LOW. Hopefully fixes skbee
  • Loading branch information
libraryaddict committed Nov 24, 2024
1 parent fedde0d commit 1051821
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ public void onWorldUnload(WorldUnloadEvent event) {
}
}

@EventHandler
@EventHandler(priority = EventPriority.LOW)
public void onChunkLoad(ChunkLoadEvent event) {
if (!DisguiseConfig.isSaveEntityDisguises() || NmsVersion.v1_18.isSupported()) {
return;
Expand All @@ -366,7 +366,7 @@ public void onChunkLoad(ChunkLoadEvent event) {
}
}

@EventHandler
@EventHandler(priority = EventPriority.LOW)
public void onWorldLoad(WorldLoadEvent event) {
if (!DisguiseConfig.isSaveEntityDisguises()) {
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,13 @@
import me.libraryaddict.disguise.utilities.DisguiseUtilities;
import org.bukkit.entity.Entity;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.Listener;
import org.bukkit.event.world.EntitiesLoadEvent;
import org.bukkit.event.world.EntitiesUnloadEvent;

public class DisguiseListener1_18 implements Listener {
@EventHandler
@EventHandler(priority = EventPriority.LOW)
public void onEntitiesLoad(EntitiesLoadEvent event) {
if (!DisguiseConfig.isSaveEntityDisguises()) {
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import org.bukkit.entity.Entity;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.Listener;
import org.bukkit.event.player.PlayerToggleSneakEvent;
import org.bukkit.scheduler.BukkitRunnable;
Expand All @@ -21,7 +22,7 @@ public class PaperDisguiseListener implements Listener {
private Boolean isWeird;
private int count;

@EventHandler
@EventHandler(priority = EventPriority.LOW)
public void onEntityLoad(EntityAddToWorldEvent event) {
if (!DisguiseConfig.isSaveEntityDisguises()) {
return;
Expand Down

0 comments on commit 1051821

Please sign in to comment.