So I figured out player.teleport() should be the thing I'm looking for to teleport a player to coordinates. However I can't seem to figure out why it is a boolean and how do I format "Location"? What could I put for TeleportCause then? I searched up on Google and couldn't find how to do it, so here I am. EDIT: Another question, how do I get a value of anything that is inside two categories: Example: Code (YAML): settings: minecraft: x: y: z: How do I get for example the value of x?
use the Location constructor. new Location(world, x, y, z) or the other constructor which also accepts pitch and yaw after the 3 coordinates. to get the value of x, you navigate through the nested sections by periods. getConfig().getDouble(“settings.minecraft.x”); Alternatively you can break up the config sections and read the inner sections. For simple cases, as such, traversing with the period makes most sense.