1
0

Added core.build permission to Core. Without this permission players are unable to build

git-svn-id: http://mc-server.googlecode.com/svn/trunk@425 0a769ca7-a7f5-676a-18bf-c427514a06d6
This commit is contained in:
faketruth 2012-03-19 20:30:24 +00:00
parent 2786ad306a
commit ed7b680d3c
5 changed files with 20 additions and 4 deletions

View File

@ -19,6 +19,7 @@ function Initialize( Plugin )
PluginManager:AddHook( Plugin, cPluginManager.E_PLUGIN_PLAYER_JOIN )
PluginManager:AddHook( Plugin, cPluginManager.E_PLUGIN_LOGIN )
PluginManager:AddHook( Plugin, cPluginManager.E_PLUGIN_BLOCK_PLACE )
PluginManager:AddHook( Plugin, cPluginManager.E_PLUGIN_BLOCK_DIG )
PluginManager:AddHook( Plugin, cPluginManager.E_PLUGIN_KILLED )
Plugin:AddCommand("/help", " - [Page] Show this message", "core.help")

View File

@ -0,0 +1,11 @@
function OnBlockDig( Block, Player )
-- dont check if the direction is in the air
if Block.m_Direction ~= -1 then
if( Player:HasPermission("core.build") == false ) then
return true
end
end
return false
end

View File

@ -3,6 +3,10 @@ function OnBlockPlace( Block, Player )
-- dont check if the direction is in the air
if Block.m_Direction ~= -1 then
if( Player:HasPermission("core.build") == false ) then
return true
end
local X = Block.m_PosX
local Y = Block.m_PosY
local Z = Block.m_PosZ

View File

@ -13,5 +13,5 @@ Color=2
Inherits=Default
[Default]
Permissions=core.help,core.playerlist,core.pluginlist,core.spawn
Permissions=core.build,core.help,core.playerlist,core.pluginlist,core.spawn
Color=7

View File

@ -13,5 +13,5 @@ Color=2
Inherits=Default
[Default]
Permissions=core.help,core.playerlist,core.pluginlist,core.spawn
Permissions=core.build,core.help,core.playerlist,core.pluginlist,core.spawn
Color=7