Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.board.api;
- import org.bukkit.Bukkit;
- import org.bukkit.Material;
- import org.bukkit.entity.Player;
- import org.bukkit.inventory.ItemStack;
- import com.board.scoreboard.ScoreBoard_One;
- import com.board.scoreboard.ScoreBoard_Three;
- import com.board.scoreboard.ScoreBoard_Two;
- public class Timer implements Runnable {
- int timer = 0;
- @Override
- public void run() {
- for (Player p : Bukkit.getOnlinePlayers()) {
- if (p.getWorld().getName().equalsIgnoreCase("MiniGame_BedWars")) {
- return;
- }
- for (ItemStack stack : p.getInventory().getContents()) {
- if (stack == null) {
- continue;
- }
- if (stack.getType() == Material.DIAMOND && stack.getItemMeta() != null
- && stack.getItemMeta().getDisplayName() != null
- && stack.getItemMeta().getDisplayName().equalsIgnoreCase("govnocode")) {
- return;
- }
- }
- if (timer % 50 == 0) {
- ScoreBoard_One.Board(p);
- }
- if (timer % 100 == 0) {
- ScoreBoard_Two.Board(p);
- }
- if (timer % 150 == 0) {
- ScoreBoard_Three.Board(p);
- }
- }
- ++timer;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement