WE compatibility for Notify

This commit is contained in:
VorTechnix 2024-10-17 08:50:57 -07:00
parent ae5d18248f
commit 0076010f35
No known key found for this signature in database
GPG key ID: 091E91A69545D5BA

View file

@ -1,4 +1,5 @@
--- A player notification system for worldeditadditions.
-- @module worldeditadditions_core.notify
local wea_c = worldeditadditions_core
-- Helper functions
@ -162,10 +163,11 @@ function Notify.suppress_for_function(name, func)
end
--- WorldEdit compatibility
-- if worldedit and type(worldedit.player_notify) == "function" then
-- worldedit.player_notify = function(name, message, ntype)
-- Notify(name, ntype, message)
-- end
-- end
if worldedit and type(worldedit.player_notify) == "function" then
worldedit.player_notify = function(name, message, ntype)
if not ntype then ntype = "info" end
Notify(name, ntype, message)
end
end
return Notify