ContentAPI

This commit is contained in:
Bishop 2026-07-26 10:56:52 -05:00
parent 9ab4edc276
commit 83c6a961ec

View file

@ -1,5 +1,6 @@
package core.game.node.entity.player.info.login;
import core.api.Container;
import core.api.EquipmentSlot;
import core.game.component.Component;
import core.game.node.entity.player.Player;
@ -146,7 +147,7 @@ public final class LoginConfiguration {
//We should have already been doing this.
//Frankly, I don't even want to imagine the number of bugs us *not* doing this has caused.
if (item == null) continue;
if (player.getEquipment().remove(item)) {
if (removeItem(player, item, Container.EQUIPMENT)) {
if (!InteractionListeners.run(item.getId(), player, item, true) || !player.getEquipment().add(item, true, false)) {
player.sendMessage(colorize("%RAs you can no longer wear " + item.getName() + ", it has been unequipped."));
addItemOrBank(player, item.getId(), item.getAmount());