Added command intercepter tool, used it for //calc #49
@ -2,3 +2,6 @@ name: RedstonerUtils
|
|||||||
main: main.py
|
main: main.py
|
||||||
version: 3.1.0
|
version: 3.1.0
|
||||||
author: redstone_sheep
|
author: redstone_sheep
|
||||||
|
|
||||||
|
commands:
|
||||||
|
serversigns:
|
||||||
|
@ -395,16 +395,16 @@ def can_build2(player, block):
|
|||||||
def check_all_signs_and_intercept_command():
|
def check_all_signs_and_intercept_command():
|
||||||
|
|
||||||
try:
|
try:
|
||||||
CommandInterceptions = shared["modules"]["misc"].CommandInterceptions
|
#CommandInterceptions = shared["modules"]["misc"].CommandInterceptions
|
||||||
rsutils_cmd = CommandInterceptions.cmd_map.get("redstonerutils:serversigns")
|
#rsutils_cmd = CommandInterceptions.cmd_map.get("redstonerutils:serversigns")
|
||||||
label = rsutils_cmd.getLabel()
|
#label = rsutils_cmd.getLabel()
|
||||||
|
|
||||||
def interception(sender, args):
|
def interception(sender, args):
|
||||||
rsutils_cmd.execute(sender, label, args)
|
svs_command(sender, None, None, args)
|
||||||
return False
|
return False
|
||||||
|
|
||||||
def tab_completion(original, sender, alias, args):
|
def tab_completion(original, sender, alias, args):
|
||||||
return rsutils_cmd.tabComplete(sender, alias, args)
|
return None
|
||||||
|
|
||||||
shared["modules"]["misc"].CommandInterceptions.register("serversigns", "serversigns", interception, tab_completion)
|
shared["modules"]["misc"].CommandInterceptions.register("serversigns", "serversigns", interception, tab_completion)
|
||||||
except:
|
except:
|
||||||
|
Reference in New Issue
Block a user