Update dependencies to not tbe transitive, fixes #537

This commit is contained in:
libraryaddict 2021-01-08 10:39:44 +13:00
parent f8f8107673
commit 7b51417742
2 changed files with 54 additions and 3 deletions

View File

@ -53,7 +53,6 @@
</plugins>
</build>
<properties>
<build.number>unknown</build.number>
<timestamp>${maven.build.timestamp}</timestamp>
@ -76,26 +75,31 @@
<groupId>org.ow2.asm</groupId>
<artifactId>asm</artifactId>
<version>${asm.version}</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>${lombok.version}</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>com.github.dmulloy2</groupId>
<artifactId>ProtocolLib</artifactId>
<version>${protocollib.version}</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId>
<version>${spigot.version}</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot</artifactId>
<version>${spigot.version}</version>
<optional>true</optional>
</dependency>
<!-- testing -->
<dependency>
@ -103,17 +107,20 @@
<artifactId>junit</artifactId>
<version>${junit.version}</version>
<scope>test</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>com.destroystokyo.paper</groupId>
<artifactId>paper-api</artifactId>
<version>${paper-api.version}</version>
<scope>provided</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>net.md-5</groupId>
<artifactId>bungeecord-chat</artifactId>
<version>${bungeecord-chat.version}</version>
<optional>true</optional>
</dependency>
</dependencies>

View File

@ -34,8 +34,9 @@ public class LibsEquipment implements EntityEquipment {
for (int i = 0; i < equipment.length; i++) {
ItemStack item = equipment[i];
if (item == null)
if (item == null) {
continue;
}
newEquip.equipment[i] = item.clone();
}
@ -48,8 +49,9 @@ public class LibsEquipment implements EntityEquipment {
}
public void setItem(EquipmentSlot slot, ItemStack item) {
if (getItem(slot) == item)
if (getItem(slot) == item) {
return;
}
equipment[slot.ordinal()] = item;
flagWatcher.sendItemStack(slot, item);
@ -216,4 +218,46 @@ public class LibsEquipment implements EntityEquipment {
public Entity getHolder() {
throw new UnsupportedOperationException("This is not supported on a disguise");
}
@Override
@Deprecated
public void setBoots(ItemStack boots, boolean silent) {
setBoots(boots);
}
@Override
@Deprecated
public void setChestplate(ItemStack chestplate, boolean silent) {
setChestplate(chestplate);
}
@Override
@Deprecated
public void setLeggings(ItemStack leggings, boolean silent) {
setLeggings(leggings);
}
@Override
@Deprecated
public void setHelmet(ItemStack helmet, boolean silent) {
setHelmet(helmet);
}
@Override
@Deprecated
public void setItem(EquipmentSlot equipmentSlot, ItemStack itemStack, boolean silent) {
setItem(equipmentSlot, itemStack);
}
@Override
@Deprecated
public void setItemInMainHand(ItemStack itemStack, boolean silent) {
setItemInMainHand(itemStack);
}
@Override
@Deprecated
public void setItemInOffHand(ItemStack itemStack, boolean silent) {
setItemInOffHand(itemStack);
}
}