packetevents icon indicating copy to clipboard operation
packetevents copied to clipboard

Lock item component is wrong

Open ghost opened this issue 11 months ago • 0 comments

Packet events has the lock item component as just a string code, it is more complex, so setting it causes client to crash

packetevents:

public class ItemLock {

    private String code;

    public ItemLock(String code) {
        this.code = code;
    }

in reality it holds an item predicate:

public record LockCode(ItemPredicate predicate) {

Fix: change string code to item predicate

ghost avatar Jan 31 '25 11:01 ghost