Skip to content

Commit

Permalink
Fix item lore mechanism (!!!!) with stackability
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmonkey4eva committed May 12, 2017
1 parent 10d8a05 commit 1703ac0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
@@ -1,5 +1,6 @@
package net.aufdemrand.denizen.objects.properties.item;

import net.aufdemrand.denizen.Settings;
import net.aufdemrand.denizen.objects.dItem;
import net.aufdemrand.denizen.scripts.containers.core.ItemScriptHelper;
import net.aufdemrand.denizencore.objects.Element;
Expand Down Expand Up @@ -135,7 +136,9 @@ public void adjust(Mechanism mechanism) {
ItemMeta meta = item.getItemStack().getItemMeta();
dList lore = mechanism.getValue().asType(dList.class);
if (item.isItemscript()) {
lore.add(0, ItemScriptHelper.createItemScriptID(item.getScriptName()));
if (!Settings.packetInterception()) {
lore.add(0, ItemScriptHelper.createItemScriptID(item.getScriptName()));
}
}
for (int i = 0; i < lore.size(); i++) {
lore.set(i, EscapeTags.unEscape(lore.get(i)));
Expand Down
Expand Up @@ -520,8 +520,6 @@ public boolean emulateSpecialRecipeResultShiftClick(CraftingInventory inventory,
inventory.setResult(resultStack);

// Update the player's inventory
//
// TODO: Replace with non-deprecated method once one is added to Bukkit
player.updateInventory();
}
return true;
Expand Down

0 comments on commit 1703ac0

Please sign in to comment.