
JS Runner
The plugin aims to add the ability to run JavaScript files in a Minecraft server.
Список изменений
New Events
blockPlace
fires when a block is placed
getType()
returns the block that is being placed
getX(), getY(), getZ()
returns position
getPlayerName()
returns the name of the player who placed the block.
getPlayerUUID()
returns the UUID of the player who placed the block.
cancel()
stops the block from being placed
entityDamage
fires when an entity takes damage
getEntityType()
returns the damaged entity
isPlayer()
returns a boolean value
getPlayerName()
returns players name if it was a player that was damaged
getCause()
returns the cause of damage such as: "FALL", "ENTITY_ATTACK", "LAVA"
getDamage()
returns damage amount
setDamage(amount)
replaces the original damage with a new amount
cancel()
cancels the damage entirely
Complete List of Damage Types
BLOCK_EXPLOSION, CONTACT, CRAMMING, CUSTOM, DRAGON_BREATH, DROWNING, DRYOUT, ENTITY_ATTACK, ENTITY_EXPLOSION, ENTITY_SWEEP_ATTACK, FALL, FALLING_BLOCK, FIRE, FIRE_TICK, FLY_INTO_WALL, FREEZE, HOT_FLOOR, KILL, LAVA, LIGHTNING, MAGIC, MELTING, POISON, PROJECTILE, SONIC_BOOM, STARVATION, SUFFOCATION, THORNS, VOID, WITHER, WORLD_BORDER