From 304434a6350102b8d44490909b57d73cf4515132 Mon Sep 17 00:00:00 2001 From: Bukkit/Spigot Date: Mon, 27 Nov 2023 19:10:47 +1100 Subject: [PATCH] #941: Don't allow Player removal via Entity#remove By: DerFrZocker --- paper-api/src/main/java/org/bukkit/entity/Entity.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/paper-api/src/main/java/org/bukkit/entity/Entity.java b/paper-api/src/main/java/org/bukkit/entity/Entity.java index dafb5d286b..69ba14b640 100644 --- a/paper-api/src/main/java/org/bukkit/entity/Entity.java +++ b/paper-api/src/main/java/org/bukkit/entity/Entity.java @@ -257,6 +257,8 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent /** * Mark the entity's removal. + * + * @throws UnsupportedOperationException if you try to remove a {@link Player} use {@link Player#kickPlayer(String)} in this case instead */ public void remove();