Skip to content

Commit

Permalink
Fix #163
Browse files Browse the repository at this point in the history
  • Loading branch information
DaPigGuy committed May 23, 2018
1 parent d572fc3 commit 3ae04fc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/PiggyCustomEnchants/EventListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ public function onTransaction(InventoryTransactionEvent $event)

foreach ($book->getEnchantments() as $enchant) {
$is_customenchant = $enchant->getType() instanceof CustomEnchants;
if (!$is_customenchant || $this->plugin->canBeEnchanted($equipment, $enchant, $enchant->getLevel())) {//TODO: Check XP
if (!$is_customenchant || $this->plugin->canBeEnchanted($equipment, $enchant, $enchant->getLevel()) === true) {//TODO: Check XP
$success = true;
if ($is_customenchant) {
$equipment = $this->plugin->addEnchantment($equipment, $enchant->getId(), $enchant->getLevel());
Expand Down
2 changes: 1 addition & 1 deletion src/PiggyCustomEnchants/Main.php
Original file line number Diff line number Diff line change
Expand Up @@ -723,7 +723,7 @@ public function translateColorNameToTextFormat($color)
* @param Item $item
* @param $enchant
* @param $level
* @return bool
* @return bool|int
*/
public function canBeEnchanted(Item $item, $enchant, $level)
{
Expand Down

0 comments on commit 3ae04fc

Please sign in to comment.