Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package org.bukkit.pandemic.AutoBroadcast;
- import org.bukkit.event.player.PlayerListener;
- import org.bukkit.event.player.PlayerMoveEvent;
- public class ABPlayerListener extends PlayerListener {
- public AutoBroadcast plugin;
- public int interval = 0;
- public int seconds = 0;
- public int wait = 0;
- public ABPlayerListener(AutoBroadcast _plugin) {
- plugin = _plugin;
- }
- public void onPlayerMove(PlayerMoveEvent event) {
- interval++;
- if (interval == 17) {
- seconds++;
- interval = 0;
- }
- if (interval == 0) {
- for (int i = 0; i < plugin.delays.size(); i++) {
- if (seconds % plugin.delays.get(i) == 0) {
- plugin.getServer().broadcastMessage(plugin.broadcasts.get(i));
- break;
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement