Skip to content

Commit fc38a1b

Browse files
committed
code: fix bug
1 parent 523d995 commit fc38a1b

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

  • src/main/java/io/github/optijava/opt_carpet_addition/utils

src/main/java/io/github/optijava/opt_carpet_addition/utils/McUtils.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
import carpet.CarpetServer;
44
import com.mojang.authlib.GameProfile;
55
import net.minecraft.server.MinecraftServer;
6+
//#if MC >= 12110
7+
//$$ import net.minecraft.server.PlayerConfigEntry;
8+
//#endif
9+
610

711
public class McUtils {
812
private static final MinecraftServer server = CarpetServer.minecraft_server;
@@ -11,7 +15,7 @@ public static boolean isOp(GameProfile gameProfile) {
1115
//#if MC < 12110
1216
return server.getPlayerManager().isOperator(gameProfile);
1317
//#else
14-
//$$ return server.getPlayerManager().isOperator(new PlayerConfigEntry(context.getSource().getPlayerOrThrow().getGameProfile()));
18+
//$$ return server.getPlayerManager().isOperator(new PlayerConfigEntry(new PlayerConfigEntry(gameProfile));
1519
//#endif
1620
}
1721
}

0 commit comments

Comments
 (0)