summaryrefslogtreecommitdiffstats
path: root/main.lua
diff options
context:
space:
mode:
authorAlexander Harkness <bearbin@gmail.com>2013-08-12 22:15:53 +0200
committerAlexander Harkness <bearbin@gmail.com>2013-08-12 22:15:53 +0200
commit0d97cd77fdee94f5bd5e2b89f645a84e62dc8da9 (patch)
tree14c5aa22454ca297f44ce0e85f9536ebad3752de /main.lua
parentInitial commit (diff)
downloadcuberite-0d97cd77fdee94f5bd5e2b89f645a84e62dc8da9.tar
cuberite-0d97cd77fdee94f5bd5e2b89f645a84e62dc8da9.tar.gz
cuberite-0d97cd77fdee94f5bd5e2b89f645a84e62dc8da9.tar.bz2
cuberite-0d97cd77fdee94f5bd5e2b89f645a84e62dc8da9.tar.lz
cuberite-0d97cd77fdee94f5bd5e2b89f645a84e62dc8da9.tar.xz
cuberite-0d97cd77fdee94f5bd5e2b89f645a84e62dc8da9.tar.zst
cuberite-0d97cd77fdee94f5bd5e2b89f645a84e62dc8da9.zip
Diffstat (limited to 'main.lua')
-rw-r--r--main.lua54
1 files changed, 54 insertions, 0 deletions
diff --git a/main.lua b/main.lua
new file mode 100644
index 000000000..e8d7d7990
--- /dev/null
+++ b/main.lua
@@ -0,0 +1,54 @@
+-- This plugin copyright Alexander Harkness 2013, licensed under the MIT license.
+
+-- Configuration
+g_ServerLang = "english"
+g_ConsoleLang = "english"
+
+-- Global Variables
+g_Plugin = nil
+g_PluginManager = nil
+g_PluginDir = nil
+g_UserData
+
+-- START WITH DA AWESOME!
+function Initialize( Plugin )
+
+ -- Set up the globals.
+ g_Plugin = Plugin
+ g_PluginManager = cRoot:Get():GetPluginManager()
+ g_PluginDir = Plugin:GetDirectory()
+
+ -- Set up the plugin details.
+ Plugin:SetName( "TransAPI" )
+ Plugin:SetVersion( 1 )
+
+ -- This is the place for commands!
+ PluginManager:BindCommand("/language", "transapi.setlang", HandleLanguageCommand, " - Set your preferred language.")
+
+ -- Load the userdata file.
+
+
+ LOG( "Initialized " .. Plugin:GetName() .. " v." .. Plugin:GetVersion() )
+
+ return true
+
+end
+
+function GetLanguage( user )
+
+ -- Returns a language to use.
+
+end
+
+function GetConsoleLanguage()
+ -- Return the language to use for console messages.
+ return g_ConsoleLang
+end
+
+function HandleLanguageCommand ( Split, Player )
+ return true
+end
+
+function OnDisable()
+ LOG( "Disabled TransAPI!" )
+end