Examples of EpicZone


Examples of com.epicsagaonline.bukkit.EpicZones.objects.EpicZone

            EpicZonePlayer ezp = General.getPlayer(player.getName());
            Point blockPoint = new Point(event.getBlockClicked().getLocation().getBlockX(), event.getBlockClicked().getLocation().getBlockZ());
            String worldName = player.getWorld().getName();
            int blockHeight = event.getBlockClicked().getLocation().getBlockY();
            boolean hasPerms;
            EpicZone currentZone;
            if (General.BorderLogic(blockPoint, player))
            {
                currentZone = General.GetZoneForPlayer(player, worldName, blockHeight, blockPoint);
                hasPerms = ZonePermissionsHandler.hasPermissions(player, currentZone, "build");
                if (!hasPerms)
View Full Code Here

Examples of com.epicsagaonline.bukkit.EpicZones.objects.EpicZone

            EpicZonePlayer ezp = General.getPlayer(player.getName());
            Point blockPoint = new Point(event.getBlockClicked().getLocation().getBlockX(), event.getBlockClicked().getLocation().getBlockZ());
            String worldName = player.getWorld().getName();
            int blockHeight = event.getBlockClicked().getLocation().getBlockY();
            boolean hasPerms;
            EpicZone currentZone;
            if (General.BorderLogic(blockPoint, player))
            {
                currentZone = General.GetZoneForPlayer(player, worldName, blockHeight, blockPoint);
                hasPerms = ZonePermissionsHandler.hasPermissions(player, currentZone, "destroy");
                if (!hasPerms)
View Full Code Here

Examples of com.epicsagaonline.bukkit.EpicZones.objects.EpicZone

                        Point blockPoint = new Point(event.getClickedBlock().getLocation().getBlockX(), event.getClickedBlock().getLocation().getBlockZ());
                        String worldName = player.getWorld().getName();
                        int blockHeight = event.getClickedBlock().getLocation().getBlockY();
                        boolean hasPerms;

                        EpicZone currentZone;
                        if (General.BorderLogic(blockPoint, player))
                        {
                            currentZone = General.GetZoneForPlayer(player, worldName, blockHeight, blockPoint);
                            hasPerms = ZonePermissionsHandler.hasPermissions(player, currentZone, "build");
View Full Code Here

Examples of com.epicsagaonline.bukkit.EpicZones.objects.EpicZone

        if (!event.isCancelled())
        {
            Player player = event.getPlayer();
            if (!PermissionsManager.hasPermission(player, "epiczones.ignorepermissions"))
            {
                EpicZone zone = General.GetZoneForPlayer(player, player.getWorld().getName(), player.getLocation().getBlockY(), new Point(player.getLocation().getBlockX(), player.getLocation().getBlockZ()));
                if (zone != null)
                {
                    String command = event.getMessage().toLowerCase().trim().replace("/", "");
                    System.out.println(command);
                    if (zone.getDisallowedCommands().contains(command))
                    {
                        event.setCancelled(true);
                        Message.Send(event.getPlayer(), Message_ID.Info_00133_CommandDenied, new String[]{command, zone.getName()});
                    }
                }
            }
        }
    }
View Full Code Here

Examples of com.epicsagaonline.bukkit.EpicZones.objects.EpicZone

            {
                String cmd = data[1];
                String tag = data[2];
                if (cmd.equalsIgnoreCase("copy"))
                {
                    EpicZone srcZone = General.myZones.get(tag);
                    if (srcZone != null)
                    {
                        for (String permTag : srcZone.getPermissions().keySet())
                        {
                            EpicZonePermission perm = srcZone.getPermissions().get(permTag);
                            ezp.getEditZone().addPermission(perm.getMember(), perm.getNode().toString(), perm.getPermission().toString());
                        }
                        Message.Send(sender, Message_ID.Info_00128_CopiedPermissions, new String[]{tag});
                    }
                    else
View Full Code Here

Examples of com.epicsagaonline.bukkit.EpicZones.objects.EpicZone

    }

    private static void buildWho(EpicZonePlayer ezp, Player player, CommandSender sender, Integer pageNumber, boolean allZones)
    {

        EpicZone currentZone = General.getPlayer(player.getName()).getCurrentZone();
        if (currentZone == null)
        {
            allZones = true;
        }
        ArrayList<EpicZonePlayer> players = getPlayers(currentZone, allZones);
        Integer playersPerPage = 8;
        Integer playerCount = players.size();

        if (allZones)
        {
            Integer totalPages = ((int) Math.floor((double) playerCount / (double) playersPerPage));
            Message.Send(sender, Message_ID.Info_00113_PlayersOnline_Global, new String[]{playerCount.toString(), pageNumber.toString(), totalPages.toString()});
            for (int i = (pageNumber - 1) * playersPerPage; i < (pageNumber * playersPerPage); i++)
            {
                if (players.size() > i)
                {
                    Player thisPlayer = General.plugin.getServer().getPlayer(players.get(i).getName());
                    if (thisPlayer != null && thisPlayer.isOnline())
                    {
                        Message.Send(sender, buildWhoPlayerName(ezp, players, i, allZones));
                    }
                }
            }
        }
        else
        {
            Integer totalPages = ((int) Math.floor((double) playerCount / playersPerPage) + 1);
            Message.Send(sender, Message_ID.Info_00114_PlayersOnline_WithinZone_X, new String[]{playerCount.toString(), currentZone.getName(), pageNumber.toString(), totalPages.toString()});
            for (int i = (pageNumber - 1) * playersPerPage; i < pageNumber * playersPerPage; i++)
            {
                if (players.size() > i)
                {
                    Player thisPlayer = General.plugin.getServer().getPlayer(players.get(i).getName());
View Full Code Here

Examples of com.epicsagaonline.bukkit.EpicZones.objects.EpicZone

        result = result + "Players Online: " + plugin.getServer().getOnlinePlayers().length + "/" + plugin.getServer().getMaxPlayers() + "\n";

        result = result + "\nNumber of Zones: " + General.myZones.size() + "\n";
        for (String key : General.myZones.keySet())
        {
            EpicZone zone = General.myZones.get(key);
            result = result + zone.getName() + "[" + zone.getTag() + "] Type: " + zone.getType() + "\n";
        }

        result = result + "\nNumber of Global Zones: " + General.myGlobalZones.size() + "\n";
        for (String key : General.myGlobalZones.keySet())
        {
            EpicZone zone = General.myGlobalZones.get(key);
            result = result + zone.getName() + "[" + zone.getTag() + "] World: " + zone.getWorld() + "\n";
        }

        result = result + "\nHeroChat Configured To Be On? " + Config.enableHeroChat + "\n";
        result = result + "HeroChat Enabled? " + General.HeroChatEnabled + "\n";
        if (General.HeroChatEnabled)
View Full Code Here

Examples of com.epicsagaonline.bukkit.EpicZones.objects.EpicZone

                        {
                            String tag = data[i].replaceAll("[^a-zA-Z0-9_]", "");

                            if (tag.length() > 0)
                            {
                                EpicZone zone = General.myZones.get(tag);
                                if (zone != null)
                                {
                                    if (cmd.equalsIgnoreCase("add"))
                                    {
                                        zone.addChildTag(tag);
                                    }
                                    else if (cmd.equalsIgnoreCase("remove"))
                                    {
                                        zone.removeChild(tag);
                                    }
                                }
                            }
                        }
                        Message.Send(sender, Message_ID.Info_00027_ParentsUpdated);
View Full Code Here

Examples of com.epicsagaonline.bukkit.EpicZones.objects.EpicZone

                    try
                    {
                        while (scanner.hasNext())
                        {
                            EpicZone newZone;
                            line = scanner.nextLine().trim();
                            if (line.startsWith("#") || line.isEmpty())
                            {
                                continue;
                            }
                            newZone = new EpicZone(line);
                            General.myZones.put(newZone.getTag(), newZone);
                        }

                    } finally
                    {
                        scanner.close();
View Full Code Here

Examples of com.epicsagaonline.bukkit.EpicZones.objects.EpicZone

    public static void reconsileGlobalZones()
    {
        for (String zoneTag : myZones.keySet())
        {
            EpicZone zone = myZones.get(zoneTag);
            if (zone.getType() == ZoneType.GLOBAL)
            {
                myGlobalZones.put(zone.getTag().toLowerCase(), zone);
            }
        }

        for (World world : plugin.getServer().getWorlds())
        {
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.