Properties - ShaneBeee/SkBee GitHub Wiki
Properties
Properties are simplied versions of full expression, which are used in the Property Expression
Table of contents:
Entity:
Properties which can be used on Entity
health:
- Description: Represents the health of an entity.
- Return Type: number
- Change Modes: add, set, remove, reset
- Since: 3.10.0
- Examples:
set {_h} to health property of player
set health property of player to 10
add 1 to health property of player
remove 1 from health property of target entity
name:
- Description: Represents the name of an entity.
- Return Type: text
- Change Modes: set, delete/clear
- Since: 3.10.0
InventoryHolder:
Properties which can be used on InventoryHolder
inventory contents:
- Description: Represents the contents of an object that holds an inventory.
- Return Type: item type
- Change Modes: add, set, remove, delete/clear
- Since: 3.10.0
- Examples:
set {_i::*} to inventory contents property of player
add an apple to inventory contents property of player
remove all diamonds from inventory contents property of player
Item Type:
Properties which can be used on Item Type
blast resistance:
- Description: Represents the blast resistance of a block.
- Return Type: number
- Change Modes: Cannot be changed
- Since: 3.10.0
- Examples:
if blast resistance property of target block > 1:
fire resistant:
- Description: Represents if an item is fire resistant. If true, it will not burn in fire or lava.
- Return Type: boolean (yes/no)
- Change Modes: set
- Since: 3.10.0
- Examples:
set fire resistant property of {_i} to true
item rarity:
- Description: Represents the different item rarities of an item (represented as a string).
Options are: "common", "uncommon", "rare", "epic"
Requires MC 1.20.5+ - Return Type: text
- Change Modes: set, delete/clear
- Since: 3.10.0
- Examples:
set item rarity property of player's tool to "uncommon"
set {_rarity} to item rarity property of player's tool
if item rarity property of player's tool = "epic":
unbreakable:
- Description: Represents if the item is unbreakable.
- Return Type: boolean (yes/no)
- Change Modes: set
- Since: 3.10.0
- Examples:
set unbreakable property of player's tool to true
set unbreakable property of player's tool to false
Living Entity:
Properties which can be used on Living Entity
persistence required:
- Description: Prevent mobs from despawning naturally.
See the Despawning section McWiki for further details about despawning.
A silly side effect of this is that some mobs (such as sheep) will stop their random stroll goal when more than 32 blocks away from a player, setting this to true will prevent that and the mob will forever roam the lands. - Return Type: boolean (yes/no)
- Change Modes: set
- Since: 3.10.0
- Examples:
set persistence required property of all mobs to true
Mob:
aggressive:
- Description: Whether the mob is aggressive. This will not work on all mobs, only mobs that can actually be aggressive.
- Return Type: boolean (yes/no)
- Change Modes: set
- Since: 3.10.0
- Examples:
set aggressive property of event-mob to true
Player:
Properties which can be used on Player
death screen score:
- Description: Represents the "Score" the player sees in their death screen.
Requires Paper 1.21.4+ - Return Type: integer
- Change Modes: set
- Since: 3.10.0
- Examples:
set {_score} to death screen score property of player
set death screen score property of player to 150
Sittable:
sitting:
- Description: Whether an entity is sitting. Currently supports Camel, Cat, Fox, Panda, Parrot, Wolf.
- Return Type: boolean (yes/no)
- Change Modes: set
- Since: 3.10.0
- Examples:
set sitting property of target entity to true
if sitting property of event-mob is false: