endstone icon indicating copy to clipboard operation
endstone copied to clipboard

feat: add APIs for debug shape

Open smartcmd opened this issue 6 months ago • 1 comments

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()

smartcmd avatar Jun 25 '25 16:06 smartcmd

image

smartcmd avatar Jun 26 '25 06:06 smartcmd