Added guava and asynchronous window items processing

This commit is contained in:
Auxilor
2021-11-02 13:53:30 +00:00
parent db2ea7daa9
commit c0686ca386
6 changed files with 57 additions and 17 deletions

View File

@@ -1,6 +1,5 @@
package com.willfp.eco.core.display;
import lombok.Setter;
import lombok.experimental.UtilityClass;
import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack;
@@ -21,7 +20,6 @@ public class Display {
/**
* The display handler.
*/
@Setter
private static DisplayHandler handler = null;
/**
@@ -162,4 +160,29 @@ public class Display {
module.display(itemStack, player, args);
}
}
/**
* Set the display handler.
* <p>
* Internal API component, you will cause bugs if you create your own handler.
*
* @param handler The handler.
*/
@ApiStatus.Internal
public static void setHandler(@NotNull final DisplayHandler handler) {
Display.handler = handler;
}
/**
* Get the display handler.
* <p>
* In plugins, there is never any reason to use the display handler directly,
* this is for internal use only.
*
* @return The handler.
*/
@ApiStatus.Internal
public static DisplayHandler getHandler() {
return handler;
}
}