Can someone tell me where's the problem?

Discussion in 'Spigot Plugin Development' started by CristianoTRS, Jul 5, 2018.

  1. Hello! Soo i'm coding a new plugin and i'm trying to use the config. Please don't be rude i'm a begginer ;). See the print below.
     

    Attached Files:

  2. Please do not use capital letters for variable names

    change `String ConfigMundo` to `String configMundo`
     
  3. Also, a Location needs a World, it can't be a String
    World world = Bukkit.getWorld("world name");
     
  4. Line 23:

    The Location constructor takes in (in the following order) a World, double for X, double for Y, double for Z, float for yaw, and float for pitch.
     
  5. Still not working....
     

    Attached Files:

  6. This won't solve the OP's issue.

    Location needs to be constructed like so: Location(world, double,double,double)
    Instead of a world you have added a string.

    Just change
    Code (Java):
    new Location(ConfigMundo,1,1,1);
    to
    Code (Java):
    new Location(Bukkit.getWorld(ConfigMundo),1,1,1);
    You have previously posted a thread with another error. Many users have commented on your naming conventions. You should consider following the proper naming conventions in java

    ConfigMundo -> configMundo

    EDIT:

    Also:
    Code (Java):
    String ConfigX = plugin.getConfig().getString("Lugares.Jogo.Mundo.Player_Morre.X);
    should be:
    Code (Java):
    double ConfigX = plugin.getConfig().getDouble("Lugares.Jogo.Mundo.Player_Morre.X);
    (Same thing for Y and Z)

    (Still, you need to follow naming conventions)
     
    #6 darklazerog, Jul 5, 2018
    Last edited: Jul 5, 2018
  7. Still Not working...
     

    Attached Files:

  8. Optic_Fusion1

    Resource Staff

    well, from the image, i can see you did NOT do the change he was talking about
     
  9. Read my post, follow what I suggested and you should be fine.
     
  10. Yes The Edit WORKS!!! Thank you and thank all for responding! Now I understand that I have to specify more !!! :D