Skip to content

ByteList/General-Common

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

General-Common

General-Common is the base from GameChest/General. It contains the full General API.


Maven implementations:

Common-Spigot:

<dependency>
    <groupId>de.gamechest</groupId>
    <artifactId>common-spigot</artifactId>
    <version>1.0-SNAPSHOT</version>
</dependency>

Common-Spigot contains the General API for the GameChest Spigot plugin.

Common-Bungee:

<dependency>
    <groupId>de.gamechest</groupId>
    <artifactId>common-bungee</artifactId>
    <version>1.0-SNAPSHOT</version>
</dependency>

Common-Bungee contains the General API for the GameChest BungeeCord plugin.


Example:

This example is using common-spigot. The common-bungee is built up the same using the BungeeCord-API.

SpigotChestPlugin chestPlugin = SpigotChest.getInstance(); // Getting singleton SpigotChestPlugin instance

UUID uuid = UUIDFetcher.getUUID("ByteList"); // Getting UUID from database if exist or unsave from mojang
Player player = Bukkit.getPlayer(uuid);
String displayname = chestPlugin.getDisplayname(player); // Getting the displayname from the player

if(!chestPlugin.hasRank(uuid, Rank.ADMIN)) { // Checking the rank of the player
    chestPlugin.sendNoPermissionMessage(player); // Sending a standard no permission message to the player
    return;
}

player.sendMessage(ChestPrefix.PREFIX + "§eDein Displayname lautet: " + displayname); // Sending a message with the standard prefix

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages