generated from sVoxelDev/spigot-plugin-template
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(bukkit): add dynamic pointer to chatter location
- Loading branch information
Showing
4 changed files
with
125 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
package net.silthus.schat.util; | ||
|
||
import java.util.UUID; | ||
import net.silthus.schat.pointer.Pointer; | ||
|
||
/** | ||
* Represents a typical Minecraft location object. | ||
* | ||
* <p>Use the helper inside the implementing platform to wrap and unwrap native location objects.</p> | ||
* | ||
* @param world the world of the location | ||
* @param x x-axis | ||
* @param y y-axis | ||
* @param z z-axis | ||
* @param yaw horizontal rotation | ||
* @param pitch vertical rotation | ||
* @since next | ||
*/ | ||
public record Location(World world, double x, double y, double z, float yaw, float pitch) { | ||
|
||
public static final Pointer<Location> LOCATION = Pointer.pointer(Location.class, "location"); | ||
|
||
public Location(World world, double x, double y, double z) { | ||
this(world, x, y, z, 0f, 90f); | ||
} | ||
|
||
/** | ||
* Represents a typical Minecraft world identified by an id and name. | ||
* | ||
* @param id the unique id of the world | ||
* @param name the name of the world | ||
* @since next | ||
*/ | ||
public record World(UUID id, String name) { | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters