summaryrefslogtreecommitdiffstats
path: root/Plugins
diff options
context:
space:
mode:
authorlapayo94@gmail.com <lapayo94@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-07-08 23:01:08 +0200
committerlapayo94@gmail.com <lapayo94@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-07-08 23:01:08 +0200
commit083228a10dffcaa77b1d0035c29013c6802befd4 (patch)
tree4d8ba1ce8501f044d10135e836e6f956f1b99fa4 /Plugins
parentAdded a lilypad finisher (diff)
downloadcuberite-083228a10dffcaa77b1d0035c29013c6802befd4.tar
cuberite-083228a10dffcaa77b1d0035c29013c6802befd4.tar.gz
cuberite-083228a10dffcaa77b1d0035c29013c6802befd4.tar.bz2
cuberite-083228a10dffcaa77b1d0035c29013c6802befd4.tar.lz
cuberite-083228a10dffcaa77b1d0035c29013c6802befd4.tar.xz
cuberite-083228a10dffcaa77b1d0035c29013c6802befd4.tar.zst
cuberite-083228a10dffcaa77b1d0035c29013c6802befd4.zip
Diffstat (limited to '')
-rw-r--r--Plugins/SquirrelChatLog.nut20
1 files changed, 7 insertions, 13 deletions
diff --git a/Plugins/SquirrelChatLog.nut b/Plugins/SquirrelChatLog.nut
index 586e8d6e2..df43c3fb3 100644
--- a/Plugins/SquirrelChatLog.nut
+++ b/Plugins/SquirrelChatLog.nut
@@ -1,26 +1,20 @@
-class SquirrelChatLog extends cPlugin__Squirrel
+class SquirrelChatLog extends Plugin
{
- constructor()
- {
- base.constructor();
- }
-
+ name = "SquirrelChatLogger";
+
function Initialize()
{
::print("SquirrelChatLog initialize()");
- this.SetName("SquirrelChatLog");
- local PluginManager = cRoot.Get().GetPluginManager();
- PluginManager.AddHook( this, PluginManager.E_PLUGIN_CHAT );
+ this.AddHook(Hook.Chat);
+
return true;
}
function OnChat( Message, Player )
{
+ ::print("CHAT");
::print(Player.GetName() + ": " + Message);
+
}
}
-
-
-Plugin <- SquirrelChatLog();
-cRoot.Get().GetPluginManager().AddPlugin( Plugin );