Giter VIP home page Giter VIP logo

java-discord-integration's Introduction

Discord Integration

An extremely simple project, to help beginners integrate their Minecraft Paper/Spigot plugins with their Discord Applications through Java. This project aims on improving the community, and helping new people on software engineering.

This project does not aim to teach Java, and it is expected that you at least know the syntax beforehand. It is also expected that you know at least what is a Minecraft Plugin. If you do not know how to make Minecraft Plugins, check this YouTube playlist for more information.

๐Ÿ“š Dependencies

Paper 1.20.1, Java-Ngrok, Javacord

  • In this project, I used Maven, so you just need to copy and paste this section for declaring our dependencies:
<dependency>
    <groupId>org.javacord</groupId>
    <artifactId>javacord</artifactId>
    <version>3.8.0</version>
    <type>pom</type>
    <scope>compile</scope>
</dependency>
<dependency>
    <groupId>com.github.alexdlaird</groupId>
    <artifactId>java-ngrok</artifactId>
    <version>2.2.7</version>
</dependency> 
  • And this section for declaring the repositories, which Maven needs to install the package dependencies from:
<repository>
    <id>sonatype</id>
    <url>https://oss.sonatype.org/content/groups/public/</url>
</repository>
<repository>
    <id>jitpack.io</id>
    <url>https://jitpack.io</url>
</repository>
  • All this part done, now you can clone or copy parts of this repository and test things out for yourself. 80% of classes in this project are commented and documented, each part, variable, and method explained bit by bit. Create new things, and enjoy!

๐Ÿ—๏ธ Structure

From every interface, to every method, is thought before typed. This project structure keeps everything in it's place, where it's logical to be.

We start at the main class, DiscordIntegration. When our plugin is enabled, we register our Minecraft Commands, and Listeners, then, we create our DiscordApi Object, right here, along with our Webhooks, declared by the user's configuration file, and when it loads, Discord commands are loaded and registered, built by the same CommandStructure Interface, where its expected methods and varibles are put in place. And if we enable it, we can even create our own Ngrok Tunnel. Minecraft Commands on 1.12+, have something called TabExecuter. We use it to help the player typing the command, and to understand what's expected from the next argument, like we did here, on the WaypointCommand.

java-discord-integration's People

Contributors

karboxxx avatar

Watchers

 avatar

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.