summaryrefslogtreecommitdiffstats
path: root/MCServer/Plugins/MagicCarpet/coremessaging.lua
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2013-10-04 23:22:01 +0200
committerTiger Wang <ziwei.tiger@hotmail.co.uk>2013-10-04 23:22:01 +0200
commit914a318b8eab1d5cf913d3707a7af244b58a9bfb (patch)
tree63c86277447837795c569677c9462c1c0b58216f /MCServer/Plugins/MagicCarpet/coremessaging.lua
parentFixed discrepancy (diff)
downloadcuberite-914a318b8eab1d5cf913d3707a7af244b58a9bfb.tar
cuberite-914a318b8eab1d5cf913d3707a7af244b58a9bfb.tar.gz
cuberite-914a318b8eab1d5cf913d3707a7af244b58a9bfb.tar.bz2
cuberite-914a318b8eab1d5cf913d3707a7af244b58a9bfb.tar.lz
cuberite-914a318b8eab1d5cf913d3707a7af244b58a9bfb.tar.xz
cuberite-914a318b8eab1d5cf913d3707a7af244b58a9bfb.tar.zst
cuberite-914a318b8eab1d5cf913d3707a7af244b58a9bfb.zip
Diffstat (limited to 'MCServer/Plugins/MagicCarpet/coremessaging.lua')
-rw-r--r--MCServer/Plugins/MagicCarpet/coremessaging.lua28
1 files changed, 28 insertions, 0 deletions
diff --git a/MCServer/Plugins/MagicCarpet/coremessaging.lua b/MCServer/Plugins/MagicCarpet/coremessaging.lua
new file mode 100644
index 000000000..1677e8940
--- /dev/null
+++ b/MCServer/Plugins/MagicCarpet/coremessaging.lua
@@ -0,0 +1,28 @@
+IniFile = cIniFile( "settings.ini" )
+IniFile:ReadFile()
+UsePrefixes = IniFile:GetValueSet( "Messaging", "Prefixes", "true" )
+IniFile:WriteFile()
+
+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)
+ 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)
+ 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)
+ end
+end \ No newline at end of file