Compare commits
2 Commits
cb8a7dc505
...
7a3980555f
Author | SHA1 | Date |
---|---|---|
ceze88 | 7a3980555f | |
ceze88 | 7214bb3013 |
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
||||
|
|
|
@ -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