Notifications Configuration
The notifications section in mineLogin allows server administrators to customize how and when players receive important messages. This section focuses on title notifications, which are prominent messages displayed on the player's screen.
Here's the relevant section from the configuration file:
notifications-title:
enabled: true
fade-in: 1
fade-out: 1
stay: 3
notification-title: '&#ffaf05&lm i n e L o g i n'
required-verification: ' &8[&6#&8] &aConfirm verification!'
success-premium-login: ' &8[&6#&8] &aSuccess premium log in!'
success-session-login: ' &8[&6#&8] &aSuccess session log in!'
success-cracked-login: ' &8[&6#&8] &aSuccess cracked log in!'
success-register: ' &8[&6#&8] &aSuccess account registration.'
need-registered: ' &8[&6#&8] &aYou need to register.'
need-logged: ' &8[&6#&8] &aYou need to log in.'
General Settings
enabled: true
- Purpose: Toggles the title notifications feature on or off.
- Values:
true
orfalse
- When set to
false
, no title notifications will be displayed.
Timing Settings:
yamlfade-in: 1 fade-out: 1 stay: 3
fade-in
: Time in seconds for the title to fade in.fade-out
: Time in seconds for the title to fade out.stay
: Time in seconds the title remains on screen at full opacity.
notification-title: '&#ffaf05&lm i n e L o g i n'
- Sets the main title text for all notifications.
- Supports color codes and formatting.
Specific Notification Messages
Each of these settings defines the message for a specific notification:
required-verification: ' &8[&6#&8] &aConfirm verification!'
- Shown when a player needs to complete 2FA verification.
success-premium-login: ' &8[&6#&8] &aSuccess premium log in!'
- Displayed after a successful login for premium (paid) accounts.
success-session-login: ' &8[&6#&8] &aSuccess session log in!'
- Shown when a player successfully logs in via a session.
success-cracked-login: ' &8[&6#&8] &aSuccess cracked log in!'
- Displayed after a successful login for non-premium accounts.
success-register: ' &8[&6#&8] &aSuccess account registration.'
- Shown after successful account registration.
need-registered: ' &8[&6#&8] &aYou need to register.'
- Displayed when an unregistered player needs to create an account.
need-logged: ' &8[&6#&8] &aYou need to log in.'
- Shown when a player needs to log in.
Best Practices
Clear and Concise Messages
- Keep messages short and to the point for easy readability.
- Use color coding to emphasize important parts of the message.
Consistent Styling
- Maintain a consistent style across all messages for a professional look.
- The
&8[&6#&8]
prefix in the example provides a consistent visual element.
Appropriate Timing
- Adjust
fade-in
,fade-out
, andstay
times to ensure messages are visible long enough to be read but not so long as to be annoying. - A total time of 5 seconds (1s fade-in + 3s stay + 1s fade-out) is generally sufficient.
- Adjust
Color Usage
- Use colors to differentiate message types (e.g., green for success, red for warnings).
- The
&#ffaf05
in the main title is a hex color code for a custom orange color.
Localization
- Consider offering messages in multiple languages if your server caters to an international audience.
Customization Tips
Color Codes
- Use
&
followed by a code for basic colors (e.g.,&a
for green,&c
for red). - Use
&#RRGGBB
for hex color codes to get precise colors.
- Use
Formatting Codes
&l
for bold,&n
for underline,&o
for italic,&k
for obfuscated text.
Placeholders
- If supported, consider using placeholders like
{player}
to personalize messages.
- If supported, consider using placeholders like
Testing
- Always test your notifications in-game after making changes to ensure they look as intended.
Example Custom Configuration
notifications-title:
enabled: true
fade-in: 1
fade-out: 1
stay: 4
notification-title: 'ദff&lYour Server Name'
required-verification: ' &7[&e!&7] &bPlease verify your account'
success-premium-login: ' &7[&a✔&7] &aWelcome back, premium player!'
success-session-login: ' &7[&a✔&7] &aWelcome back!'
success-cracked-login: ' &7[&a✔&7] &aLogin successful!'
success-register: ' &7[&a✔&7] &aAccount created successfully!'
need-registered: ' &7[&c!&7] &cPlease register to play'
need-logged: ' &7[&c!&7] &cPlease log in to continue'
This example uses a custom blue color for the server name, employs icons for visual cues, and maintains a consistent style across all messages.
Remember to restart your server or reload the plugin after making changes to see them take effect. Always consider the overall user experience when configuring these notifications.