summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2013-10-08 21:53:37 +0200
committerTiger Wang <ziwei.tiger@hotmail.co.uk>2013-10-08 21:53:37 +0200
commit110c633c5fc17aa4d3a3b92f84ee93f9017d179b (patch)
tree6b445203448717d09dd9a263a10f9e417eb5ef9a
parentMade MagicCarpet more magical! (diff)
downloadcuberite-110c633c5fc17aa4d3a3b92f84ee93f9017d179b.tar
cuberite-110c633c5fc17aa4d3a3b92f84ee93f9017d179b.tar.gz
cuberite-110c633c5fc17aa4d3a3b92f84ee93f9017d179b.tar.bz2
cuberite-110c633c5fc17aa4d3a3b92f84ee93f9017d179b.tar.lz
cuberite-110c633c5fc17aa4d3a3b92f84ee93f9017d179b.tar.xz
cuberite-110c633c5fc17aa4d3a3b92f84ee93f9017d179b.tar.zst
cuberite-110c633c5fc17aa4d3a3b92f84ee93f9017d179b.zip
Diffstat (limited to '')
-rw-r--r--MCServer/Plugins/MagicCarpet/coremessaging.lua23
-rw-r--r--MCServer/Plugins/MagicCarpet/plugin.lua2
2 files changed, 7 insertions, 18 deletions
diff --git a/MCServer/Plugins/MagicCarpet/coremessaging.lua b/MCServer/Plugins/MagicCarpet/coremessaging.lua
index 1677e8940..acf21df5b 100644
--- a/MCServer/Plugins/MagicCarpet/coremessaging.lua
+++ b/MCServer/Plugins/MagicCarpet/coremessaging.lua
@@ -1,28 +1,19 @@
-IniFile = cIniFile( "settings.ini" )
-IniFile:ReadFile()
-UsePrefixes = IniFile:GetValueSet( "Messaging", "Prefixes", "true" )
-IniFile:WriteFile()
+Core = cPluginManager:Get():GetPlugin("Core")
function SendMessage(a_Player, a_Message)
- if (UsePrefixes) then
- a_Player:SendMessage(cChatColor.Yellow .. "[INFO] " .. cChatColor.White .. a_Message)
- else
- a_Player:SendMessage(cChatColor.Yellow .. a_Message)
+ if (Core ~= nil) then
+ Core:Call("SendMessage", a_Player, a_Message)
end
end
function SendMessageSuccess(a_Player, a_Message)
- if (UsePrefixes) then
- a_Player:SendMessage(cChatColor.Green .. "[INFO] " .. cChatColor.White .. a_Message)
- else
- a_Player:SendMessage(cChatColor.Green .. a_Message)
+ if (Core ~= nil) then
+ Core:Call("SendMessageSuccess", a_Player, a_Message)
end
end
function SendMessageFailure(a_Player, a_Message)
- if (UsePrefixes) then
- a_Player:SendMessage(cChatColor.Red .. "[INFO] " .. cChatColor.White .. a_Message)
- else
- a_Player:SendMessage(cChatColor.Red .. a_Message)
+ if (Core ~= nil) then
+ Core:Call("SendMessageFailure", a_Player, a_Message)
end
end \ No newline at end of file
diff --git a/MCServer/Plugins/MagicCarpet/plugin.lua b/MCServer/Plugins/MagicCarpet/plugin.lua
index 4a2097351..27efdab32 100644
--- a/MCServer/Plugins/MagicCarpet/plugin.lua
+++ b/MCServer/Plugins/MagicCarpet/plugin.lua
@@ -1,8 +1,6 @@
local Carpets = {}
function Initialize( Plugin )
- PLUGIN = Plugin
-
Plugin:SetName( "MagicCarpet" )
Plugin:SetVersion( 2 )