onplayer enter unit
This commit is contained in:
@@ -234,7 +234,7 @@ do
|
||||
do -- PLAYER ENTER UNIT
|
||||
local playerEnterUnitListeners = {}
|
||||
---comment
|
||||
---@param listener table object with OnPlayerEnterUnit(self, unit)
|
||||
---@param listener table object with OnPlayerEntersUnit(self, unit)
|
||||
SpearheadEvents.AddOnPlayerEnterUnitListener = function(listener)
|
||||
if type(listener) ~= "table" then
|
||||
warn("Unit lost Event listener not of type table/object")
|
||||
@@ -249,7 +249,7 @@ do
|
||||
if playerEnterUnitListeners then
|
||||
for _, callable in pairs(playerEnterUnitListeners) do
|
||||
local succ, err = pcall(function()
|
||||
callable:OnPlayerEnterUnit(unit)
|
||||
callable:OnPlayerEntersUnit(unit)
|
||||
end)
|
||||
if err then
|
||||
error(err)
|
||||
|
||||
Reference in New Issue
Block a user