Compare commits

...

2 Commits

Author SHA1 Message Date
ceze88 7a3980555f Release v3.1.8 2024-04-01 17:48:23 +02:00
ceze88 7214bb3013 Fix console spam in 1.20.4 2024-04-01 17:48:13 +02:00
4 changed files with 10 additions and 6 deletions

View File

@ -7,7 +7,7 @@
<parent>
<groupId>com.craftaro</groupId>
<artifactId>UltimateStacker-Parent</artifactId>
<version>3.1.7</version>
<version>3.1.8</version>
</parent>
<artifactId>UltimateStacker-API</artifactId>
<version>1.0.0-SNAPSHOT</version>

View File

@ -7,7 +7,7 @@
<parent>
<groupId>com.craftaro</groupId>
<artifactId>UltimateStacker-Parent</artifactId>
<version>3.1.7</version>
<version>3.1.8</version>
</parent>
<artifactId>UltimateStacker-Plugin</artifactId>

View File

@ -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)) {

View File

@ -7,7 +7,7 @@
<groupId>com.craftaro</groupId>
<artifactId>UltimateStacker-Parent</artifactId>
<packaging>pom</packaging>
<version>3.1.7</version>
<version>3.1.8</version>
<modules>
<module>UltimateStacker-API</module>