diff options
author | nielsbreu@gmail.com <nielsbreu@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2013-06-30 21:14:22 +0200 |
---|---|---|
committer | nielsbreu@gmail.com <nielsbreu@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2013-06-30 21:14:22 +0200 |
commit | 290ab0b588a13cedceac6cdaa33e7e67969b20b2 (patch) | |
tree | bba78972be6e7218122d4cec4ccf05b9817c3bc7 /MCServer/Plugins/Core/main.lua | |
parent | Fixed crouch-placing unplaceable items (FS #399) (diff) | |
download | cuberite-290ab0b588a13cedceac6cdaa33e7e67969b20b2.tar cuberite-290ab0b588a13cedceac6cdaa33e7e67969b20b2.tar.gz cuberite-290ab0b588a13cedceac6cdaa33e7e67969b20b2.tar.bz2 cuberite-290ab0b588a13cedceac6cdaa33e7e67969b20b2.tar.lz cuberite-290ab0b588a13cedceac6cdaa33e7e67969b20b2.tar.xz cuberite-290ab0b588a13cedceac6cdaa33e7e67969b20b2.tar.zst cuberite-290ab0b588a13cedceac6cdaa33e7e67969b20b2.zip |
Diffstat (limited to 'MCServer/Plugins/Core/main.lua')
-rw-r--r-- | MCServer/Plugins/Core/main.lua | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/MCServer/Plugins/Core/main.lua b/MCServer/Plugins/Core/main.lua index 1f24e0715..fa67dc977 100644 --- a/MCServer/Plugins/Core/main.lua +++ b/MCServer/Plugins/Core/main.lua @@ -10,7 +10,7 @@ WhiteListIni = {} X = {}
Y = {}
Z = {}
-
+LimitWorldsCuboid = {}
@@ -19,7 +19,7 @@ function Initialize(Plugin) PLUGIN = Plugin
Plugin:SetName("Core")
- Plugin:SetVersion(12)
+ Plugin:SetVersion(13)
PluginManager = cRoot:Get():GetPluginManager()
PluginManager:AddHook(Plugin, cPluginManager.HOOK_PLAYER_JOINED)
@@ -68,10 +68,19 @@ function Initialize(Plugin) if ( IniFile:ReadFile() == true ) then
HardCore = IniFile:GetValueSet("GameMode", "Hardcore", "false")
LimitWorld = IniFile:GetValueSetB("Worlds", "LimitWorld", true)
- LimitWorldWidth = IniFile:GetValueSetI("Worlds", "LimitWorldWidth", 200)
+ LimitWorldWidth = IniFile:GetValueSetI("Worlds", "LimitWorldWidth", 10)
SHOW_PLUGIN_NAMES = IniFile:GetValueSetB("HelpPlugin", "ShowPluginNames", true )
+ IniFile:WriteFile()
end
+ cRoot:Get():ForEachWorld(
+ function( World )
+ LimitWorldsCuboid[World:GetName()] = cCuboid()
+ LimitWorldsCuboid[World:GetName()].p1 = Vector3i( math.floor(World:GetSpawnX() / 16) + LimitWorldWidth, 0, math.floor(World:GetSpawnZ() / 16) + LimitWorldWidth)
+ LimitWorldsCuboid[World:GetName()].p2 = Vector3i( math.floor(World:GetSpawnX() / 16) - LimitWorldWidth, 256, math.floor(World:GetSpawnZ() / 16) - LimitWorldWidth)
+ LimitWorldsCuboid[World:GetName()]:Sort()
+ end
+ )
-- Load whitelist, and add default values and stuff
WhiteListIni = cIniFile( Plugin:GetLocalDirectory() .. "/whitelist.ini" )
if ( WhiteListIni:ReadFile() == true ) then
|