summaryrefslogtreecommitdiff
path: root/wrapper_command.py
diff options
context:
space:
mode:
authorDico200 <dico.karssiens@gmail.com>2015-11-23 23:29:06 +0100
committerDico200 <dico.karssiens@gmail.com>2015-11-23 23:29:06 +0100
commit4d5861fd3648e969b6a5dc6b210a81eccda2636c (patch)
tree0b0eb1d09ae9a72bd36ba1a0be0aa57ed7ca265e /wrapper_command.py
parent9d0e4c99ba84d4efb7828704ed5b0a8e7bdfc52d (diff)
parent781714bc7423565cd7aeb7b3b29899269cf80454 (diff)
Merge branch 'wrapper' of https://github.com/RedstonerServer/redstoner-utils into wrapper
Diffstat (limited to 'wrapper_command.py')
-rw-r--r--wrapper_command.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/wrapper_command.py b/wrapper_command.py
new file mode 100644
index 0000000..dd51534
--- /dev/null
+++ b/wrapper_command.py
@@ -0,0 +1,11 @@
+from wrapper_player import *
+
+def command(command = "help"):
+ def decorator(wrapped):
+ @hook.command(command)
+ def wrapper(sender, command, label, args):
+ try:
+ return wrapped(sender = py_players[sender], command = command, label = label, args = args)
+ except:
+ print(print_traceback())
+ return decorator \ No newline at end of file