Each player now gets the same reminder #12
|
@ -1,11 +1,13 @@
|
|||
package xyz.etztech.qol;
|
||||
|
||||
import net.md_5.bungee.api.chat.BaseComponent;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.configuration.file.FileConfiguration;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.plugin.RegisteredServiceProvider;
|
||||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
import org.bukkit.scheduler.BukkitRunnable;
|
||||
import org.dynmap.DynmapAPI;
|
||||
import org.dynmap.markers.Marker;
|
||||
import org.dynmap.markers.MarkerAPI;
|
||||
|
@ -144,9 +146,11 @@ public class QoL extends JavaPlugin {
|
|||
Bukkit.getScheduler().scheduleSyncRepeatingTask(QoL.getInstance(), new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
BaseComponent [] msg = reminder.nextReminder();
|
||||
for (Player player : Bukkit.getOnlinePlayers()) {
|
||||
player.spigot().sendMessage(reminder.nextReminder());
|
||||
player.spigot().sendMessage(msg);
|
||||
}
|
||||
Bukkit.getConsoleSender().spigot().sendMessage(msg);
|
||||
}
|
||||
}, 0, EtzTechUtil.minutesToTicks(reminder.getFrequency()));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue