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-c427514a06d6master
parent
2786ad306a
commit
ed7b680d3c
|
@ -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")
|
||||
|
|
|
@ -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
|
|
@ -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
|
||||
|
|
|
@ -13,5 +13,5 @@ Color=2
|
|||
Inherits=Default
|
||||
|
||||
[Default]
|
||||
Permissions=core.help,core.playerlist,core.pluginlist,core.spawn
|
||||
Color=7
|
||||
Permissions=core.build,core.help,core.playerlist,core.pluginlist,core.spawn
|
||||
Color=7
|
|
@ -13,5 +13,5 @@ Color=2
|
|||
Inherits=Default
|
||||
|
||||
[Default]
|
||||
Permissions=core.help,core.playerlist,core.pluginlist,core.spawn
|
||||
Color=7
|
||||
Permissions=core.build,core.help,core.playerlist,core.pluginlist,core.spawn
|
||||
Color=7
|
Loading…
Reference in New Issue