endstone
endstone copied to clipboard
feat: add APIs for debug shape
Available shapes:
- [x] DebugLine
- [x] DebugBox
- [x] DebugSphere
- [x] DebugCircle
- [x] DebugText
- [x] DebugArrow
Basic code example in Python:
from endstone.debugshape import *
shape = DebugText()
shape.text = "some text you want"
shape.position = (0, 64, 0)
# Set the RGBA values of the text color
shape.color = [80, 100, 200, 255]
# Add player to this debug shape
shape.add_player(player1)
shape.add_player(player2)
# Changes will be sent to the players automatically
shape.position = (0, 128, 0)
shape.remove_player(player1)
# You can also using `remove_all()` method to remove all players who is viewing this debug shape
shape.remove_all()