You can no longer use the synctouch book as an enchanted synctouch item.

SyncTouch enchanting will now work as advertised.
This commit is contained in:
Brianna O'Keefe 2018-10-28 17:04:43 -04:00
parent a362dc1145
commit 599e64857f
2 changed files with 3 additions and 2 deletions

View File

@ -36,8 +36,6 @@ public class InventoryListeners implements Listener {
Player player = (Player) event.getWhoClicked();
if (inv == null || event.getCurrentItem() == null) return;
if (event.getRawSlot() > event.getView().getTopInventory().getSize() - 1) return;
if (event.getCursor() != null && event.getCurrentItem() != null) {
ItemStack c = event.getCursor();
ItemStack item = event.getCurrentItem();
@ -54,6 +52,8 @@ public class InventoryListeners implements Listener {
}
}
if (event.getRawSlot() > event.getView().getTopInventory().getSize() - 1) return;
if (!event.getCurrentItem().hasItemMeta()) return;
if (doFilter(event)) return;

View File

@ -16,6 +16,7 @@ public class Methods {
try {
if (p.getItemInHand().hasItemMeta()
&& p.getItemInHand().getType() != Material.AIR
&& p.getItemInHand().getType() != Material.ENCHANTED_BOOK
&& p.getItemInHand().getItemMeta().hasLore()) {
for (String str : p.getItemInHand().getItemMeta().getLore()) {
if (str.equals(Arconix.pl().getApi().format().formatText("&7Sync Touch")) || str.equals(Arconix.pl().getApi().format().formatText("&aSync Touch"))) {