From ebd17fdf814d1e4cb5fff0b7cea644f9ffede4a2 Mon Sep 17 00:00:00 2001 From: TheMode Date: Thu, 15 Jul 2021 18:31:10 +0200 Subject: [PATCH] Inline EffectPacket --- .../java/net/minestom/server/registry/ProtocolObject.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main/java/net/minestom/server/registry/ProtocolObject.java b/src/main/java/net/minestom/server/registry/ProtocolObject.java index a2d695ac8..ab201b9b9 100644 --- a/src/main/java/net/minestom/server/registry/ProtocolObject.java +++ b/src/main/java/net/minestom/server/registry/ProtocolObject.java @@ -3,20 +3,25 @@ package net.minestom.server.registry; import net.kyori.adventure.key.Key; import net.kyori.adventure.key.Keyed; import net.minestom.server.utils.NamespaceID; +import org.jetbrains.annotations.Contract; import org.jetbrains.annotations.NotNull; public interface ProtocolObject extends Keyed { + @Contract(pure = true) @NotNull NamespaceID namespace(); @Override + @Contract(pure = true) default @NotNull Key key() { return namespace(); } + @Contract(pure = true) default @NotNull String name() { return namespace().asString(); } + @Contract(pure = true) int id(); }