mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2025-12-31 21:01:39 +09:00
Added discord alert
This commit is contained in:
@@ -2,6 +2,7 @@
|
|||||||
-- @config Discord-Alerts
|
-- @config Discord-Alerts
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
entity_protection=true,
|
||||||
player_reports=true,
|
player_reports=true,
|
||||||
player_warnings=true,
|
player_warnings=true,
|
||||||
player_bans=true,
|
player_bans=true,
|
||||||
|
|||||||
@@ -76,6 +76,21 @@ local function emit_event(args)
|
|||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
|
--- Repeat protected entity mining
|
||||||
|
if config.entity_protection then
|
||||||
|
local EntityProtection = require 'modules.control.protection' --- @dep modules.control.protection
|
||||||
|
Event.add(EntityProtection.events.on_repeat_violation, function(event)
|
||||||
|
local player_name = get_player_name(event)
|
||||||
|
emit_event{
|
||||||
|
title='Entity Protection',
|
||||||
|
description='A player removed protected entities',
|
||||||
|
color=Colors.yellow,
|
||||||
|
['Player']='<inline>'..player_name,
|
||||||
|
['Entity']='<inline>'..event.entity.name
|
||||||
|
}
|
||||||
|
end)
|
||||||
|
end
|
||||||
|
|
||||||
--- Reports added and removed
|
--- Reports added and removed
|
||||||
if config.player_reports then
|
if config.player_reports then
|
||||||
local Reports = require 'modules.control.reports' --- @dep modules.control.reports
|
local Reports = require 'modules.control.reports' --- @dep modules.control.reports
|
||||||
|
|||||||
Reference in New Issue
Block a user