Implement in-game sidebars
This commit is contained in:
		@@ -5,6 +5,10 @@ import org.bukkit.Bukkit;
 | 
			
		||||
import org.bukkit.GameMode;
 | 
			
		||||
import org.bukkit.attribute.Attribute;
 | 
			
		||||
import org.bukkit.event.player.PlayerTeleportEvent;
 | 
			
		||||
import org.bukkit.scoreboard.ScoreboardManager;
 | 
			
		||||
 | 
			
		||||
import gg.malloc.defense.ui.Sidebar;
 | 
			
		||||
import gg.malloc.defense.model.Progress;
 | 
			
		||||
 | 
			
		||||
import java.util.HashMap;
 | 
			
		||||
import java.util.Collection;
 | 
			
		||||
@@ -90,14 +94,14 @@ public class PlayerManager {
 | 
			
		||||
    m_playerReadyStates.put(player, ready);
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  public double readyProgress() {
 | 
			
		||||
  public Progress readyProgress() {
 | 
			
		||||
    int readyNum = 0;
 | 
			
		||||
    for(boolean b : m_playerReadyStates.values()) {
 | 
			
		||||
      if (b) {
 | 
			
		||||
        readyNum += 1;
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
    return (double)readyNum / (double)m_playerReadyStates.size();
 | 
			
		||||
    return new StaticProgress(readyNum, m_playerReadyStates.size());
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  public boolean isEveryoneReady() {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user