Skip to content
This repository has been archived by the owner on Nov 1, 2019. It is now read-only.

KodiCore/KodiCore

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

KodiCore

Codacy Badge TravisCI Build Status Build Type - Shields.io

A set of functions to make Spigot (or Bukkit!) plugin debugging and development easier.

Setup (Maven)

Add this to the repositories section of your pom.xml:

<repositories>
  <!-- KodiCore -->
  <repository>
    <id>Prouser123-kodi-core</id>
    <url>https://packagecloud.io/Prouser123/kodi-core/maven2</url>
    <releases>
      <enabled>true</enabled>
    </releases>
    <snapshots>
      <enabled>true</enabled>
    </snapshots>
  </repository>
</repositories>

Then add this to the dependencies section of your pom.xml:

<dependencies>
  <!-- KodiCore -->
  <dependency>
    <groupId>me.prouser123</groupId>
    <artifactId>kodicore</artifactId>
    <version>LATEST</version>
    <scope>provided</scope>
  </dependency>
</dependencies>

Key Methods

More (and detailed) information for all methods can be found in the documentation, linked below.

FULL Documentation Link

Console

KodiCore Console Logging - log to the console with info, warning or severe types.

Class Location: me.prouser123.kodicore.send.Console

Required for plugin operation? Yes

Requires new instance? Yes - create with new Console(this); from your plugin's Main class.

Chat

Class Location: me.prouser123.kodicore.send.Chat

Requires new instance? No, just import the class and start coding!

Features:

  • Chat to permission
  • Chat to player
  • Chat to players
  • Chat to server / Broadcast to server
  • Chat to world

Utils

Class Location: me.prouser123.kodicore.Utils

Requires new instance? No, just import the class and start coding!

Features:

  • Add item to inventory (with modifiers)
  • Run a command in the console
  • Get World (by name)
  • Broadcasting
  • getConfig getInt
  • getConfig getString
  • Get online players (amount)
  • Get online players (player names)

Discord

Class Location: me.prouser123.kodicore.Discord

Requires new instance? Yes. Create with new Discord("discord-bot-token");

After you have created a instance you can add various things to your bot. See the docs for details.

Example feature:

  • Discord !serverinfo command

    Use Discord.api.addMessageCreateListener(new ServerInfo()); to enable.

    Example output:

    Output