Skip to content

Commit

Permalink
Fix drop enchanting
Browse files Browse the repository at this point in the history
  • Loading branch information
cyberpwnn committed Dec 15, 2016
1 parent 939e2b2 commit 4d42510
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.cyberpwn</groupId>
<artifactId>effex</artifactId>
<version>4.9</version>
<version>5</version>
<name>Effex</name>
<description>Cool Effex for enchantments and potions</description>
<properties>
Expand Down
5 changes: 1 addition & 4 deletions src/main/java/org/cyberpwn/effex/EffexController.java
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,6 @@
import org.phantomapi.nms.NMSX;
import org.phantomapi.physics.VectorMath;
import org.phantomapi.stack.Stack;
import org.phantomapi.stack.StackedInventory;
import org.phantomapi.sync.Task;
import org.phantomapi.sync.TaskLater;
import org.phantomapi.util.C;
Expand Down Expand Up @@ -1675,9 +1674,7 @@ public void on(InventoryClickEvent e)
sendDrop(meta.getStoredEnchants().get(i), (Player) e.getWhoClicked());
}

StackedInventory inv = new StackedInventory(e.getClickedInventory());
inv.setStack(e.getSlot(), t);
inv.thrash();
e.getClickedInventory().setItem(e.getSlot(), t.toItemStack());

e.setCursor(null);
e.setCancelled(true);
Expand Down

0 comments on commit 4d42510

Please sign in to comment.