Package com.forgeessentials.util.selections

Examples of com.forgeessentials.util.selections.AreaBase


            {
                throw new CommandException("Command not usable from console. Try /zone set <name> <coords> instead");
            }
           
            PlayerInfo info = PlayerInfo.getPlayerInfo((EntityPlayerMP) sender);
            AreaBase area = info.getSelection();
            if (area == null)
                throw new CommandException("No selection available. Please select a region first.");

            PermissionContext context = new PermissionContext();
            context.setCommandSender(sender);
            context.setTargetLocationStart(area.getLowPoint().toVec3());
            context.setTargetLocationEnd(area.getHighPoint().toVec3());
            if (!PermissionsManager.checkPermission(context, PERM_DEFINE))
            {
                throw new CommandException("You don't have the permission to define an area.");
            }
View Full Code Here


                if (zoneData.get("type").equals(2))
                {
                    WorldZone parentZone = (WorldZone) zones.get(zoneData.get("parent_id"));
                    if (parentZone != null)
                    {
                        AreaBase area = AreaBase.fromString((String) zoneData.get("area"));
                        if (area != null)
                        {
                            AreaZone zone = new AreaZone(parentZone, (String) zoneData.get("name"), area, (Integer) zoneData.get("id"));
                            zones.put(zone.getId(), zone);
                        }
View Full Code Here

                            int z2 = Integer.parseInt(areaProperties.getProperty("z2"));
                            if (name == null)
                                throw new IllegalArgumentException();

                            // Create AreaZone and load permissions
                            AreaZone areaZone = new AreaZone(worldZone, name, new AreaBase(new Point(x1, y1, z1), new Point(x2, y2, z2)), areaId);
                            loadZonePermissions(areaPath, areaZone);
                        }
                        catch (IllegalArgumentException | IOException e)
                        {
                            OutputHandler.felog.severe("Error reading area " + worldPath.getName() + "/" + areaPath.getName());
View Full Code Here

TOP

Related Classes of com.forgeessentials.util.selections.AreaBase

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.