Package dev.mintychochip.mint
Class Mint
java.lang.Object
dev.mintychochip.mint.Mint
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ServiceHolder<EconomyService> static final ServiceHolder<PreferenceService> Service holder for the preference service.static final ServiceHolder<ThemeService> Service holder for the theme service. -
Method Summary
Modifier and TypeMethodDescriptionstatic net.kyori.adventure.text.ComponentcreateThemedComponent(net.kyori.adventure.audience.Audience audience, String miniMessage) Creates a themed component with theme tags automatically resolved.static voidsendThemedActionBar(net.kyori.adventure.audience.Audience audience, String miniMessage) Sends a themed action bar to an audience with theme tags automatically resolved.static voidsendThemedMessage(net.kyori.adventure.audience.Audience audience, String miniMessage) Sends a themed message to an audience with theme tags automatically resolved.static voidsendThemedTitle(net.kyori.adventure.audience.Audience audience, String title, String subtitle) Sends a themed title to an audience with theme tags automatically resolved.
-
Field Details
-
ECONOMY_SERVICE
-
THEME_SERVICE
Service holder for the theme service. -
PREFERENCE_SERVICE
Service holder for the preference service.
-
-
Method Details
-
createThemedComponent
@AvailableSince("1.3") public static net.kyori.adventure.text.Component createThemedComponent(net.kyori.adventure.audience.Audience audience, String miniMessage) Creates a themed component with theme tags automatically resolved.Available theme tags:
<accent>,<primary>,<secondary>,<neutral>,<success>,<error>,<warning>,<info>Colors resolve per-viewer based on their selected theme.
Component component = Mint.createThemedComponent(player, "<accent>Hello!");- Parameters:
audience- the audience to resolve the theme forminiMessage- the MiniMessage text with theme tags- Returns:
- the themed Component
-
sendThemedMessage
@AvailableSince("1.3") public static void sendThemedMessage(net.kyori.adventure.audience.Audience audience, String miniMessage) Sends a themed message to an audience with theme tags automatically resolved.Available theme tags:
<accent>,<primary>,<secondary>,<neutral>,<success>,<error>,<warning>,<info>Colors resolve per-viewer based on their selected theme.
Mint.sendThemedMessage(player, "<accent>Hello!");- Parameters:
audience- the message recipientminiMessage- the MiniMessage text with theme tags
-
sendThemedActionBar
@AvailableSince("1.3") public static void sendThemedActionBar(net.kyori.adventure.audience.Audience audience, String miniMessage) Sends a themed action bar to an audience with theme tags automatically resolved.Available theme tags:
<accent>,<primary>,<secondary>,<neutral>,<success>,<error>,<warning>,<info>Mint.sendThemedActionBar(player, "<success>Item purchased!");- Parameters:
audience- the message recipientminiMessage- the MiniMessage text with theme tags
-
sendThemedTitle
@AvailableSince("1.3") public static void sendThemedTitle(net.kyori.adventure.audience.Audience audience, String title, String subtitle) Sends a themed title to an audience with theme tags automatically resolved.Available theme tags:
<accent>,<primary>,<secondary>,<neutral>,<success>,<error>,<warning>,<info>Mint.sendThemedTitle(player, "<primary>Welcome!", "<secondary>Enjoy your stay");- Parameters:
audience- the message recipienttitle- the title text with theme tagssubtitle- the subtitle text with theme tags
-