Package org.bukkit.World

Examples of org.bukkit.World.Environment


  }

  @Override
  public Environment select(String arg, CommandSender sender)
  {
    Environment ret = null;
   
    // "THE_END" --> "end"
    arg = arg.toLowerCase();
    arg = arg.replace("_", "");
    arg = arg.replace("the", "");
View Full Code Here


    // Further handle teleportation to worlds
    if (enteredWorld != null) {
      if (MyWorlds.allowPersonalPortals) {
        // Personal portals - which means a portal may have to be created on the other end
        // To find out where to place this portal, compare the from and to environments
        Environment oldEnvironment = entity.getWorld().getEnvironment();
        Environment newEnvironment = enteredWorld.getEnvironment();
        if (newEnvironment == Environment.THE_END) {
          // Always use this location of the world as destination
          // Anything else will cause internal logic to break
          destinationLoc = new Location(enteredWorld, 100, 50, 0);
          useTravelAgent = true;
View Full Code Here

    if (sender instanceof Player) {
      Player player = (Player) sender;
      if (player.hasPermission("cityworld.command")) {
        boolean leaving = false;
        WorldStyle style = WorldStyle.NORMAL;
        Environment environment = Environment.NORMAL;
        boolean error = false;
       
        // arguments?
        for (int n = 0; n < split.length; n++) {
          if (split[n].compareToIgnoreCase("LEAVE") == 0)
View Full Code Here

            sender.sendMessage(ChatColor.RED + "A Folder/World already exists with this name!");
            sender.sendMessage(ChatColor.RED + "If you are confident it is a world you can import with /mvimport");
            return;
        }

        Environment environment = EnvironmentCommand.getEnvFromString(env);
        if (environment == null) {
            sender.sendMessage(ChatColor.RED + "That is not a valid environment.");
            EnvironmentCommand.showEnvironments(sender);
            return;
        }
View Full Code Here

            if (p != null && (!this.plugin.getMVPerms().canEnterWorld(p, world))) {
                continue;
            }

            ChatColor color = ChatColor.GOLD;
            Environment env = world.getEnvironment();
            if (env == Environment.NETHER) {
                color = ChatColor.RED;
            } else if (env == Environment.NORMAL) {
                color = ChatColor.GREEN;
            } else if (env == Environment.THE_END) {
View Full Code Here

                useSpawnAdjust = false;
            }
        }

        String env = args.get(1);
        Environment environment = EnvironmentCommand.getEnvFromString(env);
        if (environment == null) {
            sender.sendMessage(ChatColor.RED + "That is not a valid environment.");
            EnvironmentCommand.showEnvironments(sender);
            return;
        }
View Full Code Here

        Logging.fine("Copied lots of settings");

        boolean useSpawnAdjust = this.getMVWorld(oldName).getAdjustSpawn();
        Logging.fine("Copied more settings");

        Environment environment = worldCreator.environment();
        Logging.fine("Copied most settings");
        if (newWorldFile.exists()) {
            Logging.fine("Succeeded at copying stuff");
            if (this.addWorld(newName, environment, null, null, null, generator, useSpawnAdjust)) {
                // getMVWorld() doesn't actually return an MVWorld
View Full Code Here

TOP

Related Classes of org.bukkit.World.Environment

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.