summaryrefslogtreecommitdiffstats
path: root/MCServer/Plugins/ProtectionAreas/ProtectionAreas.lua
diff options
context:
space:
mode:
Diffstat (limited to 'MCServer/Plugins/ProtectionAreas/ProtectionAreas.lua')
-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();