Examples of GameType


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

Examples of net.minecraft.world.WorldSettings.GameType

        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

Examples of net.yura.lobby.model.GameType

                }
            }
            else if (ProtoLobby.COMMAND_ALL_GAMETYPES.equals(command)) {
                List gametypes = (List)param;
                for (int c=0;c<gametypes.size();c++) {
                    GameType gt = (GameType)gametypes.get(c);
                    gameTypeMap.put( new Integer(gt.getId()), gt);
                }
                myclient.addGameType(gametypes);
            }
            else if (ProtoLobby.COMMAND_ADD_OR_UPDATE_GAME.equals(command)) {
                myclient.addOrUpdateGame( (Game)param );
View Full Code Here

Examples of net.yura.lobby.model.GameType

    private final GameType clientGameType;

    Set<GameRoom> gameRooms = new HashSet();

    public GameTypeRoom() {
        serverGameType = new GameType();
        clientGameType = new GameType();
    }
View Full Code Here

Examples of net.yura.lobby.model.GameType

        return count;
    }

    private ServerGame createServerGame(final GameRoom game, final LobbySession creator) {
          try {
                GameType gameType = classLoaders.get( game.getGameTypeRoom().getId() );
                ClassLoader loader = gameType.getClassLoader( new File(".").toURI().toASCIIString() );
                ServerGame serverGame = (ServerGame) Class.forName( gameType.getClassName(), true, loader ).newInstance();
                serverGame.setId(game.getId());
                serverGame.setTimeout(game.getTimeout());
                runningGames.put(game.getId(), serverGame);

                final String gameName = game.getName();
View Full Code Here

Examples of net.yura.lobby.model.GameType

    connect( config.getProperty("default.host"), Integer.parseInt(config.getProperty("default.port")));
  }

  public void valueChanged(TreeSelectionEvent e) {

                GameType node = getCurrentGameType();

                if (node == null) { return; }

    mycom.getGames( node );
                gamesModel.setDataVector(new Vector());
View Full Code Here

Examples of net.yura.lobby.model.GameType

      showAdminWindow();

    }
    else if (ac.equals("newgame")) {

        GameType gametype = getCurrentGameType();

        if (gametype!=null) {

                        LobbyGame lg;

      startLoading();
                        try {
                            lg = getLobbyGame(gametype,false);
                        }
                        finally {
                            stopLoading();
                        }

      Game newGameOptions = lg.newGameDialog(
        (java.awt.Frame)javax.swing.SwingUtilities.getAncestorOfClass(java.awt.Frame.class, this),
        gametype.getOptions(),
        myusername
      );

      if (newGameOptions!=null) {
                                newGameOptions.setType(gametype);
View Full Code Here

Examples of net.yura.lobby.model.GameType

            if(lg==null) {

    startLoading();
                try {
                    int gameId = game.getId();
                    GameType gametype = game.getType();

                    lg = getLobbyGame(gametype,true);
                    activegames.put(new Integer(gameId),lg);

                    ChatBox cb = new ChatBox(this,null,gameId);
View Full Code Here

Examples of net.yura.lobby.model.GameType

  }

        // TODO, get rid of synchronized, and put SwingWorker
        public synchronized void addGameType(List list) {

            GameType current = getCurrentGameType();
            TreePath found=null;

            DefaultMutableTreeNode root = new DefaultMutableTreeNode("root");

            for (int c=0;c<list.size();c++) {
                GameType gt = (GameType)list.get(c);

                DefaultMutableTreeNode gtNode = new DefaultMutableTreeNode(gt);
                root.add(gtNode);

                if (gt.equals(current)) {
                    found = new TreePath(gtNode.getPath());
                }
                //System.out.println("Added: "+gt.toString()+" to the game types");
            }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.