From 24c9fc0ef1f110ca8d44d5e7ce24279ae7d8563a Mon Sep 17 00:00:00 2001 From: Andrew Steinborn Date: Sun, 19 Apr 2020 09:20:03 -0400 Subject: [PATCH] Relax GameProfileRequestEvent#setGameProfile to allow faking even in online-mode --- .../api/event/player/GameProfileRequestEvent.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/api/src/main/java/com/velocitypowered/api/event/player/GameProfileRequestEvent.java b/api/src/main/java/com/velocitypowered/api/event/player/GameProfileRequestEvent.java index 6574f9d7b..4c209056a 100644 --- a/api/src/main/java/com/velocitypowered/api/event/player/GameProfileRequestEvent.java +++ b/api/src/main/java/com/velocitypowered/api/event/player/GameProfileRequestEvent.java @@ -60,13 +60,11 @@ public final class GameProfileRequestEvent { } /** - * Sets the game profile to use for this connection. It is invalid to use this method on an - * online-mode connection. + * Sets the game profile to use for this connection. * * @param gameProfile the profile for this connection, {@code null} uses the original profile */ public void setGameProfile(@Nullable GameProfile gameProfile) { - Preconditions.checkState(!onlineMode, "Profiles can not be faked in online mode!"); this.gameProfile = gameProfile; }