Examples of ArenaRegion


Examples of com.garbagemule.MobArena.region.ArenaRegion

        }
       
        // Split the string by semicolons
        String[] spawns = spawnString.split(";");
       
        ArenaRegion region = arena.getRegion();
        for (String spawn : spawns) {
            Location spawnpoint = region.getSpawnpoint(spawn.trim());
           
            if (spawnpoint == null) {
                Messenger.warning("Spawnpoint '" + spawn + "' in wave '" + name + "' for arena '" + arena.configName() + "' could not be parsed!");
                continue;
            }
View Full Code Here

Examples of com.garbagemule.MobArena.region.ArenaRegion

            this.next = color(String.format(
                    "Setup Mode for arena &a%s&r. Type &e?&r for help.",
                    "&a" + arena.configName() + "&r"
            ));

            ArenaRegion region = arena.getRegion();
            if (!region.isSetup()){
                // Region points
                if (!region.isDefined()) {
                    missing.add("p1");
                    missing.add("p2");
                }

                // Arena, lobby, and spectator warps
                if (region.getArenaWarp() == null) missing.add("arena");
                if (region.getLobbyWarp() == null) missing.add("lobby");
                if (region.getSpecWarp()  == null) missing.add("spectator");

                // Spawnpoints
                if (region.getSpawnpoints().isEmpty()) {
                    missing.add("spawnpoints");
                }
            }
        }
View Full Code Here

Examples of com.garbagemule.MobArena.region.ArenaRegion

        /**
         * Show things.
         */
        private Prompt show(ConversationContext context, String s) {
            ArenaRegion region = arena.getRegion();
            String toShow = s.split(" ")[1].trim();

            // Regions
            if (toShow.equalsIgnoreCase("r") || toShow.equalsIgnoreCase("regions")) {
                if (region.isDefined()) {
                    region.showRegion(player);
                    if (region.isLobbyDefined()) {
                        region.showLobbyRegion(player);
                        next = formatYellow("Showing both %s.", "regions");
                    } else {
                        next = formatYellow("Showing %s (lobby region not defined).", "arena region");
                    }
                } else if (region.isLobbyDefined()) {
                    region.showLobbyRegion(player);
                    next = formatYellow("Showing %s (arena region not defined).", "lobby region");
                } else {
                    next = "No regions have been defined yet.";
                }
                return this;
            } else if (toShow.equalsIgnoreCase("ar")) {
                if (region.isDefined()) {
                    next = formatYellow("Showing %s.", "arena region");
                    region.showRegion(player);
                } else {
                    next = "The region has not been defined yet.";
                }
                return this;
            } else if (toShow.equalsIgnoreCase("lr")) {
                if (region.isLobbyDefined()) {
                    next = formatYellow("Showing %s.", "lobby region");
                    region.showLobbyRegion(player);
                } else {
                    next = "The lobby region has not been defined yet.";
                }
                return this;
            }

            // Warps
            if (toShow.matches("arena|lobby|spec(tator)?|exit")) {
                next = formatYellow("Showing %s warp.", toShow);
                Location loc;
                loc = toShow.equals("arena")     ? region.getArenaWarp() :
                      toShow.equals("lobby")     ? region.getLobbyWarp() :
                      toShow.equals("spec")      ? region.getSpecWarp()  :
                      toShow.equals("spectator") ? region.getSpecWarp()  :
                      toShow.equals("exit")      ? region.getExitWarp()  : null;
                region.showBlock(player, loc, 35, (byte) 14);
                return this;
            }

            // Spawnpoints
            if (toShow.matches("sp(awn(point)?s?)?")) {
                next = formatYellow("Showing %s.", "spawnpoints");
                region.showSpawns(player);
                return this;
            }

            // Chests
            if (toShow.matches("c((hest(s)?)?|on(tainer(s)?)?)")) {
                next = formatYellow("Showing %s.", "containers");
                region.showChests(player);
                return this;
            }

            // Show the "show help", if invalid thing
            return acceptInput(context, "show ?");
View Full Code Here

Examples of com.garbagemule.MobArena.region.ArenaRegion

            sign.update();
        }
        world.getBlockAt(lx2-2,ly1+1,lz1+2).setType(Material.IRON_BLOCK);
       
        // Set up the monster points.
        ArenaRegion region = arena.getRegion();
        region.set("p1", new Location(world, x1, ly1, z1));
        region.set("p2", new Location(world, x2, y2+1, z2));
       
        region.set("arena", new Location(world, loc.getX(), y1+1, loc.getZ()));
        region.set("lobby", new Location(world, x1+2, ly1+1, z1+2));
        region.set("spectator", new Location(world, loc.getX(), y2+1, loc.getZ()));
       
        region.addSpawn("s1", new Location(world, x1+3, y1+2, z1+3));
        region.addSpawn("s2", new Location(world, x1+3, y1+2, z2-3));
        region.addSpawn("s3", new Location(world, x2-3, y1+2, z1+3));
        region.addSpawn("s4", new Location(world, x2-3, y1+2, z2-3));
        region.save();
       
        am.reloadConfig();
        return true;
    }
View Full Code Here

Examples of com.garbagemule.MobArena.region.ArenaRegion

       
        this.name     = name;
        this.world    = world;
        this.plugin   = plugin;
        this.settings = makeSection(section, "settings");
        this.region   = new ArenaRegion(section, this);
       
        this.enabled = settings.getBoolean("enabled", false);
        this.protect = settings.getBoolean("protect", true);
        this.running = false;
        this.edit    = 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.