diff --git a/Server/src/main/java/core/game/content/consumable/Consumable.java b/Server/src/main/java/core/game/content/consumable/Consumable.java index 3de3c3733..8639292ca 100644 --- a/Server/src/main/java/core/game/content/consumable/Consumable.java +++ b/Server/src/main/java/core/game/content/consumable/Consumable.java @@ -54,7 +54,7 @@ public abstract class Consumable implements Plugin { } else removeItem(player, item, Container.INVENTORY); if (nextItemId != -1) { - addItem(player, nextItemId, 1); + addItem(player, nextItemId, 1, Container.INVENTORY); } final int initialLifePoints = player.getSkills().getLifepoints(); Consumables.getConsumableById(item.getId()).effect.activate(player); diff --git a/Server/src/main/java/core/game/interaction/inter/SettingTabInterface.java b/Server/src/main/java/core/game/interaction/inter/SettingTabInterface.java index 4e4d76979..ab1adeb83 100644 --- a/Server/src/main/java/core/game/interaction/inter/SettingTabInterface.java +++ b/Server/src/main/java/core/game/interaction/inter/SettingTabInterface.java @@ -8,6 +8,7 @@ import core.game.content.quest.tutorials.tutorialisland.TutorialSession; import core.game.content.quest.tutorials.tutorialisland.TutorialStage; import core.game.node.entity.player.Player; import core.plugin.Plugin; +import org.rs09.consts.Items; /** * @author 'Vexia diff --git a/Server/src/main/java/core/game/node/entity/skill/herblore/HerbCleanPlugin.java b/Server/src/main/java/core/game/node/entity/skill/herblore/HerbCleanPlugin.java index 884c5b421..668993a24 100644 --- a/Server/src/main/java/core/game/node/entity/skill/herblore/HerbCleanPlugin.java +++ b/Server/src/main/java/core/game/node/entity/skill/herblore/HerbCleanPlugin.java @@ -41,7 +41,7 @@ public final class HerbCleanPlugin extends OptionHandler { double exp = herb.getExperience(); if (removeItem(player, node.asItem(), Container.INVENTORY)){ player.getSkills().addExperience(Skills.HERBLORE, exp, true); - addItem(player, herb.getProduct().getId(), 1); + addItem(player, herb.getProduct().getId(), 1, Container.INVENTORY); player.getAudioManager().send(SFX_IDS[RandomFunction.random(SFX_IDS.length)], 1); player.getPacketDispatch().sendMessage("You clean the dirt from the " + herb.getProduct().getName().toLowerCase().replace("clean", "").trim() + " leaf."); } diff --git a/Server/src/main/kotlin/api/ContentAPI.kt b/Server/src/main/kotlin/api/ContentAPI.kt index 5d0450e9c..1e89fe728 100644 --- a/Server/src/main/kotlin/api/ContentAPI.kt +++ b/Server/src/main/kotlin/api/ContentAPI.kt @@ -145,18 +145,6 @@ fun removeItem(player: Player, item: T, container: Container = Container.INV } } -/** - * Add an item to a player's inventory - * @param player the player whose inventory to add an item to - * @param id the ID of the item to add - * @param amount the amount of the item to add, defaults to 1 - * @return true if the item exists in the given amount in the player's inventory - */ - -fun addItem(player: Player, id: Int, amount: Int = 1): Boolean{ - return addItem(player, id, amount) -} - /** * Add an item to the given player's given container * @param player the player whose container to modify