Package com.forgeessentials.util.selections

Examples of com.forgeessentials.util.selections.Point


                y = (int) player.posY;
                z = (int) player.posZ;

                if (type == 1)
                {
                    PlayerInfo.selectionProvider.setPoint1((EntityPlayerMP)player,new Point(x, y, z));
                }
                else
                {
                    PlayerInfo.selectionProvider.setPoint2((EntityPlayerMP)player,new Point(x, y, z));
                }

                OutputHandler.chatConfirmation(player, "Pos" + type + " set to " + x + ", " + y + ", " + z);
                return;

            }
            else
            {
                error(player);
                return;
            }
        }

        if (args.length > 0)
        {
            if (args.length < 3)
            {
                error(player);
                return;
            }

            try
            {
                x = Integer.parseInt(args[0]);
                y = Integer.parseInt(args[1]);
                z = Integer.parseInt(args[2]);
            }
            catch (NumberFormatException e)
            {
                error(player);
                return;
            }

            if (type == 1)
            {
                PlayerInfo.selectionProvider.setPoint1((EntityPlayerMP)player,new Point(x, y, z));
            }
            else
            {
                PlayerInfo.selectionProvider.setPoint2((EntityPlayerMP)player,new Point(x, y, z));
            }

            OutputHandler.chatConfirmation(player, "Pos" + type + " set to " + x + ", " + y + ", " + z);
            return;
        }
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

    }

    @SaveableObject.Reconstructor
    public static Plot reconstruct(IReconstructData tag)
    {
        Point high = (Point) tag.getFieldValue("high");
        Point low = (Point) tag.getFieldValue("low");
        int dim = (Integer) tag.getFieldValue("dim");

        int value = (Integer) tag.getFieldValue("value");
        UUID owner = UUID.fromString((String)tag.getFieldValue("owner"));
        String name = (String)tag.getFieldValue("name");
View Full Code Here

                int limit = e.entityPlayer.getEntityData().getInteger("lb_limit");
                Date date = new Date();
                new Timestamp(date.getTime());
                Connection connection = DriverManager.getConnection(ModulePlayerLogger.url, ModulePlayerLogger.username, ModulePlayerLogger.password);
                Statement st = connection.createStatement();
                Point p = getPoint(e.entityPlayer);
                st.execute(
                        "SELECT * FROM  `blockChange` WHERE  `Dim` = " + e.entityPlayer.dimension + " AND  `X` = " + p.getX() + " AND  `Y` = " + p.getY() + " AND  `Z` = "
                                + p.getZ() + " ORDER BY id DESC LIMIT " + limit);
                ResultSet res = st.getResultSet();

                OutputHandler.chatNotification(e.entityPlayer, "Results: " + p.getX() + ", " + p.getY() + ", " + p.getZ());

                while (res.next())
                {
                    OutputHandler.chatNotification(e.entityPlayer,
                            res.getString("player") + " " + res.getString("category") + " block " + res.getString("block") + " at " + res.getTimestamp("time"));
View Full Code Here

        if (mo == null)
        {
            return null;
        }

        Point p = new Point(mo.blockX, mo.blockY, mo.blockZ);

        if (!player.isSneaking())
        {
            return p;
        }

        switch (mo.sideHit)
        {
        case 0:
          p.setY(p.getY() - 1);
            break;
        case 1:
          p.setY(p.getY() + 1);
            break;
        case 2:
          p.setZ(p.getZ() - 1);
            break;
        case 3:
          p.setZ(p.getZ() + 1);
            break;
        case 4:
          p.setX(p.getX() - 1);
            break;
        case 5:
          p.setX(p.getX() + 1);
            break;
        }

        return p;
    }
View Full Code Here

TOP

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

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.