mirror of
https://github.com/libraryaddict/LibsDisguises.git
synced 2025-01-30 23:01:50 +01:00
Add opt-out info
This commit is contained in:
parent
34b2fb09bb
commit
be33519def
@ -34,9 +34,12 @@ public class SkinUtils {
|
||||
}
|
||||
|
||||
private static int skinsSinceLastPromotion = 0;
|
||||
private static int totalSkinsUsedSince;
|
||||
private static long timeSinceLastPromotion = 0;
|
||||
|
||||
public static void attemptPromoteMineskin(CommandSender sender) {
|
||||
totalSkinsUsedSince++;
|
||||
|
||||
if (skinsSinceLastPromotion++ < 5 || timeSinceLastPromotion + TimeUnit.DAYS.toMillis(2) > System.currentTimeMillis() ||
|
||||
DisguiseUtilities.getMineSkinAPI().getApiKey() != null) {
|
||||
return;
|
||||
@ -49,6 +52,9 @@ public class SkinUtils {
|
||||
"Enjoying the ability to create player skins via file & url? You're using MineSkin which is run by Haylee // inventivetalent!" +
|
||||
" If you have the time, a small donation would be appreciated to help cover server costs https://support.inventivetalent.org/";
|
||||
|
||||
LibsDisguises.getInstance().getLogger().info("Promoted the support for MineSkin, " + totalSkinsUsedSince +
|
||||
" skins were requested since server startup. Opt out by setting a MineSkin api key inside LibsDisguises/configs/players.yml");
|
||||
|
||||
// No opt-out!
|
||||
if (sender == null) {
|
||||
LibsDisguises.getInstance().getLogger().info(message);
|
||||
|
Loading…
Reference in New Issue
Block a user