Class ServerUtils

java.lang.Object
codechicken.lib.util.ServerUtils

public class ServerUtils extends Object
Created by covers1624 on 22/10/2016.
  • Constructor Details

    • ServerUtils

      public ServerUtils()
  • Method Details

    • getServer

      @Deprecated public static net.minecraft.server.MinecraftServer getServer()
      Deprecated.
    • getPlayer

      @Deprecated public static net.minecraft.server.level.ServerPlayer getPlayer(String playername)
      Deprecated.
    • getPlayers

      public static List<net.minecraft.server.level.ServerPlayer> getPlayers()
    • getSaveDirectory

      public static Path getSaveDirectory()
    • getSaveDirectory

      public static Path getSaveDirectory(net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level> dimension)
    • getGameProfile

      public static com.mojang.authlib.GameProfile getGameProfile(String username)
    • isPlayerOP

      public static boolean isPlayerOP(UUID uuid)
    • isPlayerOP

      public static boolean isPlayerOP(String username)
    • openContainer

      public static void openContainer(net.minecraft.server.level.ServerPlayer player, net.minecraft.world.MenuProvider containerProvider)
    • openContainer

      public static void openContainer(net.minecraft.server.level.ServerPlayer player, net.minecraft.world.MenuProvider containerProvider, Consumer<MCDataOutput> packetConsumer)