Class MainHub
java.lang.Object
fr.prodrivers.bukkit.commons.sections.Section
fr.prodrivers.bukkit.commons.hubs.MainHub
- Direct Known Subclasses:
DefaultMainHub
Base class for Prodrivers Commons-managed main hub.
Implement this class if you want to use Prodrivers Commons' managed main hub with your own logic. Used implementation can be changed in configuration.
-
Method Summary
Modifier and TypeMethodDescription@NonNull Set<SectionCapabilities>Get all capabilities of a section.booleanjoin(@NonNull org.bukkit.entity.Player player) Section join callback.booleanleave(@NonNull org.bukkit.OfflinePlayer player) Section leave callback.booleanSection pre join callback, called to check whether the player should enter the section.booleanSection pre leave callback, called to check whether the player can leave the section.Methods inherited from class fr.prodrivers.bukkit.commons.sections.Section
add, addChildren, addParent, contains, contains, getChildSections, getFullName, getName, getParentSection, getParentsFullName, getPlayers, getSelectionUI, getSplitFullName, remove, removeChildren, removeParent
-
Method Details
-
getCapabilities
Description copied from class:SectionGet all capabilities of a section.- Specified by:
getCapabilitiesin classSection- Returns:
trueSection capabilities
-
preJoin
public boolean preJoin(@NonNull org.bukkit.entity.Player player, Section targetSection, boolean fromParty) Description copied from class:SectionSection pre join callback, called to check whether the player should enter the section.This could be called at any point in the section's lifetime. The player is not guaranteed to actually enter the section.
The return value should be a guarantee that the player can enter the section.
-
join
public boolean join(@NonNull org.bukkit.entity.Player player) Description copied from class:SectionSection join callback. Should do the actions required when a player enters a section. -
preLeave
public boolean preLeave(@NonNull org.bukkit.OfflinePlayer player, Section targetSection, boolean fromParty) Description copied from class:SectionSection pre leave callback, called to check whether the player can leave the section.This could be called at any point in the section's lifetime. The player is not guaranteed to actually leave the section. This can be called even if the player is not actually in the section (ex: called during the check pass of section tree traversal)
The return value should be a guarantee that the player can leave the section.
-
leave
public boolean leave(@NonNull org.bukkit.OfflinePlayer player) Description copied from class:SectionSection leave callback. Should do the actions required when a player leaves a section.
-