Skip to content

Commit

Permalink
Remove OnUseFinish Event
Browse files Browse the repository at this point in the history
  • Loading branch information
iron431 committed Jun 23, 2023
1 parent 8fd7144 commit 88bc814
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 9 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package io.redspace.ironsspellbooks.player;

import io.redspace.ironsspellbooks.IronsSpellbooks;
import io.redspace.ironsspellbooks.capabilities.spell.SpellData;
import io.redspace.ironsspellbooks.spells.SpellType;
import io.redspace.ironsspellbooks.util.Utils;
Expand Down Expand Up @@ -35,12 +36,4 @@ public static void onUseItemStop(LivingEntityUseItemEvent.Stop event) {
}
}
}

public static void onUseItemFinish(LivingEntityUseItemEvent.Finish event) {
if (Utils.canImbue(event.getItem())) {
//IronsSpellbooks.LOGGER.debug("CommonPlayerEvents.onUseItemFinish set cancelled");
event.setCanceled(true);
}
//IronsSpellbooks.LOGGER.debug("CommonPlayerEvents.onUseItemFinish {} {}", event.getEntity().getLevel().isClientSide, event.getItem().getItem());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ public static void setup() {
bus.addListener(MagicEvents::onWorldTick);
bus.addListener(CommonPlayerEvents::onPlayerRightClickItem);
bus.addListener(CommonPlayerEvents::onUseItemStop);
bus.addListener(CommonPlayerEvents::onUseItemFinish);

//SPELLBOOKS
//bus.addGenericListener(ItemStack.class, SpellBookDataEvents::onAttachCapabilities);
Expand Down

0 comments on commit 88bc814

Please sign in to comment.