summaryrefslogtreecommitdiffstats
path: root/MCServer/Plugins/ProtectionAreas/ProtectionAreas.lua
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2013-06-06 19:10:45 +0200
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2013-06-06 19:10:45 +0200
commit78462062f345e4e46b37ea6ee208cea3b2688f34 (patch)
tree1edc1c9c91438c94f97deeeb9f4aa45345b0fb21 /MCServer/Plugins/ProtectionAreas/ProtectionAreas.lua
parentAdded LOGWARNING() function to Lua API, as a synonym to LOGWARN() (diff)
downloadcuberite-78462062f345e4e46b37ea6ee208cea3b2688f34.tar
cuberite-78462062f345e4e46b37ea6ee208cea3b2688f34.tar.gz
cuberite-78462062f345e4e46b37ea6ee208cea3b2688f34.tar.bz2
cuberite-78462062f345e4e46b37ea6ee208cea3b2688f34.tar.lz
cuberite-78462062f345e4e46b37ea6ee208cea3b2688f34.tar.xz
cuberite-78462062f345e4e46b37ea6ee208cea3b2688f34.tar.zst
cuberite-78462062f345e4e46b37ea6ee208cea3b2688f34.zip
Diffstat (limited to '')
-rw-r--r--MCServer/Plugins/ProtectionAreas/ProtectionAreas.lua14
1 files changed, 13 insertions, 1 deletions
diff --git a/MCServer/Plugins/ProtectionAreas/ProtectionAreas.lua b/MCServer/Plugins/ProtectionAreas/ProtectionAreas.lua
index d816f578f..603b7a87f 100644
--- a/MCServer/Plugins/ProtectionAreas/ProtectionAreas.lua
+++ b/MCServer/Plugins/ProtectionAreas/ProtectionAreas.lua
@@ -6,11 +6,23 @@
+--- Prefix for all messages logged to the server console
+PluginPrefix = "ProtectionAreas: ";
+
+
+
+
+
+--- Called by MCS when the plugin loads
+-- Returns true if initialization successful, false otherwise
function Initialize(a_Plugin)
a_Plugin:SetName("ProtectionAreas");
a_Plugin:SetVersion(1);
- InitializeStorage();
+ if (not(InitializeStorage())) then
+ LOGWARNING(PluginPrefix .. "failed to initialize Storage, plugin is disabled");
+ return false;
+ end
InitializeHooks(a_Plugin);
InitializeCommandHandlers();