summaryrefslogtreecommitdiff
path: root/misc.py
diff options
context:
space:
mode:
authorDico200 <dico.karssiens@gmail.com>2015-03-28 16:39:09 +0100
committerDico200 <dico.karssiens@gmail.com>2015-03-28 16:39:09 +0100
commit6590a8d30a2ebf59ba251f0fe06a87a537bd482d (patch)
tree3a2ee04ce7bc0647abcb0c0c53b7d4cee935e630 /misc.py
parent4cfa3a598f1ff399092bc62c1d97ed19fa97023b (diff)
Added cmd check to ABOT, commented out advancedcmd
advancedcmd doens't work atm, apparently function.func_code is a thing but adding co_consts isn't an attribute of that. Tested abot, seems to work well.
Diffstat (limited to 'misc.py')
-rw-r--r--misc.py18
1 files changed, 18 insertions, 0 deletions
diff --git a/misc.py b/misc.py
index d44caf3..5bace4a 100644
--- a/misc.py
+++ b/misc.py
@@ -8,6 +8,24 @@ import org.bukkit.Bukkit as Bukkit
import org.bukkit.event.player.PlayerChatEvent as PlayerChatEvent
from basecommands import simplecommand
+"""
+@advancedcommand("hi", aliases = ["hu"], description = "Says hi!", subCommands = [
+ subcommand("server", aliases = ["serv"], amin = 1, amax = 4, usage = "[msg..]", senderLimit = 0),
+ subcommand("me", aliases = ["meu"], amin = 2, amax = 5, usage = "[MESSAGE]")
+ ])
+def on_hi_command():
+
+ def server(sender, command, label, args):
+ server.dispatchCommand(server.getConsoleSender(), "say " + " ".join(args[1:]))
+ return "Success!"
+ def me(sender, command, label, args):
+ target = server.getPlayer(args[1])
+ if target:
+ target.chat(" ".join(args[2:]))
+ return None
+ return "No target found"
+"""
+
@hook.event("player.PlayerJoinEvent", "monitor")
def on_join(event):