forked from VoxeLibre/VoxeLibre
fix title command
This commit is contained in:
parent
e334665365
commit
5b5b525d32
|
@ -235,6 +235,6 @@ dofile(modpath.."/summon.lua")
|
|||
dofile(modpath.."/say.lua")
|
||||
dofile(modpath.."/list.lua")
|
||||
dofile(modpath.."/sound.lua")
|
||||
--dofile(modpath.."/title.lua")
|
||||
dofile(modpath.."/title.lua")
|
||||
|
||||
dofile(modpath.."/alias.lua")
|
|
@ -104,22 +104,30 @@ function mcl_title.reset(playername)
|
|||
end
|
||||
|
||||
mcl_commands.register_command("title", function(cmd)
|
||||
cmd:sub(":name:username title :text:json", function(name, target, json)
|
||||
cmd:sub(":name:username title :text:json", {
|
||||
func = function(name, target, json)
|
||||
return mcl_title.set(target, "title", json)
|
||||
end)
|
||||
cmd:sub(":name:username subtitle :text:json", function(name, target, json)
|
||||
end,
|
||||
})
|
||||
cmd:sub(":name:username subtitle :text:json", {
|
||||
func = function(name, target, json)
|
||||
return mcl_title.set(target, "subtitle", json)
|
||||
end)
|
||||
cmd:sub(":name:username actionbar :text:json", function(name, target, json)
|
||||
end,
|
||||
})
|
||||
cmd:sub(":name:username actionbar :text:json", {
|
||||
func = function(name, target, json)
|
||||
return mcl_title.set(target, "actionbar", json)
|
||||
end)
|
||||
cmd:sub(":name:username times :fadeIn:int :stay:int :fadeOut:int", function(name, target, fadeIn, stay, fadeOut) --WIP
|
||||
end,
|
||||
})
|
||||
cmd:sub(":name:username times :fadeIn:int :stay:int :fadeOut:int", {
|
||||
func = function(name, target, fadeIn, stay, fadeOut) --WIP
|
||||
return mcl_title.times(target, fadeIn, stay, fadeOut)
|
||||
end)
|
||||
end,
|
||||
})
|
||||
cmd:sub(":name:username clear", {
|
||||
func = function(name, target)
|
||||
return mcl_title.clear(target)
|
||||
end
|
||||
end,
|
||||
})
|
||||
cmd:sub(":name:username reset", {
|
||||
func = function(name, target)
|
||||
|
|
Loading…
Reference in New Issue