Examples of WorldType


Examples of com.google.gwt.maeglin89273.game.ashinyballonthecross.shared.WorldType

 
  private void loadPlayerAchievements(String value){
    try{
      JSONObject object=JSONParser.parseStrict(MEngine.getCipher().decrypt(value)).isObject();
      this.encryptedAchvs=value;
      WorldType type;
      int[] scores;
      JSONArray worldScores;
      for(String typeString:object.keySet()){
        type=WorldType.valueOf(typeString);
        worldScores=object.get(typeString).isArray();
View Full Code Here

Examples of org.bukkit.WorldType

      return;
   
    PacketContainer loginPacket = new PacketContainer(PacketType.Play.Server.LOGIN);
    StructureModifier<WorldType> worldAccess = loginPacket.getWorldTypeModifier();
   
    WorldType testValue = WorldType.LARGE_BIOMES;
   
    assertNull(worldAccess.read(0));
   
    // Insert and read back
    worldAccess.write(0, testValue);
View Full Code Here

Examples of org.bukkit.WorldType

  }

  @Override
  public WorldType select(String arg, CommandSender sender)
  {
    WorldType ret = null;
   
    // "DEFAULT_1_1" --> "11"
    // "LARGE_BIOMES" --> "large"
    // "Default" --> ""
    arg = arg.toLowerCase();
View Full Code Here

Examples of org.bukkit.WorldType

        // If they didn't specify a type, default to NORMAL
        if (typeString == null) {
            typeString = "NORMAL";
        }
        WorldType type = EnvironmentCommand.getWorldTypeFromString(typeString);
        if (type == null) {
            sender.sendMessage(ChatColor.RED + "That is not a valid World Type.");
            EnvironmentCommand.showWorldTypes(sender);
            return;
        }
View Full Code Here

Examples of org.bukkit.WorldType

                }
            }

            world.setSeed(theSeed);
        }
        WorldType type = world.getWorldType();

        if (this.deleteWorld(name, false, false)) {
            this.doLoad(name, true, type);
            SafeTTeleporter teleporter = this.plugin.getSafeTTeleporter();
            Location newSpawn = world.getSpawnLocation();
View Full Code Here

Examples of org.spout.vanilla.data.WorldType

    final ManagedMap data = world.getData();
    final Human human = getOwner().add(Human.class);
    GameMode gamemode = null;
    Difficulty difficulty = data.get(VanillaData.DIFFICULTY);
    Dimension dimension = data.get(VanillaData.DIMENSION);
    WorldType worldType = data.get(VanillaData.WORLD_TYPE);

    if (human != null) {
      gamemode = human.getGameMode();
    }
    getSession().send(new PlayerRespawnMessage(0, difficulty.getId(), gamemode.getId(), 256, worldType.toString()));
    getSession().send(new PlayerRespawnMessage(1, difficulty.getId(), gamemode.getId(), 256, worldType.toString()));
    getSession().send(new PlayerRespawnMessage(dimension.getId(), difficulty.getId(), gamemode.getId(), 256, worldType.toString()));

    if (human != null) {
      human.updateAbilities();
    }
View Full Code Here

Examples of org.spout.vanilla.data.WorldType

      }
      final ManagedMap data = session.getPlayer().getWorld().getData();
      final Human human = session.getPlayer().add(Human.class);
      final Difficulty difficulty = data.get(VanillaData.DIFFICULTY);
      final Dimension dimension = data.get(VanillaData.DIMENSION);
      final WorldType worldType = data.get(VanillaData.WORLD_TYPE);

      GameMode gamemode;

      int entityId = session.getPlayer().getId();

      //  MC Packet Order: 0x01 Login, 0xFA Custom (ServerTypeName), 0x06 SpawnPos, 0xCA PlayerAbilities, 0x10 BlockSwitch
      gamemode = data.get(VanillaData.GAMEMODE);
      final PlayerLoginRequestMessage idMsg = new PlayerLoginRequestMessage(entityId, worldType.toString(), gamemode.getId(), (byte) dimension.getId(), difficulty.getId(), (byte) server.getMaxPlayers());
      session.send(Session.SendType.FORCE, idMsg);
      session.setState(Session.State.GAME);
      if (human.getAttachedCount() <= 1) {
        // If we haven't logged in before, we want to set all abilities to the default gamemode
        human.setGamemode(gamemode, false);
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.