summaryrefslogtreecommitdiffstats
path: root/MCServer/Plugins/ProtectionAreas/PlayerAreas.lua
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2013-06-04 23:05:33 +0200
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2013-06-04 23:05:33 +0200
commitf746d17424a071c15fd5b92bc521ce832ba15a07 (patch)
tree85fce40aa5d92dc03c360c916e277c5bf2f35ee6 /MCServer/Plugins/ProtectionAreas/PlayerAreas.lua
parentAdded script to generate cloc statistics (diff)
downloadcuberite-f746d17424a071c15fd5b92bc521ce832ba15a07.tar
cuberite-f746d17424a071c15fd5b92bc521ce832ba15a07.tar.gz
cuberite-f746d17424a071c15fd5b92bc521ce832ba15a07.tar.bz2
cuberite-f746d17424a071c15fd5b92bc521ce832ba15a07.tar.lz
cuberite-f746d17424a071c15fd5b92bc521ce832ba15a07.tar.xz
cuberite-f746d17424a071c15fd5b92bc521ce832ba15a07.tar.zst
cuberite-f746d17424a071c15fd5b92bc521ce832ba15a07.zip
Diffstat (limited to 'MCServer/Plugins/ProtectionAreas/PlayerAreas.lua')
-rw-r--r--MCServer/Plugins/ProtectionAreas/PlayerAreas.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/MCServer/Plugins/ProtectionAreas/PlayerAreas.lua b/MCServer/Plugins/ProtectionAreas/PlayerAreas.lua
index 472a4c59b..5d054ea15 100644
--- a/MCServer/Plugins/ProtectionAreas/PlayerAreas.lua
+++ b/MCServer/Plugins/ProtectionAreas/PlayerAreas.lua
@@ -11,7 +11,7 @@ A player can interact with a block if either one of these is true:
2, There is at least one area covering the block with IsAllowed set to true
The OOP class implementation follows the PiL 16.1
-Also, a global table g_PlayerAreas is the actual map of PlayerName -> cPlayerAreas
+Also, a global table g_PlayerAreas is the actual map of PlayerID -> cPlayerAreas
--]]
@@ -37,7 +37,7 @@ end
-- Adds a new cuboid to the area list, where the player is either allowed or not, depending on the IsAllowed param
function cPlayerAreas:AddArea(a_Cuboid, a_IsAllowed)
- table.add(self, {Cuboid = a_Cuboid, IsAllowed = a_IsAllowed});
+ table.insert(self, {Cuboid = a_Cuboid, IsAllowed = a_IsAllowed});
end
@@ -45,7 +45,7 @@ end
--- returns true if the player owning this object can interact with the specified block
-function cPlayerAreas:CanInteract(a_BlockX, a_BlockY, a_BlockZ)
+function cPlayerAreas:CanInteractWithBlock(a_BlockX, a_BlockY, a_BlockZ)
-- iterate through all the stored areas:
local IsInsideAnyArea = false;
for idx, Area in ipairs(self) do