Removed useless async task

This commit is contained in:
Jules 2023-03-09 18:45:43 +01:00
parent 73e4f60482
commit 5f1e32d581
3 changed files with 64 additions and 53 deletions

View File

@ -7,6 +7,11 @@ import org.bukkit.event.HandlerList;
import java.util.List;
/**
* @deprecated Will be removed in the future. SCRIPTS must replace these
* because there are no events which can support both sync and async
*/
@Deprecated
public class GenerateLoreEvent extends Event {
private static final HandlerList handlers = new HandlerList();

View File

@ -4,6 +4,11 @@ import org.bukkit.event.Event;
import org.bukkit.event.HandlerList;
import org.bukkit.inventory.ItemStack;
/**
* @deprecated Will be removed in the future. SCRIPTS must replace these
* because there are no events which can support both sync and async
*/
@Deprecated
public class ItemBuildEvent extends Event {
private static final HandlerList handlers = new HandlerList();

View File

@ -116,7 +116,8 @@ public class CraftingStationView extends PluginInventory {
inv.setItem(layout.getQueueSlots().get(j - queueOffset),
ConfigItems.QUEUE_ITEM_DISPLAY.newBuilder(queue.getCrafts().get(j), j + 1).build());
}
}.runTaskTimerAsynchronously(MMOItems.plugin, 0, 20);
}.runTaskTimer(MMOItems.plugin, 0, 20);
if (station.getItemOptions().hasFill())
for (int j = 0; j < layout.getSize(); j++)
if (inv.getItem(j) == null || inv.getItem(j).getType() == Material.AIR)