-
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathsh_chatColorFix.lua
More file actions
28 lines (24 loc) · 884 Bytes
/
Copy pathsh_chatColorFix.lua
File metadata and controls
28 lines (24 loc) · 884 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
PLUGIN.name = "Chat color config fix"
PLUGIN.author = "Sample Name"
PLUGIN.desc = "Fixes an issue of chat color config not working properly"
nut.config = nut.config or {}
nut.config.stored = nut.config.stored or {}
function nut.config.get(key, default)
local config = nut.config.stored[key]
if (config) then
if (config.value != nil) then
if key == "chatColor" || key == "chatListenColor" then
return Color(config.value.r, config.value.g, config.value.b)
else
return config.value
end
elseif (config.default != nil) then
if key == "chatColor" || key == "chatListenColor" then
return Color(config.default.r, config.default.g, config.default.b)
else
return config.default
end
end
end
return default
end