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.
This commit is contained in:
18
misc.py
18
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):
|
||||
|
||||
Reference in New Issue
Block a user