mirror of
https://github.com/songoda/UltimateStacker.git
synced 2025-02-22 14:21:32 +01:00
Fix console spam in 1.20.4
This commit is contained in:
parent
cb8a7dc505
commit
7214bb3013
@ -30,18 +30,22 @@ import java.util.UUID;
|
||||
public class EntityStackImpl implements EntityStack {
|
||||
|
||||
private final UltimateStacker plugin = UltimateStacker.getInstance();
|
||||
private Object STACKED_ENTITY_KEY;
|
||||
private static Object STACKED_ENTITY_KEY;
|
||||
private int amount;
|
||||
private LivingEntity hostEntity;
|
||||
|
||||
static {
|
||||
if (ServerVersion.isServerVersionAtLeast(ServerVersion.V1_14)) {
|
||||
STACKED_ENTITY_KEY = new org.bukkit.NamespacedKey(UltimateStacker.getInstance(), "US_AMOUNT");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets an existing stack from an entity or creates a new one if it doesn't exist.
|
||||
*
|
||||
* @param entity The entity to get the stack from.
|
||||
*/
|
||||
public EntityStackImpl(LivingEntity entity) {
|
||||
if (ServerVersion.isServerVersionAtLeast(ServerVersion.V1_14))
|
||||
this.STACKED_ENTITY_KEY = new org.bukkit.NamespacedKey(plugin, "US_AMOUNT");
|
||||
if (entity == null) return;
|
||||
if (!UltimateStacker.getInstance().getEntityStackManager().isStackedEntity(entity)) {
|
||||
if (ServerVersion.isServerVersionAtLeast(ServerVersion.V1_14)) {
|
||||
|
Loading…
Reference in New Issue
Block a user