Class MmcAdvancementTab
java.lang.Object
fr.multimc.api.spigot.common.advancements.MmcAdvancementTab
- All Implemented Interfaces:
org.bukkit.event.Listener
-
Constructor Summary
ConstructorsConstructorDescriptionMmcAdvancementTab(@NotNull org.bukkit.plugin.Plugin plugin, @NotNull com.fren_gor.ultimateAdvancementAPI.UltimateAdvancementAPI api, @NotNull String key, @NotNull com.fren_gor.ultimateAdvancementAPI.advancement.display.AdvancementDisplay rootDisplay, @NotNull AdvancementProperty... properties) Creates a newMmcAdvancementTabinstance with the specified key and rootAdvancementDisplay, with a default backgroundMaterialof Material.STONE.MmcAdvancementTab(@NotNull org.bukkit.plugin.Plugin plugin, @NotNull com.fren_gor.ultimateAdvancementAPI.UltimateAdvancementAPI api, @NotNull String key, @NotNull org.bukkit.Material background, @NotNull com.fren_gor.ultimateAdvancementAPI.advancement.display.AdvancementDisplay rootDisplay, @NotNull AdvancementProperty... properties) Creates a new MmcAdvancementTab instance with the specified key, background material and root display. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAdvancement(@NotNull AbstractAdvancement... advancements) AddsBaseAdvancementto theAdvancementTab.com.fren_gor.ultimateAdvancementAPI.AdvancementTabcom.fren_gor.ultimateAdvancementAPI.advancement.RootAdvancementvoidonPlayerJoin(@NotNull com.fren_gor.ultimateAdvancementAPI.events.PlayerLoadingCompletedEvent e) voidregister()Registers theAdvancementTab.
-
Constructor Details
-
MmcAdvancementTab
public MmcAdvancementTab(@NotNull @NotNull org.bukkit.plugin.Plugin plugin, @NotNull @NotNull com.fren_gor.ultimateAdvancementAPI.UltimateAdvancementAPI api, @NotNull @NotNull String key, @NotNull @NotNull org.bukkit.Material background, @NotNull @NotNull com.fren_gor.ultimateAdvancementAPI.advancement.display.AdvancementDisplay rootDisplay, @NotNull @NotNull AdvancementProperty... properties) Creates a new MmcAdvancementTab instance with the specified key, background material and root display.- Parameters:
api- theUltimateAdvancementAPIinstancekey- the key ofAdvancementTabbackground- the backgroundMaterialof theAdvancementTabrootDisplay- the rootAdvancementDisplayof theAdvancementTab- Throws:
IllegalArgumentException- if the key is invalid
-
MmcAdvancementTab
public MmcAdvancementTab(@NotNull @NotNull org.bukkit.plugin.Plugin plugin, @NotNull @NotNull com.fren_gor.ultimateAdvancementAPI.UltimateAdvancementAPI api, @NotNull @NotNull String key, @NotNull @NotNull com.fren_gor.ultimateAdvancementAPI.advancement.display.AdvancementDisplay rootDisplay, @NotNull @NotNull AdvancementProperty... properties) Creates a newMmcAdvancementTabinstance with the specified key and rootAdvancementDisplay, with a default backgroundMaterialof Material.STONE.- Parameters:
api- theUltimateAdvancementAPIinstancekey- the key of theAdvancementTabrootDisplay- the rootAdvancementDisplayof theAdvancementTab
-
-
Method Details
-
addAdvancement
AddsBaseAdvancementto theAdvancementTab.- Parameters:
advancements- theBaseAdvancementto be added- Throws:
IllegalStateException- if theAdvancementTabhas already been registered
-
register
public void register()Registers theAdvancementTab.- Throws:
IllegalStateException- if theAdvancementTabhas already been registered
-
onPlayerJoin
public void onPlayerJoin(@NotNull @NotNull com.fren_gor.ultimateAdvancementAPI.events.PlayerLoadingCompletedEvent e) -
getAdvancementTab
public com.fren_gor.ultimateAdvancementAPI.AdvancementTab getAdvancementTab() -
getRootAdvancement
public com.fren_gor.ultimateAdvancementAPI.advancement.RootAdvancement getRootAdvancement() -
getAdvancements
-