feat: Added ItemGround class

+ Added onPlayerTakeItem and onPlayerDropItem events
This commit is contained in:
AURUMVORXX
2024-11-06 02:07:55 +03:00
parent 4efda3e2e0
commit cee3341a51
12 changed files with 205 additions and 25 deletions

View File

@@ -141,6 +141,7 @@ addEvent('onPlayerCommand')
addEvent('onPlayerDamage')
addEvent('onPlayerDead')
addEvent('onPlayerDisconnect')
addEvent('onPlayerDropItem')
addEvent('onPlayerEnterWorld')
addEvent('onPlayerJoin')
addEvent('onPlayerMessage')
@@ -149,6 +150,7 @@ addEvent('onPlayerRespawn')
addEvent('onPlayerShoot')
addEvent('onPlayerSpellCast')
addEvent('onPlayerSpellSetup')
addEvent('onPlayerTakeItem')
addEvent('onPlayerTeleport')
addEvent('onPlayerToggleFaceAni')

35
g2o/items.py Normal file
View File

@@ -0,0 +1,35 @@
import sqg2o
class ItemGround(sqg2o.ItemGround):
def __init__(self):
return super().__init__()
def getPosition() -> tuple:
return super().getPosition()
def getRotation() -> tuple:
return super().getRotation()
@property
def id(self):
return super().id
@property
def instance(self):
return super().instance
@property
def amount(self):
return super().amount
@property
def world(self):
return super().world
@property
def virtualWorld(self):
return super().virtualWorld
@virtualWorld.setter
def virtualWorld(self, value):
super().virtualWorld = value