Skip to content

Instantly share code, notes, and snippets.

@AbrarSyed
Last active August 29, 2015 14:05
Show Gist options
  • Save AbrarSyed/21c335468ac13e597c04 to your computer and use it in GitHub Desktop.
Save AbrarSyed/21c335468ac13e597c04 to your computer and use it in GitHub Desktop.
package net.minecraftforge.permissions.api;
import net.minecraft.entity.player.EntityPlayer;
import java.util.Collection;
import java.util.UUID;
/**
* A group object in the API.
*
* Framework authors:
* If you choose to support groups, they must be retrievable via a class implementing this interface.
* Groups are not required to have chat prefixes/suffixes
*/
public interface IGroup {
/**
* Get all players in the group
*
* @return A list containing UUIDs of all players in the group
*/
Collection<UUID> getAllPlayers();
/**
* Is the player in the group
*
* @param player player to check
* @return if the player was in the group
*/
boolean isMember(UUID playerID);
/**
* Get the group name
*
* @return the group name
*/
String getName();
/**
* Get the chat prefix for this group. This prefix is meant to be displayed before the username in chat.\
* Null is never an option, return an empty string if no prefix is defined.
*
* @return the chat prefix
*/
String getChatPrefix();
/**
* Get the chat suffix for this group. This prefix is meant to be displayed after the username but before the message in chat.
* Null is never an option, return an empty string if no suffix is defined.
*
* @return the chat suffix
*/
String getChatSuffix();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment