Coder Social home page Coder Social logo

hideyhooks's Introduction

HideyHooks

Discord webhook integration for the HideySMP

Requirements

Configuration

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

<repositories>
    <repository>
        <id>pequla-repo</id>
        <url>https://maven.pequla.com/releases</url>
    </repository>
</repositories>

<dependencies>
    <dependency>
        <groupId>com.samifying</groupId>
        <artifactId>hidey-hooks</artifactId>
        <version>1.0</version>
        <scope>provided</scope>
    </dependency>
</dependencies>

Example usage:

PluginManager manager = getServer().getPluginManager();
HideyHooks hooks = (HideyHooks) manager.getPlugin("HideyHooks");
if (hooks == null) {
  getLogger().severe("HideyHooks 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 are used as discord webhook api wrapper

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.