1
mirror of https://github.com/StarWishsama/Slimefun4.git synced 2024-09-19 19:25:48 +00:00
This commit is contained in:
TheBusyBiscuit 2020-07-23 00:52:59 +02:00
parent ba4282c3e7
commit 916fb554d0
2 changed files with 11 additions and 4 deletions

View File

@ -35,6 +35,7 @@
#### Fixes
* Fixed #2075
* Fixed #2093
* Fixed #2086
## Release Candidate 14 (12 Jul 2020)

View File

@ -75,7 +75,9 @@ public class ArmorTask implements Runnable {
if (armorpiece.hasDiverged(item)) {
SlimefunItem sfItem = SlimefunItem.getByItem(item);
if (!(sfItem instanceof SlimefunArmorPiece) || !Slimefun.hasUnlocked(p, sfItem, true)) {
if (!(sfItem instanceof SlimefunArmorPiece)) {
// If it isn't actually Armor, then we won't care about it.
sfItem = null;
}
@ -84,9 +86,13 @@ public class ArmorTask implements Runnable {
if (item != null && armorpiece.getItem().isPresent()) {
Slimefun.runSync(() -> {
for (PotionEffect effect : armorpiece.getItem().get().getPotionEffects()) {
p.removePotionEffect(effect.getType());
p.addPotionEffect(effect);
SlimefunArmorPiece slimefunArmor = armorpiece.getItem().get();
if (Slimefun.hasUnlocked(p, slimefunArmor, true)) {
for (PotionEffect effect : slimefunArmor.getPotionEffects()) {
p.removePotionEffect(effect.getType());
p.addPotionEffect(effect);
}
}
});
}