From b5883ebd774184831e12d55e1b381d98a2c3c918 Mon Sep 17 00:00:00 2001 From: Petar Kresoja Date: Sat, 8 Oct 2022 13:25:34 +0200 Subject: [PATCH] Updated readme --- README.md | 61 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) diff --git a/README.md b/README.md index bf1f3a2..6286674 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,63 @@ # HideyHooks Discord webhook integration for the HideySMP + +### Requirements + +- Paper 1.19.2 +- [HideyLink](https://github.com/SamiCraft/HideyLink) + +### Configuration +```yaml +webhook: url +color: + system: 65535 + join: 65280 + leave: 16711680 + death: 8388736 + advancement: 5768601 +``` +- `webhook` - Discord webhook url +- `color.system` - Color used for system embeds (ex: server starting) +- `color.join` - Color used on player join embeds +- `color.leave` - Color used on player leave embeds +- `color.death` - Color used on player death embeds +- `color.advancement` - Color used on player advancement embeds + +> Keep in mind that color values can be both in decimal and hexadecimal formats, but it's recommended to set theme in decimal values + +### For developers + +Make sure to add the plugin as your dependency +```xml + + + pequla-repo + https://maven.pequla.com/releases + + + + + + com.samifying + hidey-hooks + 1.0 + provided + + +``` + +Example usage: +```java +PluginManager manager = getServer().getPluginManager(); +HideyHooks hooks = (HideyHooks) manager.getPlugin("HideyHooks"); +if (link == null) { + getLogger().severe("HideyLink not found"); + manager.disablePlugin(this); + return; +} + +// Instance of WebhookClient +hooks.getClient().send("Hello from another plugin"); +``` + +> All webhooks are sent async. Minn's [discord-webhooks](https://github.com/MinnDevelopment/discord-webhooks) are used as discord webhook api wrapper \ No newline at end of file