Skip to content
TheMode edited this page Sep 13, 2021 · 4 revisions

Overview

Types are here to retrieve high-level elements from the server (eg entity, position) without always having to use commands. For example checking if the Y of a player is higher than 50 is as easy as getting the number and checking it based on your language of choice.

Just in case, every type are defined here

Types

Position

Straightforward, it contains world coordinates and a view.

  • x
  • y
  • z
  • yaw
  • pitch

Currently do not have a clean toString method, I cannot have it as "x y z" as it would ignore the view

Block position

Similar to a position, but the world coordinates are integers and does not have a view

  • x
  • y
  • z

toString is "x y z" so it can easily be appended to a command string

Item

Represents an item in-game

  • material
  • amount

The toString method is identical to how items are represented in commands, like minecraft:stone_shovel{"Count":1B,"id":"minecraft:stone_shovel"}

Entity

Represents an entity in-game

  • uuid
  • type
  • position

toString will return the entity UUID.

Player (extends Entity)

  • username

Clone this wiki locally