Command decorators
Posted: Fri Dec 04, 2015 2:57 pm
Hello. I have tried to use two decorators to declare "say" and "client" commands:
It's work perfect, but when i try to restart plug-in with "sp reload <plugin_name>" I got next error:
Click
Syntax: Select all
from commands import CommandReturn
from commands.say import SayCommand
from commands.client import ClientCommand
from commands.server import ServerCommand
@ClientCommand("pony")
@SayCommand("pony")
def pony(command, index, team_only=False):
print(command.get_arg(0))
return CommandReturn.BLOCK
It's work perfect, but when i try to restart plug-in with "sp reload <plugin_name>" I got next error:
Click