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.."/say.lua")
|
||||||
dofile(modpath.."/list.lua")
|
dofile(modpath.."/list.lua")
|
||||||
dofile(modpath.."/sound.lua")
|
dofile(modpath.."/sound.lua")
|
||||||
--dofile(modpath.."/title.lua")
|
dofile(modpath.."/title.lua")
|
||||||
|
|
||||||
dofile(modpath.."/alias.lua")
|
dofile(modpath.."/alias.lua")
|
|
@ -104,22 +104,30 @@ function mcl_title.reset(playername)
|
||||||
end
|
end
|
||||||
|
|
||||||
mcl_commands.register_command("title", function(cmd)
|
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", {
|
||||||
return mcl_title.set(target, "title", json)
|
func = function(name, target, json)
|
||||||
end)
|
return mcl_title.set(target, "title", json)
|
||||||
cmd:sub(":name:username subtitle :text:json", function(name, target, json)
|
end,
|
||||||
return mcl_title.set(target, "subtitle", json)
|
})
|
||||||
end)
|
cmd:sub(":name:username subtitle :text:json", {
|
||||||
cmd:sub(":name:username actionbar :text:json", function(name, target, json)
|
func = function(name, target, json)
|
||||||
return mcl_title.set(target, "actionbar", json)
|
return mcl_title.set(target, "subtitle", json)
|
||||||
end)
|
end,
|
||||||
cmd:sub(":name:username times :fadeIn:int :stay:int :fadeOut:int", function(name, target, fadeIn, stay, fadeOut) --WIP
|
})
|
||||||
return mcl_title.times(target, fadeIn, stay, fadeOut)
|
cmd:sub(":name:username actionbar :text:json", {
|
||||||
end)
|
func = function(name, target, json)
|
||||||
|
return mcl_title.set(target, "actionbar", json)
|
||||||
|
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,
|
||||||
|
})
|
||||||
cmd:sub(":name:username clear", {
|
cmd:sub(":name:username clear", {
|
||||||
func = function(name, target)
|
func = function(name, target)
|
||||||
return mcl_title.clear(target)
|
return mcl_title.clear(target)
|
||||||
end
|
end,
|
||||||
})
|
})
|
||||||
cmd:sub(":name:username reset", {
|
cmd:sub(":name:username reset", {
|
||||||
func = function(name, target)
|
func = function(name, target)
|
||||||
|
|
Loading…
Reference in New Issue