Package net.minecraft.world.WorldSettings

Examples of net.minecraft.world.WorldSettings.GameType


    super.setExtraReach(entity, reach);
    Minecraft mc = Minecraft.getMinecraft();
    EntityPlayer player = mc.thePlayer;
    if(entity == player) {
      if(!(mc.playerController instanceof IExtendedPlayerController)) {
        GameType type = ReflectionHelper.getPrivateValue(PlayerControllerMP.class, mc.playerController, LibObfuscation.CURRENT_GAME_TYPE);
        NetHandlerPlayClient net = ReflectionHelper.getPrivateValue(PlayerControllerMP.class, mc.playerController, LibObfuscation.NET_CLIENT_HANDLER);
        BotaniaPlayerController controller = new BotaniaPlayerController(mc, net);
        controller.setGameType(type);
        mc.playerController = controller;
      }
View Full Code Here


        EntityPlayerMP player = (EntityPlayerMP) e.entityPlayer;
        UserIdent ident = new UserIdent(player);

        checkPlayerInventory(player);

        GameType gm = stringToGameType(APIRegistry.perms.getUserPermissionProperty(ident, ModuleProtection.PERM_GAMEMODE));
        if (gm == GameType.NOT_SET)
            gm = GameType.SURVIVAL;
        if (gm != GameType.NOT_SET)
        {
            GameType lastGm = player.theItemInWorldManager.getGameType();
            if (lastGm != gm)
            {
                player.setGameType(gm);
                // OutputHandler.chatNotification(player, "You gamemode has been changed to " + gm.getName());
            }
View Full Code Here

TOP

Related Classes of net.minecraft.world.WorldSettings.GameType

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.