Huge refactor improving the handling of players being given items, or situations where items are exchanged

This commit is contained in:
Player Name
2025-04-06 08:17:21 +00:00
committed by Ryan
parent 3d7f1689f3
commit 300b714048
49 changed files with 236 additions and 472 deletions
@@ -14,8 +14,8 @@ class DarklightListener : InteractionListener {
if (!hasRequirement(player, Quests.SHADOW_OF_THE_STORM) || (!player.inventory.contains(Items.BLACK_MUSHROOM_INK_4622, 1) && (!player.inventory.contains(Items.SILVERLIGHT_2402, 1))))
return@onUseWith false
if (removeItem(player, used.id) && removeItem(player, with.id))
addItem(player, Items.DARKLIGHT_6746)
return@onUseWith true
return@onUseWith addItem(player, Items.DARKLIGHT_6746)
return@onUseWith false
}
}
}