BukkitScheduler#runTask() already runs the task on next tick

This commit is contained in:
Akiranya 2021-09-09 17:16:32 +08:00
parent b9cd266d0e
commit 1f0c9d8a87

View File

@ -111,7 +111,7 @@ public class Soulbound extends EcoEnchant {
public void onSoulboundRespawn(@NotNull final PlayerRespawnEvent event) {
Player player = event.getPlayer();
this.getPlugin().getScheduler().runLater(() -> {
this.getPlugin().getScheduler().run(() -> {
if (!hasSoulboundItems(player)) {
return;
}
@ -138,7 +138,7 @@ public class Soulbound extends EcoEnchant {
}
player.removeMetadata("soulbound-items", this.getPlugin());
}, 1);
});
}
@EventHandler(priority = EventPriority.HIGHEST)