Compare commits
2 Commits
cb8a7dc505
...
7a3980555f
Author | SHA1 | Date |
---|---|---|
ceze88 | 7a3980555f | |
ceze88 | 7214bb3013 |
|
@ -7,7 +7,7 @@
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>com.craftaro</groupId>
|
<groupId>com.craftaro</groupId>
|
||||||
<artifactId>UltimateStacker-Parent</artifactId>
|
<artifactId>UltimateStacker-Parent</artifactId>
|
||||||
<version>3.1.7</version>
|
<version>3.1.8</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>UltimateStacker-API</artifactId>
|
<artifactId>UltimateStacker-API</artifactId>
|
||||||
<version>1.0.0-SNAPSHOT</version>
|
<version>1.0.0-SNAPSHOT</version>
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>com.craftaro</groupId>
|
<groupId>com.craftaro</groupId>
|
||||||
<artifactId>UltimateStacker-Parent</artifactId>
|
<artifactId>UltimateStacker-Parent</artifactId>
|
||||||
<version>3.1.7</version>
|
<version>3.1.8</version>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>UltimateStacker-Plugin</artifactId>
|
<artifactId>UltimateStacker-Plugin</artifactId>
|
||||||
|
|
||||||
|
|
|
@ -30,18 +30,22 @@ import java.util.UUID;
|
||||||
public class EntityStackImpl implements EntityStack {
|
public class EntityStackImpl implements EntityStack {
|
||||||
|
|
||||||
private final UltimateStacker plugin = UltimateStacker.getInstance();
|
private final UltimateStacker plugin = UltimateStacker.getInstance();
|
||||||
private Object STACKED_ENTITY_KEY;
|
private static Object STACKED_ENTITY_KEY;
|
||||||
private int amount;
|
private int amount;
|
||||||
private LivingEntity hostEntity;
|
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.
|
* 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.
|
* @param entity The entity to get the stack from.
|
||||||
*/
|
*/
|
||||||
public EntityStackImpl(LivingEntity entity) {
|
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 (entity == null) return;
|
||||||
if (!UltimateStacker.getInstance().getEntityStackManager().isStackedEntity(entity)) {
|
if (!UltimateStacker.getInstance().getEntityStackManager().isStackedEntity(entity)) {
|
||||||
if (ServerVersion.isServerVersionAtLeast(ServerVersion.V1_14)) {
|
if (ServerVersion.isServerVersionAtLeast(ServerVersion.V1_14)) {
|
||||||
|
|
2
pom.xml
2
pom.xml
|
@ -7,7 +7,7 @@
|
||||||
<groupId>com.craftaro</groupId>
|
<groupId>com.craftaro</groupId>
|
||||||
<artifactId>UltimateStacker-Parent</artifactId>
|
<artifactId>UltimateStacker-Parent</artifactId>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
<version>3.1.7</version>
|
<version>3.1.8</version>
|
||||||
|
|
||||||
<modules>
|
<modules>
|
||||||
<module>UltimateStacker-API</module>
|
<module>UltimateStacker-API</module>
|
||||||
|
|
Loading…
Reference in New Issue