Package net.gcnt.additionsplus.api
Class AdditionsAPI
java.lang.Object
net.gcnt.additionsplus.api.AdditionsAPI
Official API class for the AdditionsPlus plugin.
 This class contains all methods that can be used to access different aspects of the plugin.
 Use this class to execute methods from instead of accessing subclasses directly.
- Since:
 - 2.4.0
 
- 
Nested Class Summary
Nested Classes - 
Constructor Summary
ConstructorsConstructorDescriptionAdditionsAPI(AdditionsPlus plugin)Create a new instance of the AdditionsAPI. - 
Method Summary
Modifier and TypeMethodDescriptiongetAdditionsEventByName(String name)Get anAdditionsEventfrom its identifier.Get a list of registered AdditionsPlus events.getBookByName(String name)Get aBookgetBooks()Get a list ofBookgetCommandByAlias(String alias)Get aCustomCommandgetCommandByName(String name)Get aCustomCommandnet.gcnt.additionsplus.events.CommandEventGet a list ofCustomCommandGet the AdditionsPlusConfigGet a list of registered custom actions.Get a list ofCustomItemgetIntervalActionByName(String name)Get anIntervalActionfrom its identifier.Get a list of loaded IntervalActions.getItemByName(String name)Get aCustomItemgetItems()Get a list ofCustomItemgetMenuByName(String name)Get a customMenuby namegetMenus()Get a list of customMenu.getNameTag(String group)Get a NameTag group.Get a list of NameTag group identifiers.getNMS()Get the AdditionsNMSclass for handling version-based things.getPlayersFile(org.bukkit.entity.Player p)Get player info stored by the plugingetSignByLocation(org.bukkit.Location loc)Get aCustomSignfrom its location.getSignByName(String name)Get aCustomSignfrom its identifier.getSigns()Returns a list of custom signsorg.bukkit.scoreboard.ScoreboardgetUtils()Get the Additions utils classbooleanisCustomActionRegistered(String identifier)Check if a specific action has been registeredvoidperformActions(ActionSender sender, List<String> actions)Perform a list of action strings for a sender.booleanregisterCustomAction(CustomAction customAction)Register a custom action which will be usable in every EventActions call on the server.voidregisterCustomEvent(AdditionsEvent event) 
- 
Constructor Details
- 
AdditionsAPI
Create a new instance of the AdditionsAPI. Do not use this to get the API as it will not have all the data you're looking for. UseAdditionsPlus.getAPI()instead. 
 - 
 - 
Method Details
- 
getPlugin
 - 
performActions
Perform a list of action strings for a sender.- Parameters:
 sender- User to execute the actions for.actions- List ofStringactions to be executed for the player.
 - 
registerCustomEvent
 - 
registerCustomAction
Register a custom action which will be usable in every EventActions call on the server.- Parameters:
 customAction-CustomActioninstance that contains all information about the custom action.- Returns:
 Booleanwhether the action has been registered.
 - 
getCustomActions
Get a list of registered custom actions.- Returns:
 - List of 
CustomActionthat contains all registered custom actions. 
 - 
isCustomActionRegistered
Check if a specific action has been registered- Parameters:
 identifier- Custom action identifier without []- Returns:
 BooleanWhether it is registered or not
 - 
getUtils
Get the Additions utils class- Returns:
 Utilsclass
 - 
getCommands
Get a list ofCustomCommand- Returns:
 - List of 
CustomCommand 
 - 
getCommandByName
Get aCustomCommand- Parameters:
 name- Name of the custom command- Returns:
 CustomCommandif found, null when invalid.
 - 
getCommandByAlias
Get aCustomCommand- Parameters:
 alias- Alias of the custom command- Returns:
 CustomCommandif found, null when invalid.
 - 
getCustomItems
Get a list ofCustomItem- Returns:
 - List of 
CustomItem 
 - 
getConfig
Get the AdditionsPlusConfig- Returns:
 Config.
 - 
getAdditionsEvents
Get a list of registered AdditionsPlus events.- Returns:
 - List of 
AdditionsEvent. 
 - 
getAdditionsEventByName
Get anAdditionsEventfrom its identifier.- Parameters:
 name- Identifier of the AdditionsEvent.- Returns:
 AdditionsEventwhen found, null if invalid.
 - 
getIntervalActions
Get a list of loaded IntervalActions.- Returns:
 - List of 
IntervalAction. 
 - 
getIntervalActionByName
Get anIntervalActionfrom its identifier.- Parameters:
 name- Identifier of the IntervalAction.- Returns:
 IntervalActionwhen found, null if invalid.
 - 
getBooks
Get a list ofBook- Returns:
 - List of 
Book 
 - 
getBookByName
Get aBook- Parameters:
 name- Name of the custom book- Returns:
 Bookif found, null when invalid.
 - 
getSigns
Returns a list of custom signs- Returns:
 - List of 
Book> 
 - 
getSignByName
Get aCustomSignfrom its identifier.- Parameters:
 name- Identifier of the sign.- Returns:
 CustomSignif found, null when invalid.
 - 
getSignByLocation
Get aCustomSignfrom its location.- Parameters:
 loc- Location of the sign.- Returns:
 CustomSignif found, null when invalid.
 - 
getNMS
Get the AdditionsNMSclass for handling version-based things.- Returns:
 NMSclass matching the server version.
 - 
getItems
Get a list ofCustomItem- Returns:
 - List of 
CustomItem 
 - 
getItemByName
Get aCustomItem- Parameters:
 name- Name of the custom item- Returns:
 CustomItemif found, null when invalid.
 - 
getMenus
Get a list of customMenu.- Returns:
 - List of 
Menu 
 - 
getMenuByName
Get a customMenuby name- Parameters:
 name- Name of the custom menu- Returns:
 Menuif found, null when invalid.
 - 
getNameTagGroups
Get a list of NameTag group identifiers.- Returns:
 - List of 
Stringwith nametag groups. 
 - 
getNameTag
Get a NameTag group.- Parameters:
 group- NameTag group name- Returns:
 NameTagsFilegroup info
 - 
getPlayersFile
Get player info stored by the plugin- Parameters:
 p- Player to get the info from- Returns:
 - PlayerFile with player info
 
 - 
getCommandEvent
public net.gcnt.additionsplus.events.CommandEvent getCommandEvent() - 
getFilesAPI
 - 
getSortedTablist
public org.bukkit.scoreboard.Scoreboard getSortedTablist() 
 -