mirror of
https://github.com/ProjectSWGCore/NGECore2.git
synced 2026-07-14 00:02:07 -04:00
26 lines
435 B
Python
26 lines
435 B
Python
import sys
|
|
|
|
def setup():
|
|
return
|
|
|
|
def run(core, actor, target, commandString):
|
|
|
|
if not target:
|
|
return
|
|
|
|
print 'Destroy Test'
|
|
|
|
parent = target.getContainer()
|
|
|
|
if not target.getPermissions().canRemove(actor, target):
|
|
return
|
|
if parent and not parent.getPermissions().canRemove(actor, parent):
|
|
return
|
|
if not target.isSubChildOf(actor):
|
|
return
|
|
|
|
parent.remove(target)
|
|
core.objectService.destroyObject(target)
|
|
|
|
return
|
|
|