summaryrefslogtreecommitdiffstats
path: root/MCServer/Plugins/ProtectionAreas/PlayerAreas.lua
diff options
context:
space:
mode:
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