Seend a death message to the webhook
This commit is contained in:
parent
30be45065f
commit
d92a8c6125
@ -24,5 +24,19 @@ public class BanHourly implements Listener{
|
||||
e.setKeepLevel(false);
|
||||
e.getDrops().clear();
|
||||
e.getPlayer().kick(Component.text("Vous etes mort dans la dernière heure... Patientez la prochaine!"), Cause.BANNED);
|
||||
|
||||
// Send death
|
||||
String link = DatabaseManager.getInstance().getConfig("discord-wh");
|
||||
if(!link.equals("")){
|
||||
DiscordWebhook discord = new DiscordWebhook(link);
|
||||
discord.setUsername("Ange de la mort");
|
||||
discord.setAvatarUrl("http://static.planetminecraft.com/files/banners/minecraft_banner_18d1g881yg5831c.png");
|
||||
discord.setContent(e.getDeathMessage());
|
||||
try {
|
||||
discord.execute();
|
||||
} catch(Exception ex){
|
||||
ex.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user