Description for extensions in readme

This commit is contained in:
bluefireoly
2020-08-29 19:12:42 +02:00
parent d93cda5dae
commit 7f88aec50b

View File

@@ -140,21 +140,21 @@ val deserializeMethod2 = NBTData.deserialize(serializedString)
### Simple extension methods / values (with kotlin getters) ### Simple extension methods / values (with kotlin getters)
```kotlin ```kotlin
livingEntity.isInWater livingEntity.isInWater // checks if both feet and head are in water
livingEntity.isHeadInWater livingEntity.isHeadInWater // checks if the head (eye location) is in water
entity.isFeetInWater entity.isFeetInWater // checks if the feet are in water
entity.isGroundSolid entity.isGroundSolid // checks if the entity stands on a solid material
damageable.kill() damageable.kill() // instantly kills the damageable
livingEntity.heal() livingEntity.heal() // sets the health to the maximum health (if given - else throws Exception)
player.feed() player.feed() // sets the players food level to 20
player.saturate() player.saturate() // sets the players saturation level to the current max value
player.feedSaturate() player.feedSaturate() // sets the players food and saturation level to 20
player.disappear(plugin) player.disappear(plugin) // all other players won't be able to see the player anymore
player.appear(plugin) player.appear(plugin) // show the player to every other player
vector.isFinite vector.isFinite // checks if x, y and z of the vector are all finite
playerInteractEntityEvent.interactItem playerInteractEntityEvent.interactItem // gets the item the player interacted with
prepareItemCraftEvent.isCancelled prepareItemCraftEvent.isCancelled // checks if the event isCancelled
prepareItemCraftEvent.cancel() prepareItemCraftEvent.cancel() // cancels the PrepareItemCraftEvent
``` ```
### Direction API ### Direction API