Solved Getting Coordinates from Config

Discussion in 'Plugin Development' started by CactusComboPvP, Apr 22, 2014.

Thread Status:
Not open for further replies.
  1. Offline

    CactusComboPvP

    Okay so I am using this code right now:

    Code:java
    1. public class Util {
    2. public static boolean isNearSpawn(Location location)
    3. {
    4. double x = location.getX();
    5. double z = location.getZ();
    6. if ((x <= 512.0D) && (x >= -512.0D) && (z <= 512.0D) && (z >= -512.0D)) {
    7. return true;
    8. }
    9. return false;
    10. }
    11. public static boolean isInSpawn(Location location)
    12. {
    13. double x = location.getX();
    14. double z = location.getZ();
    15. if ((x <= 30.0D) && (x >= -30.0D) && (z <= 30.0D) && (z >= -30.0D)) {
    16. return true;
    17. }
    18. return false;
    19. }
    20. }
    21.  


    See those locations? Like 512.0D and 30.0D

    I want them to be able to change it in the config.
    The getConfig won't work... How can I make it so it picks up those numbers from the config file?

    Thanks

    Any fix???

    Don't worry guys I fixed it :D

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 7, 2016
Thread Status:
Not open for further replies.

Share This Page