mirror of
https://github.com/PlaceholderAPI/PlaceholderAPI
synced 2025-02-05 15:55:28 +01:00
Config Update
This commit is contained in:
parent
a5200fd5c1
commit
63151dc800
@ -46,11 +46,13 @@ public class UpdateChecker implements Listener {
|
|||||||
|
|
||||||
@EventHandler(priority = EventPriority.MONITOR)
|
@EventHandler(priority = EventPriority.MONITOR)
|
||||||
public void onJoin(PlayerJoinEvent e) {
|
public void onJoin(PlayerJoinEvent e) {
|
||||||
|
if (plugin.getConfig().getBoolean("warn_admin_update")) {
|
||||||
if (e.getPlayer().hasPermission("placeholderapi.updatenotify")) {
|
if (e.getPlayer().hasPermission("placeholderapi.updatenotify")) {
|
||||||
e.getPlayer().sendMessage(ChatColor.translateAlternateColorCodes('&', "&bAn update for &fPlaceholder&7API &e(&fPlaceholder&7API &fv" + getLatestVersion() + "&e)"));
|
e.getPlayer().sendMessage(ChatColor.translateAlternateColorCodes('&', "&bAn update for &fPlaceholder&7API &e(&fPlaceholder&7API &fv" + getLatestVersion() + "&e)"));
|
||||||
e.getPlayer().sendMessage(ChatColor.translateAlternateColorCodes('&', "&bis available at &ehttps://www.spigotmc.org/resources/placeholderapi." + resourceId + "/"));
|
e.getPlayer().sendMessage(ChatColor.translateAlternateColorCodes('&', "&bis available at &ehttps://www.spigotmc.org/resources/placeholderapi." + resourceId + "/"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private String getSpigotVersion() {
|
private String getSpigotVersion() {
|
||||||
try {
|
try {
|
||||||
|
@ -8,10 +8,18 @@
|
|||||||
# Discord: https://discordapp.com/invite/7sndK3q
|
# Discord: https://discordapp.com/invite/7sndK3q
|
||||||
# No placeholders are provided with this plugin by default.
|
# No placeholders are provided with this plugin by default.
|
||||||
# Download placeholders: /papi ecloud
|
# Download placeholders: /papi ecloud
|
||||||
|
|
||||||
|
# Check if plugin is up to date
|
||||||
check_updates: true
|
check_updates: true
|
||||||
|
# Warn the admin if the plugin is out of date
|
||||||
|
warn_admin_update: true
|
||||||
|
# PlaceHolder cloud enabled
|
||||||
cloud_enabled: true
|
cloud_enabled: true
|
||||||
|
# Allow unverified Expansions
|
||||||
cloud_allow_unverified_expansions: false
|
cloud_allow_unverified_expansions: false
|
||||||
|
# Alternative meaning for true and false
|
||||||
boolean:
|
boolean:
|
||||||
'true': 'yes'
|
'true': 'yes'
|
||||||
'false': 'no'
|
'false': 'no'
|
||||||
|
# How you want to date formatted
|
||||||
date_format: MM/dd/yy HH:mm:ss
|
date_format: MM/dd/yy HH:mm:ss
|
||||||
|
Loading…
Reference in New Issue
Block a user