mcnotify will now squelch notifications from mcMMO & players who are squelched will be reminded of their squelch status at least once an hour (you can disable this in advanced.yml)

This commit is contained in:
nossr50
2019-04-04 17:27:17 -07:00
parent cabc5977d9
commit 8538ac4e50
8 changed files with 56 additions and 3 deletions

View File

@ -0,0 +1,23 @@
package com.gmail.nossr50.runnables.commands;
import com.gmail.nossr50.locale.LocaleLoader;
import com.gmail.nossr50.util.player.UserManager;
import org.bukkit.Bukkit;
import org.bukkit.entity.Player;
import org.bukkit.scheduler.BukkitRunnable;
public class NotifySquelchReminderTask extends BukkitRunnable {
@Override
public void run() {
for (Player player : Bukkit.getOnlinePlayers()) {
if(UserManager.getPlayer(player) != null)
{
if(!UserManager.getPlayer(player).useChatNotifications())
{
player.sendMessage(LocaleLoader.getString("Reminder.Squelched"));
}
}
}
}
}