1
mirror of https://github.com/StarWishsama/Slimefun4.git synced 2024-09-20 11:45:51 +00:00

Update Talisman.java

This commit is contained in:
TheBusyBiscuit 2020-10-30 23:05:55 +01:00 committed by GitHub
parent e953eb1c81
commit 3471932050
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -182,19 +182,27 @@ public class Talisman extends SlimefunItem {
ItemStack possibleTalisman = retrieveTalismanFromInventory(p.getInventory(), talisman.getItem());
if (possibleTalisman != null && Slimefun.hasUnlocked(p, talisman, true)) {
if (possibleTalisman != null) {
if (Slimefun.hasUnlocked(p, talisman, true)) {
activateTalisman(e, p, p.getInventory(), talisman, possibleTalisman);
return possibleTalisman;
} else {
return null;
}
}
possibleTalisman = retrieveTalismanFromInventory(p.getEnderChest(), talisman.getEnderVariant());
if (possibleTalisman != null && Slimefun.hasUnlocked(p, talisman, true)) {
if (possibleTalisman != null) {
if (Slimefun.hasUnlocked(p, talisman, true)) {
activateTalisman(e, p, p.getEnderChest(), talisman, possibleTalisman);
return possibleTalisman;
} else {
return null;
}
}
return possibleTalisman;
return null;
}
@Nullable