From 08224bb7e0765b34125f2028e3bfbd619f6ea480 Mon Sep 17 00:00:00 2001 From: Isaac Date: Sun, 20 Aug 2017 00:31:12 +0200 Subject: Add non-deprecated constructor for MapCursor --- src/main/java/org/bukkit/map/MapCursor.java | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'src/main') diff --git a/src/main/java/org/bukkit/map/MapCursor.java b/src/main/java/org/bukkit/map/MapCursor.java index a79dc412..b93886c6 100644 --- a/src/main/java/org/bukkit/map/MapCursor.java +++ b/src/main/java/org/bukkit/map/MapCursor.java @@ -27,6 +27,23 @@ public final class MapCursor { this.visible = visible; } + /** + * Initialize the map cursor. + * + * @param x The x coordinate, from -128 to 127. + * @param y The y coordinate, from -128 to 127. + * @param direction The facing of the cursor, from 0 to 15. + * @param type The type (color/style) of the map cursor. + * @param visible Whether the cursor is visible by default. + */ + public MapCursor(byte x, byte y, byte direction, Type type, boolean visible) { + this.x = x; + this.y = y; + setDirection(direction); + setType(type); + this.visible = visible; + } + /** * Get the X position of this cursor. * -- cgit v1.2.3