Phpcraft
Public Member Functions | Public Attributes | List of all members
Phpcraft\Packet\MapData\MapMarker Class Reference

Public Member Functions

 __construct (int $type=MapMarker::TYPE_WHITE_ARROW, int $x=0, int $z=0, int $rotation=0, ?ChatComponent $name=null)
 
 __toString ()
 

Public Attributes

const TYPE_WHITE_ARROW = 0
 
const TYPE_GREEN_ARROW = 1
 
const TYPE_RED_ARROW = 2
 
const TYPE_BLUE_ARROW = 3
 
const TYPE_WHITE_CROSS = 4
 
const TYPE_RED_POINTER = 5
 
const TYPE_WHITE_CIRCLE = 6
 
const TYPE_SMALL_WHITE_CIRCLE = 7
 
const TYPE_MANSION = 8
 
const TYPE_TEMPLE = 9
 
const TYPE_WHITE_BANNER = 10
 
const TYPE_ORANGE_BANNER = 11
 
const TYPE_MAGENTA_BANNER = 12
 
const TYPE_LIGHT_BLUE_BANNER = 13
 
const TYPE_YELLOW_BANNER = 14
 
const TYPE_LIME_BANNER = 15
 
const TYPE_PINK_BANNER = 16
 
const TYPE_GRAY_BANNER = 17
 
const TYPE_LIGHT_GRAY_BANNER = 18
 
const TYPE_CYAN_BANNER = 19
 
const TYPE_PURPLE_BANNER = 20
 
const TYPE_BLUE_BANNER = 21
 
const TYPE_BROWN_BANNER = 22
 
const TYPE_GREEN_BANNER = 23
 
const TYPE_RED_BANNER = 24
 
const TYPE_BLACK_BANNER = 25
 
const TYPE_TREASURE_MARKER = 26
 
 $type
 
 $x
 
 $z
 
 $rotation
 
 $name
 

Detailed Description

A marker on a map.

See also
MapDataPacket

Constructor & Destructor Documentation

◆ __construct()

Phpcraft\Packet\MapData\MapMarker::__construct ( int  $type = MapMarker::TYPE_WHITE_ARROW,
int  $x = 0,
int  $z = 0,
int  $rotation = 0,
?ChatComponent  $name = null 
)
Parameters
int$typeThe type of the marker. >= 9 will be replaced with 7 for clients below 1.13.
int$xThe x coordinate of the marker on the map from -127 to 128.
int$zThe z coordinate of the marker on the map from -127 to 128.
int$rotationThe rotation of the marker divided by 22.5°, so it has a value between 0 and 15.
ChatComponent | null$nameThe display name of this marker. Only visible to 1.13+ clients.

Member Function Documentation

◆ __toString()

Phpcraft\Packet\MapData\MapMarker::__toString ( )

Member Data Documentation

◆ $name

ChatComponent null Phpcraft\Packet\MapData\MapMarker::$name

The display name of this marker. Only visible to 1.13+ clients.

◆ $rotation

int Phpcraft\Packet\MapData\MapMarker::$rotation

The rotation of the marker divided by 22.5°, so it has a value between 0 and 15.

◆ $type

int Phpcraft\Packet\MapData\MapMarker::$type

The type of the marker. >= 9 will be replaced with 7 for clients below 1.13.

◆ $x

int Phpcraft\Packet\MapData\MapMarker::$x

The x coordinate of the marker on the map from -127 to 128.

◆ $z

int Phpcraft\Packet\MapData\MapMarker::$z

The z coordinate of the marker on the map from -127 to 128.

◆ TYPE_BLACK_BANNER

const Phpcraft\Packet\MapData\MapMarker::TYPE_BLACK_BANNER = 25

◆ TYPE_BLUE_ARROW

const Phpcraft\Packet\MapData\MapMarker::TYPE_BLUE_ARROW = 3

◆ TYPE_BLUE_BANNER

const Phpcraft\Packet\MapData\MapMarker::TYPE_BLUE_BANNER = 21

◆ TYPE_BROWN_BANNER

const Phpcraft\Packet\MapData\MapMarker::TYPE_BROWN_BANNER = 22

◆ TYPE_CYAN_BANNER

const Phpcraft\Packet\MapData\MapMarker::TYPE_CYAN_BANNER = 19

◆ TYPE_GRAY_BANNER

const Phpcraft\Packet\MapData\MapMarker::TYPE_GRAY_BANNER = 17

◆ TYPE_GREEN_ARROW

const Phpcraft\Packet\MapData\MapMarker::TYPE_GREEN_ARROW = 1

A green arrow. Used in vanilla for item frames.

◆ TYPE_GREEN_BANNER

const Phpcraft\Packet\MapData\MapMarker::TYPE_GREEN_BANNER = 23

◆ TYPE_LIGHT_BLUE_BANNER

const Phpcraft\Packet\MapData\MapMarker::TYPE_LIGHT_BLUE_BANNER = 13

◆ TYPE_LIGHT_GRAY_BANNER

const Phpcraft\Packet\MapData\MapMarker::TYPE_LIGHT_GRAY_BANNER = 18

◆ TYPE_LIME_BANNER

const Phpcraft\Packet\MapData\MapMarker::TYPE_LIME_BANNER = 15

◆ TYPE_MAGENTA_BANNER

const Phpcraft\Packet\MapData\MapMarker::TYPE_MAGENTA_BANNER = 12

◆ TYPE_MANSION

const Phpcraft\Packet\MapData\MapMarker::TYPE_MANSION = 8

◆ TYPE_ORANGE_BANNER

const Phpcraft\Packet\MapData\MapMarker::TYPE_ORANGE_BANNER = 11

◆ TYPE_PINK_BANNER

const Phpcraft\Packet\MapData\MapMarker::TYPE_PINK_BANNER = 16

◆ TYPE_PURPLE_BANNER

const Phpcraft\Packet\MapData\MapMarker::TYPE_PURPLE_BANNER = 20

◆ TYPE_RED_ARROW

const Phpcraft\Packet\MapData\MapMarker::TYPE_RED_ARROW = 2

◆ TYPE_RED_BANNER

const Phpcraft\Packet\MapData\MapMarker::TYPE_RED_BANNER = 24

◆ TYPE_RED_POINTER

const Phpcraft\Packet\MapData\MapMarker::TYPE_RED_POINTER = 5

◆ TYPE_SMALL_WHITE_CIRCLE

const Phpcraft\Packet\MapData\MapMarker::TYPE_SMALL_WHITE_CIRCLE = 7

A small white circle. Used in vanilla for far-off-map players.

◆ TYPE_TEMPLE

const Phpcraft\Packet\MapData\MapMarker::TYPE_TEMPLE = 9

◆ TYPE_TREASURE_MARKER

const Phpcraft\Packet\MapData\MapMarker::TYPE_TREASURE_MARKER = 26

◆ TYPE_WHITE_ARROW

const Phpcraft\Packet\MapData\MapMarker::TYPE_WHITE_ARROW = 0

A white arrow. Used in vanilla for on-map players.

◆ TYPE_WHITE_BANNER

const Phpcraft\Packet\MapData\MapMarker::TYPE_WHITE_BANNER = 10

◆ TYPE_WHITE_CIRCLE

const Phpcraft\Packet\MapData\MapMarker::TYPE_WHITE_CIRCLE = 6

A white circle. Used in vanilla for off-map players.

◆ TYPE_WHITE_CROSS

const Phpcraft\Packet\MapData\MapMarker::TYPE_WHITE_CROSS = 4

◆ TYPE_YELLOW_BANNER

const Phpcraft\Packet\MapData\MapMarker::TYPE_YELLOW_BANNER = 14