Advertisement
Guest User

Untitled

a guest
Apr 1st, 2018
270
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 72.39 KB | None | 0 0
  1. package pillars.EssemCSH.main;
  2.  
  3. import java.util.HashMap;
  4. import java.util.Map.Entry;
  5. import java.util.UUID;
  6.  
  7. import org.bukkit.Bukkit;
  8. import org.bukkit.Location;
  9. import org.bukkit.Material;
  10. import org.bukkit.World;
  11. import org.bukkit.block.Block;
  12. import org.bukkit.command.Command;
  13. import org.bukkit.command.CommandSender;
  14. import org.bukkit.entity.Player;
  15. import org.bukkit.event.EventHandler;
  16. import org.bukkit.event.Listener;
  17. import org.bukkit.event.block.BlockBreakEvent;
  18. import org.bukkit.event.block.BlockPlaceEvent;
  19. import org.bukkit.event.entity.PlayerDeathEvent;
  20. import org.bukkit.event.player.PlayerInteractEvent;
  21. import org.bukkit.event.player.PlayerJoinEvent;
  22. import org.bukkit.event.player.PlayerQuitEvent;
  23. import org.bukkit.plugin.PluginManager;
  24. import org.bukkit.plugin.java.JavaPlugin;
  25. import org.bukkit.scheduler.BukkitRunnable;
  26. import org.bukkit.scoreboard.DisplaySlot;
  27. import org.bukkit.scoreboard.Objective;
  28. import org.bukkit.scoreboard.Scoreboard;
  29. import org.bukkit.scoreboard.ScoreboardManager;
  30. import org.bukkit.scoreboard.Team;
  31.  
  32. public class Main extends JavaPlugin implements Listener {
  33.    
  34.    
  35.    
  36.    
  37.     /* THIS IS THE
  38.         onEnable() method */
  39.     @Override
  40.     public void onEnable() {
  41.         getLogger().info("§2Plugin activated properly, enjoy!");
  42.         PluginManager pm = this.getServer().getPluginManager();
  43.         pm.registerEvents(this, this);
  44.        
  45.         getConfig().options().copyDefaults(true);
  46.         saveConfig();
  47.        
  48.         queueTeamYellow.put(1, "null");
  49.         queueTeamYellow.put(2, "null");
  50.         queueTeamYellow.put(3, "null");
  51.         queueTeamYellow.put(4, "null");
  52.        
  53.         queueTeamBlue.put(1, "null");
  54.         queueTeamBlue.put(2, "null");
  55.         queueTeamBlue.put(3, "null");
  56.         queueTeamBlue.put(4, "null");
  57.  
  58.         queueTeamGreen.put(1, "null");
  59.         queueTeamGreen.put(2, "null");
  60.         queueTeamGreen.put(3, "null");
  61.         queueTeamGreen.put(4, "null");
  62.  
  63.         queueTeamRed.put(1, "null");
  64.         queueTeamRed.put(2, "null");
  65.         queueTeamRed.put(3, "null");
  66.         queueTeamRed.put(4, "null");
  67.     }
  68.    
  69.    
  70.    
  71.    
  72.     @Override
  73.     public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args)
  74.        {
  75.            if (sender instanceof Player && args.length == 1)
  76.            {
  77.                Player p = (Player) sender;
  78.                if (cmd.getName().equalsIgnoreCase("game"))
  79.                {
  80.                    if (args.length != 1) {
  81.                        p.sendMessage("§4Missing arguments!");
  82.                    }
  83.                    else {
  84.                        if (args[0].equalsIgnoreCase("start")) {
  85.                             if (p.isOp() || p.hasPermission("pillars.start")) {
  86.                                 gameStarting = true;
  87.                                
  88.                                 p.sendMessage("§9§lPillars " + dot + " §7Successfully started the game!");
  89.                                
  90.                                 World wSpawn = Bukkit.getServer().getWorld(getConfig().getString("spawn.world"));
  91.                                 double xSpawn = getConfig().getDouble("spawn.x");
  92.                                 double ySpawn = getConfig().getDouble("spawn.y");
  93.                                 double zSpawn = getConfig().getDouble("spawn.z");
  94.                                
  95.                                 for(Player player : Bukkit.getServer().getOnlinePlayers()) {
  96.                                     player.teleport(new Location(wSpawn, xSpawn, ySpawn, zSpawn));
  97.                                    
  98.                                     SetScoreBoard(player);
  99.                                 }
  100.                                
  101.                                 countDowner();
  102.                             }
  103.                        }
  104.                        if (args[0].equalsIgnoreCase("stop")) {
  105.                             if (p.isOp() || p.hasPermission("pillars.stop")) {
  106.                                
  107.                                 gameRunning = false;
  108.                                 countDown = 16;
  109.                                 gameStarting = false;
  110.                                
  111.                                 p.sendMessage("§9§lPillars " + dot + " §7Successfully stopped the game!");
  112.                                
  113.                                 World wSpawn = Bukkit.getServer().getWorld(getConfig().getString("spawn.world"));
  114.                                 double xSpawn = getConfig().getDouble("spawn.x");
  115.                                 double ySpawn = getConfig().getDouble("spawn.y");
  116.                                 double zSpawn = getConfig().getDouble("spawn.z");
  117.                                
  118.                                 for(Player player : Bukkit.getServer().getOnlinePlayers()) {
  119.                                     player.teleport(new Location(wSpawn, xSpawn, ySpawn, zSpawn));
  120.                                    
  121.                                     SetScoreBoard(player);
  122.                                 }
  123.                            
  124.                             }
  125.                       }
  126.                        if (args[0].equalsIgnoreCase("blockreset")) {
  127.                            if (p.isOp() || p.hasPermission("pillars.blockreset")) {
  128.                                for(Integer integer : BlockReset.keySet()){
  129.                                       Block block = BlockReset.get(integer);
  130.                                      
  131.                                       block.setType(Material.AIR);
  132.                                 }
  133.                            }
  134.                        }
  135.                    }
  136.                }
  137.                
  138.                if (cmd.getName().equalsIgnoreCase("gameset")) {
  139.                    if (p.isOp() || p.hasPermission("pillars.set")) {
  140.                        if (args[0].equalsIgnoreCase("spawn")) {
  141.                             getConfig().set("spawn.world", w);
  142.                             getConfig().set("spawn.x", x);
  143.                             getConfig().set("spawn.y", y + 2);
  144.                             getConfig().set("spawn.z", z);
  145.                             saveConfig();
  146.                                
  147.                             p.sendMessage("§9§lPillars " + dot + " §7Successfully set spawn!");
  148.                        }
  149.                        
  150.                        
  151.                        if (args[0].equalsIgnoreCase("yellowspawn")) {
  152.                             getConfig().set("yellowspawn.world", w);
  153.                             getConfig().set("yellowspawn.x", x);
  154.                             getConfig().set("yellowspawn.y", y + 2);
  155.                             getConfig().set("yellowspawn.z", z);
  156.                             saveConfig();
  157.                                
  158.                             p.sendMessage("§9§lPillars " + dot + " §7Successfully set §eyellow §5spawn!");
  159.                        }
  160.                        
  161.                        if (args[0].equalsIgnoreCase("yellowbeacon1")) {
  162.                             getConfig().set("yellowbeacon1.world", w);
  163.                             getConfig().set("yellowbeacon1.x", x - 0.5);
  164.                             getConfig().set("yellowbeacon1.y", y);
  165.                             getConfig().set("yellowbeacon1.z", z - 0.5);
  166.                             saveConfig();
  167.                                
  168.                             p.sendMessage("§9§lPillars " + dot + " §7Successfully set §eyellow §5beacon1!");
  169.                        }
  170.                        if (args[0].equalsIgnoreCase("yellowbeacon2")) {
  171.                             getConfig().set("yellowbeacon2.world", w);
  172.                             getConfig().set("yellowbeacon2.x", x - 0.5);
  173.                             getConfig().set("yellowbeacon2.y", y);
  174.                             getConfig().set("yellowbeacon2.z", z - 0.5);
  175.                             saveConfig();
  176.                                
  177.                             p.sendMessage(" §5Successfully set §eyellow §5beacon2!");
  178.                        }
  179.                        if (args[0].equalsIgnoreCase("yellowbeacon3")) {
  180.                             getConfig().set("yellowbeacon3.world", w);
  181.                             getConfig().set("yellowbeacon3.x", x - 0.5);
  182.                             getConfig().set("yellowbeacon3.y", y);
  183.                             getConfig().set("yellowbeacon3.z", z - 0.5);
  184.                             saveConfig();
  185.                                
  186.                             p.sendMessage("§9§lPillars " + dot + " §7Successfully set §eyellow §5beacon3!");
  187.                        }
  188.                        if (args[0].equalsIgnoreCase("yellowbeacon4")) {
  189.                             getConfig().set("yellowbeacon4.world", w);
  190.                             getConfig().set("yellowbeacon4.x", x - 0.5);
  191.                             getConfig().set("yellowbeacon4.y", y);
  192.                             getConfig().set("yellowbeacon4.z", z - 0.5);
  193.                             saveConfig();
  194.                                
  195.                             p.sendMessage("§9§lPillars " + dot + " §7Successfully set §eyellow §5beacon4!");
  196.                        }
  197.                        
  198.                        
  199.                        if (args[0].equalsIgnoreCase("bluespawn")) {
  200.                             getConfig().set("bluespawn.world", w);
  201.                             getConfig().set("bluespawn.x", x);
  202.                             getConfig().set("bluespawn.y", y + 2);
  203.                             getConfig().set("bluespawn.z", z);
  204.                             saveConfig();
  205.                                
  206.                             p.sendMessage("§9§lPillars " + dot + " §7Successfully set §bblue §5spawn!");
  207.                        }
  208.                        if (args[0].equalsIgnoreCase("bluebeacon1")) {
  209.                             getConfig().set("bluebeacon1.world", w);
  210.                             getConfig().set("bluebeacon1.x", x - 0.5);
  211.                             getConfig().set("bluebeacon1.y", y);
  212.                             getConfig().set("bluebeacon1.z", z - 0.5);
  213.                             saveConfig();
  214.                                
  215.                             p.sendMessage("§9§lPillars " + dot + " §7Successfully set §bblue §5beacon1!");
  216.                        }
  217.                        if (args[0].equalsIgnoreCase("bluebeacon2")) {
  218.                             getConfig().set("bluebeacon2.world", w);
  219.                             getConfig().set("bluebeacon2.x", x - 0.5);
  220.                             getConfig().set("bluebeacon2.y", y);
  221.                             getConfig().set("bluebeacon2.z", z - 0.5);
  222.                             saveConfig();
  223.                                
  224.                             p.sendMessage("§9§lPillars " + dot + " §7Successfully set §bblue §5beacon2!");
  225.                        }
  226.                        if (args[0].equalsIgnoreCase("bluebeacon3")) {
  227.                             getConfig().set("bluebeacon3.world", w);
  228.                             getConfig().set("bluebeacon3.x", x - 0.5);
  229.                             getConfig().set("bluebeacon3.y", y);
  230.                             getConfig().set("bluebeacon3.z", z - 0.5);
  231.                             saveConfig();
  232.                                
  233.                             p.sendMessage("§9§lPillars " + dot + " §7Successfully set §bblue §5beacon3!");
  234.                        }
  235.                        if (args[0].equalsIgnoreCase("bluebeacon4")) {
  236.                             getConfig().set("bluebeacon4.world", w);
  237.                             getConfig().set("bluebeacon4.x", x - 0.5);
  238.                             getConfig().set("bluebeacon4.y", y);
  239.                             getConfig().set("bluebeacon4.z", z - 0.5);
  240.                             saveConfig();
  241.                                
  242.                             p.sendMessage("§9§lPillars " + dot + " §7Successfully set §bblue §5beacon4!");
  243.                        }
  244.                        
  245.                        
  246.                        if (args[0].equalsIgnoreCase("greenspawn")) {
  247.                             getConfig().set("greenspawn.world", w);
  248.                             getConfig().set("greenspawn.x", x);
  249.                             getConfig().set("greenspawn.y", y + 2);
  250.                             getConfig().set("greenspawn.z", z);
  251.                             saveConfig();
  252.                                
  253.                             p.sendMessage("§9§lPillars " + dot + " §7Successfully set §agreen §5spawn!");
  254.                        }
  255.                        
  256.                        if (args[0].equalsIgnoreCase("greenbeacon1")) {
  257.                             getConfig().set("greenbeacon1.world", w);
  258.                             getConfig().set("greenbeacon1.x", x - 0.5);
  259.                             getConfig().set("greenbeacon1.y", y);
  260.                             getConfig().set("greenbeacon1.z", z - 0.5);
  261.                             saveConfig();
  262.                                
  263.                             p.sendMessage("§9§lPillars " + dot + " §7Successfully set §agreen §5beacon1!");
  264.                        }
  265.                        if (args[0].equalsIgnoreCase("greenbeacon2")) {
  266.                             getConfig().set("greenbeacon2.world", w);
  267.                             getConfig().set("greenbeacon2.x", x - 0.5);
  268.                             getConfig().set("greenbeacon2.y", y);
  269.                             getConfig().set("greenbeacon2.z", z - 0.5);
  270.                             saveConfig();
  271.                                
  272.                             p.sendMessage("§9§lPillars " + dot + " §7Successfully set §agreen §5beacon2!");
  273.                        }
  274.                        if (args[0].equalsIgnoreCase("greenbeacon3")) {
  275.                             getConfig().set("greenbeacon3.world", w);
  276.                             getConfig().set("greenbeacon3.x", x - 0.5);
  277.                             getConfig().set("greenbeacon3.y", y);
  278.                             getConfig().set("greenbeacon3.z", z - 0.5);
  279.                             saveConfig();
  280.                                
  281.                             p.sendMessage("§9§lPillars " + dot + " §7Successfully set §agreen §5beacon3!");
  282.                        }
  283.                        if (args[0].equalsIgnoreCase("greenbeacon4")) {
  284.                             getConfig().set("greenbeacon4.world", w);
  285.                             getConfig().set("greenbeacon4.x", x - 0.5);
  286.                             getConfig().set("greenbeacon4.y", y);
  287.                             getConfig().set("greenbeacon4.z", z - 0.5);
  288.                             saveConfig();
  289.                                
  290.                             p.sendMessage("§9§lPillars " + dot + " §7Successfully set §agreen §5beacon4!");
  291.                        }
  292.                        
  293.                        
  294.                        if (args[0].equalsIgnoreCase("redspawn")) {
  295.                             getConfig().set("redspawn.world", w);
  296.                             getConfig().set("redspawn.x", x);
  297.                             getConfig().set("redspawn.y", y + 2);
  298.                             getConfig().set("redspawn.z", z);
  299.                             saveConfig();
  300.                                
  301.                             p.sendMessage("§9§lPillars " + dot + " §7Successfully set §cred §5spawn!");
  302.                        }
  303.                        
  304.                        if (args[0].equalsIgnoreCase("redbeacon1")) {
  305.                             getConfig().set("redbeacon1.world", w);
  306.                             getConfig().set("redbeacon1.x", x - 0.5);
  307.                             getConfig().set("redbeacon1.y", y);
  308.                             getConfig().set("redbeacon1.z", z - 0.5);
  309.                             saveConfig();
  310.                                
  311.                             p.sendMessage("§9§lPillars " + dot + " §7Successfully set §cred §5beacon1!");
  312.                        }
  313.                        if (args[0].equalsIgnoreCase("redbeacon2")) {
  314.                             getConfig().set("redbeacon2.world", w);
  315.                             getConfig().set("redbeacon2.x", x - 0.5);
  316.                             getConfig().set("redbeacon2.y", y);
  317.                             getConfig().set("redbeacon2.z", z - 0.5);
  318.                             saveConfig();
  319.                                
  320.                             p.sendMessage("§9§lPillars " + dot + " §7Successfully set §cred §5beacon2!");
  321.                        }
  322.                        if (args[0].equalsIgnoreCase("redbeacon3")) {
  323.                             getConfig().set("redbeacon3.world", w);
  324.                             getConfig().set("redbeacon3.x", x - 0.5);
  325.                             getConfig().set("redbeacon3.y", y);
  326.                             getConfig().set("redbeacon3.z", z - 0.5);
  327.                             saveConfig();
  328.                                
  329.                             p.sendMessage("§9§lPillars " + dot + " §7Successfully set §cred §5beacon3!");
  330.                        }
  331.                        if (args[0].equalsIgnoreCase("redbeacon4")) {
  332.                             getConfig().set("redbeacon4.world", w);
  333.                             getConfig().set("redbeacon4.x", x - 0.5);
  334.                             getConfig().set("redbeacon4.y", y);
  335.                             getConfig().set("redbeacon4.z", z - 0.5);
  336.                             saveConfig();
  337.                                
  338.                             p.sendMessage("§9§lPillars " + dot + " §7Successfully set §cred §5beacon4!");
  339.                        }
  340.                        
  341.                        
  342.                        if (args[0].equalsIgnoreCase("gold1")) {
  343.                             getConfig().set("gold1.world", w);
  344.                             getConfig().set("gold1.x", x);
  345.                             getConfig().set("gold1.y", y + 1);
  346.                             getConfig().set("gold1.z", z);
  347.                             saveConfig();
  348.                                
  349.                             p.sendMessage("§9§lPillars " + dot + " §7Successfully set §6gold §5spawner1!");
  350.                        }
  351.                        if (args[0].equalsIgnoreCase("gold2")) {
  352.                             getConfig().set("gold2.world", w);
  353.                             getConfig().set("gold2.x", x);
  354.                             getConfig().set("gold2.y", y + 1);
  355.                             getConfig().set("gold2.z", z);
  356.                             saveConfig();
  357.                                
  358.                             p.sendMessage("§9§lPillars " + dot + " §7Successfully set §6gold §5spawner2!");
  359.                        }
  360.                        if (args[0].equalsIgnoreCase("gold3")) {
  361.                             getConfig().set("gold3.world", w);
  362.                             getConfig().set("gold3.x", x);
  363.                             getConfig().set("gold3.y", y + 1);
  364.                             getConfig().set("gold3.z", z);
  365.                             saveConfig();
  366.                                
  367.                             p.sendMessage("§9§lPillars " + dot + " §7Successfully set §6gold §5spawner3!");
  368.                        }
  369.                        if (args[0].equalsIgnoreCase("gold4")) {
  370.                             getConfig().set("gold4.world", w);
  371.                             getConfig().set("gold4.x", x);
  372.                             getConfig().set("gold4.y", y + 1);
  373.                             getConfig().set("gold4.z", z);
  374.                             saveConfig();
  375.                                
  376.                             p.sendMessage("§9§lPillars " + dot + " §7Successfully set §6gold §5spawner4!");
  377.                        }
  378.                        
  379.                        if (args[0].equalsIgnoreCase("diamond")) {
  380.                             getConfig().set("diamond.world", w);
  381.                             getConfig().set("diamond.x", x);
  382.                             getConfig().set("diamond.y", y + 1);
  383.                             getConfig().set("diamond.z", z);
  384.                             saveConfig();
  385.                                
  386.                             p.sendMessage("§9§lPillars " + dot + " §7Successfully set §1diamond §5spawner!");
  387.                        }
  388.                        
  389.                        
  390.                        if (args[0].equalsIgnoreCase("shopkeeper1")) {
  391.                             getConfig().set("shopkeeper1.world", w);
  392.                             getConfig().set("shopkeeper1.x", x);
  393.                             getConfig().set("shopkeeper1.y", y);
  394.                             getConfig().set("shopkeeper1.z", z);
  395.                             saveConfig();
  396.                                
  397.                             p.sendMessage("§9§lPillars " + dot + " §7Successfully set §7shopkeeper §5location1!");
  398.                        }
  399.                        if (args[0].equalsIgnoreCase("shopkeeper2")) {
  400.                             getConfig().set("shopkeeper2.world", w);
  401.                             getConfig().set("shopkeeper2.x", x);
  402.                             getConfig().set("shopkeeper2.y", y);
  403.                             getConfig().set("shopkeeper2.z", z);
  404.                             saveConfig();
  405.                                
  406.                             p.sendMessage("§9§lPillars " + dot + " §7Successfully set §7shopkeeper §5location2!");
  407.                        }
  408.                        if (args[0].equalsIgnoreCase("shopkeeper3")) {
  409.                             getConfig().set("shopkeeper3.world", w);
  410.                             getConfig().set("shopkeeper3.x", x);
  411.                             getConfig().set("shopkeeper3.y", y);
  412.                             getConfig().set("shopkeeper3.z", z);
  413.                             saveConfig();
  414.                                
  415.                             p.sendMessage("§9§lPillars " + dot + " §7Successfully set §7shopkeeper §5location3!");
  416.                        }
  417.                        if (args[0].equalsIgnoreCase("shopkeeper4")) {
  418.                             getConfig().set("shopkeeper4.world", w);
  419.                             getConfig().set("shopkeeper4.x", x);
  420.                             getConfig().set("shopkeeper4.y", y);
  421.                             getConfig().set("shopkeeper4.z", z);
  422.                             saveConfig();
  423.                                
  424.                             p.sendMessage("§9§lPillars " + dot + " §7Successfully set §7shopkeeper §5location4!");
  425.                        }
  426.                    }
  427.                }
  428.            }
  429.          
  430.            return false;
  431.        }
  432.    
  433.    
  434.    
  435.     /* THESE ARE THE
  436.     VARIABLES */
  437.     boolean gameRunning = false;
  438.     boolean gameStarting = false;
  439.    
  440.     int countDown = 16;
  441.    
  442.     String w;
  443.     double x;
  444.     double y;
  445.     double z;
  446.    
  447.     public HashMap<UUID, Scoreboard> boardMap = new HashMap<UUID, Scoreboard>();
  448.     private ScoreboardManager manager = Bukkit.getScoreboardManager();
  449.     public Scoreboard scoreboard = manager.getNewScoreboard();
  450.     public Objective objective;
  451.    
  452.     public Scoreboard teams = manager.getNewScoreboard();
  453.    
  454.     Team yellow = teams.registerNewTeam("yellow");
  455.     Team blue = teams.registerNewTeam("blue");
  456.     Team green = teams.registerNewTeam("green");
  457.     Team red = teams.registerNewTeam("red");
  458.    
  459.     public HashMap<Integer, String> queueTeamYellow = new HashMap<>();
  460.     public HashMap<Integer, String> queueTeamBlue = new HashMap<>();
  461.     public HashMap<Integer, String> queueTeamGreen = new HashMap<>();
  462.     public HashMap<Integer, String> queueTeamRed = new HashMap<>();
  463.    
  464.     HashMap<UUID, String> score15 = new HashMap<>();
  465.     HashMap<UUID, String> score14 = new HashMap<>();
  466.     HashMap<UUID, String> score13 = new HashMap<>();
  467.     HashMap<UUID, String> score12 = new HashMap<>();
  468.     HashMap<UUID, String> score11 = new HashMap<>();
  469.     HashMap<UUID, String> score10 = new HashMap<>();
  470.     HashMap<UUID, String> score9 = new HashMap<>();
  471.     HashMap<UUID, String> score8 = new HashMap<>();
  472.     HashMap<UUID, String> score7 = new HashMap<>();
  473.     HashMap<UUID, String> score6 = new HashMap<>();
  474.     HashMap<UUID, String> score5 = new HashMap<>();
  475.     HashMap<UUID, String> score4 = new HashMap<>();
  476.     HashMap<UUID, String> score3 = new HashMap<>();
  477.     HashMap<UUID, String> score2 = new HashMap<>();
  478.     HashMap<UUID, String> score1 = new HashMap<>();
  479.    
  480.    
  481.    
  482.    
  483.    
  484.     /* THIS IS THE
  485.     onPlayerJoin() method */
  486.     @SuppressWarnings("deprecation")
  487.     @EventHandler
  488.     public void onPlayerJoin(PlayerJoinEvent event) {
  489.         Player p = event.getPlayer();
  490.        
  491.         World wSpawn = Bukkit.getServer().getWorld(getConfig().getString("spawn.world"));
  492.         double xSpawn = getConfig().getDouble("spawn.x");
  493.         double ySpawn = getConfig().getDouble("spawn.y");
  494.         double zSpawn = getConfig().getDouble("spawn.z");
  495.        
  496.         p.teleport(new Location(wSpawn, xSpawn, ySpawn, zSpawn));
  497.        
  498.         if (yellow.getPlayers().size() == 0) {
  499.             yellow.addPlayer(p);
  500.         }
  501.         else if (yellow.getPlayers().size() == 1) {
  502.             if (blue.getPlayers().size() == 0) {
  503.                 blue.addPlayer(p);
  504.             }
  505.             else if (blue.getPlayers().size() == 1) {
  506.                 if (green.getPlayers().size() == 0) {
  507.                     green.addPlayer(p);
  508.                 }
  509.                 else if (green.getPlayers().size() == 1) {
  510.                     if (red.getPlayers().size() == 0) {
  511.                         red.addPlayer(p);
  512.                     }
  513.                     else if (red.getPlayers().size() == 1) {
  514.                         if (yellow.getPlayers().size() == 1) {
  515.                             yellow.addPlayer(p);
  516.                         }
  517.                         else if (yellow.getPlayers().size() == 2) {
  518.                             if (blue.getPlayers().size() == 1) {
  519.                                 blue.addPlayer(p);
  520.                             }
  521.                             else if (blue.getPlayers().size() == 2) {
  522.                                 if (green.getPlayers().size() == 1) {
  523.                                     green.addPlayer(p);
  524.                                 }
  525.                                 else if (green.getPlayers().size() == 2) {
  526.                                     if (red.getPlayers().size() == 1) {
  527.                                         red.addPlayer(p);
  528.                                     }
  529.                                     else if (red.getPlayers().size() == 2) {
  530.                                         if (yellow.getPlayers().size() == 2) {
  531.                                             yellow.addPlayer(p);
  532.                                         }
  533.                                         else if (yellow.getPlayers().size() == 3) {
  534.                                             if (blue.getPlayers().size() == 2) {
  535.                                                 blue.addPlayer(p);
  536.                                             }
  537.                                             else if (blue.getPlayers().size() == 3) {
  538.                                                 if (green.getPlayers().size() == 2) {
  539.                                                     green.addPlayer(p);
  540.                                                 }
  541.                                                 else if (green.getPlayers().size() == 3) {
  542.                                                     if (red.getPlayers().size() == 2) {
  543.                                                         red.addPlayer(p);
  544.                                                     }
  545.                                                     else if (red.getPlayers().size() == 3) {
  546.                                                         if (yellow.getPlayers().size() == 3) {
  547.                                                             yellow.addPlayer(p);
  548.                                                         }
  549.                                                         else if (yellow.getPlayers().size() == 4) {
  550.                                                             if (blue.getPlayers().size() == 3) {
  551.                                                                 blue.addPlayer(p);
  552.                                                             }
  553.                                                             else if (blue.getPlayers().size() == 4) {
  554.                                                                 if (green.getPlayers().size() == 3) {
  555.                                                                     green.addPlayer(p);
  556.                                                                 }
  557.                                                                 else if (green.getPlayers().size() == 4) {
  558.                                                                     if (red.getPlayers().size() == 3) {
  559.                                                                         red.addPlayer(p);
  560.                                                                     }
  561.                                                                     else if (red.getPlayers().size() == 4) {
  562.                                                                         p.kickPlayer("§4Server Seems To Be Full...");
  563.                                                                     }
  564.                                                                 }
  565.                                                             }
  566.                                                         }
  567.                                                     }
  568.                                                 }
  569.                                             }
  570.                                         }
  571.                                     }
  572.                                 }
  573.                             }
  574.                         }
  575.                     }
  576.                 }
  577.             }
  578.         }
  579.        
  580.         for (Player player : Bukkit.getServer().getOnlinePlayers()) {
  581.             if (player.getDisplayName() != p.getDisplayName()) {
  582.                 SetScoreBoard(player);
  583.             }
  584.         }
  585.        
  586.         new BukkitRunnable() {
  587.            
  588.             String queueWin = "null";
  589.            
  590.             @Override
  591.             public void run() {
  592.                 if (yellow.getPlayers().size() == 3) {
  593.                     queueWin = queueTeamYellow.get(1);
  594.                     SetScoreBoard(p);
  595.                     if (queueWin == p.getDisplayName()) {
  596.                         yellow.addPlayer(p);
  597.                        
  598.                     }
  599.                    
  600.                     queueTeamYellow.put(1, queueTeamYellow.get(2));
  601.                     queueTeamYellow.put(2, queueTeamYellow.get(3));
  602.                     queueTeamYellow.put(3, queueTeamYellow.get(4));
  603.                     queueTeamYellow.put(4, "null");
  604.                 }
  605.                 if (blue.getPlayers().size() == 3) {
  606.                     queueWin = queueTeamBlue.get(1);
  607.                     SetScoreBoard(p);
  608.                     if (queueWin == p.getDisplayName()) {
  609.                         blue.addPlayer(p);
  610.                        
  611.                     }
  612.                    
  613.                     queueTeamBlue.put(1, queueTeamBlue.get(2));
  614.                     queueTeamBlue.put(2, queueTeamBlue.get(3));
  615.                     queueTeamBlue.put(3, queueTeamBlue.get(4));
  616.                     queueTeamBlue.put(4, "null");
  617.                 }
  618.                 if (green.getPlayers().size() == 3) {
  619.                     queueWin = queueTeamGreen.get(1);
  620.                     SetScoreBoard(p);
  621.                     if (queueWin == p.getDisplayName()) {
  622.                         green.addPlayer(p);
  623.                        
  624.                     }
  625.                    
  626.                     queueTeamGreen.put(1, queueTeamGreen.get(2));
  627.                     queueTeamGreen.put(2, queueTeamGreen.get(3));
  628.                     queueTeamGreen.put(3, queueTeamGreen.get(4));
  629.                     queueTeamGreen.put(4, "null");
  630.                 }
  631.                 if (red.getPlayers().size() == 3) {
  632.                     queueWin = queueTeamRed.get(1);
  633.                     SetScoreBoard(p);
  634.                     if (queueWin == p.getDisplayName()) {
  635.                         red.addPlayer(p);
  636.                        
  637.                     }
  638.                    
  639.                     queueTeamRed.put(1, queueTeamRed.get(2));
  640.                     queueTeamRed.put(2, queueTeamRed.get(3));
  641.                     queueTeamRed.put(3, queueTeamRed.get(4));
  642.                     queueTeamRed.put(4, "null");
  643.                 }
  644.             }
  645.         }.runTaskTimer(this, 0, 20);
  646.        
  647.         SetScoreBoard(p);
  648.     }
  649.    
  650.    
  651.    
  652.    
  653.     public HashMap<UUID, Integer> kills = new HashMap<>();
  654.     public HashMap<UUID, Integer> beaconsdestroyed = new HashMap<>();
  655.     public HashMap<UUID, Integer> coins = new HashMap<>();
  656.    
  657.     public String upgradeNext;
  658.     public int upgradeTimer;
  659.    
  660.     public int yellowbcount = 4;
  661.     public int bluebcount = 4;
  662.     public int greenbcount = 4;
  663.     public int redbcount = 4;
  664.    
  665.     char dot = 8901;
  666.     char checkmark = 10004;
  667.     char nomark = 10060;
  668.    
  669.     /* THIS IS THE
  670.     updateScoreBoard() method */
  671.     @SuppressWarnings("deprecation")
  672.     public void updateScoreBoard(Player p) {
  673.         boardMap.put(p.getUniqueId(), scoreboard);
  674.        
  675.         scoreboard = boardMap.get(p.getUniqueId());
  676.        
  677.         if (score15.get(p.getUniqueId()) != null) {
  678.             scoreboard.resetScores(score15.get(p.getUniqueId()));
  679.             scoreboard.resetScores(score14.get(p.getUniqueId()));
  680.             scoreboard.resetScores(score13.get(p.getUniqueId()));
  681.             scoreboard.resetScores(score12.get(p.getUniqueId()));
  682.             scoreboard.resetScores(score11.get(p.getUniqueId()));
  683.             scoreboard.resetScores(score10.get(p.getUniqueId()));
  684.             scoreboard.resetScores(score9.get(p.getUniqueId()));
  685.             scoreboard.resetScores(score8.get(p.getUniqueId()));
  686.             scoreboard.resetScores(score7.get(p.getUniqueId()));
  687.             scoreboard.resetScores(score6.get(p.getUniqueId()));
  688.             scoreboard.resetScores(score5.get(p.getUniqueId()));
  689.             scoreboard.resetScores(score4.get(p.getUniqueId()));
  690.             scoreboard.resetScores(score3.get(p.getUniqueId()));
  691.             scoreboard.resetScores(score2.get(p.getUniqueId()));
  692.             scoreboard.resetScores(score1.get(p.getUniqueId()));
  693.         }
  694.        
  695.         if (gameRunning == false) {
  696.             int yellowSize = yellow.getPlayers().size();
  697.             int blueSize = blue.getPlayers().size();
  698.             int greenSize = green.getPlayers().size();
  699.             int redSize = red.getPlayers().size();
  700.            
  701.             score15.put(p.getUniqueId(), "§1 ");
  702.             if (gameStarting == true) {
  703.                 score14.put(p.getUniqueId(), "§6Starting: §f" + countDown);
  704.             }
  705.             else {
  706.                 score14.put(p.getUniqueId(), "§6Starting: §4Not Enough Players" );
  707.             }
  708.             score13.put(p.getUniqueId(), "§2 ");
  709.             score12.put(p.getUniqueId(), "§6Players: §f" + Bukkit.getServer().getOnlinePlayers().size() + "/16");
  710.             score11.put(p.getUniqueId(), "§3 ");
  711.             score10.put(p.getUniqueId(), "§6Teams:");
  712.             score9.put(p.getUniqueId(), "§eYellow: §f" + yellowSize + "/4");
  713.             score8.put(p.getUniqueId(), "§bBlue: §f" + blueSize + "/4");
  714.             score7.put(p.getUniqueId(), "§aGreen: §f" + greenSize + "/4");
  715.             score6.put(p.getUniqueId(), "§cRed: §f" + redSize + "/4");
  716.             score5.put(p.getUniqueId(), "§4 ");
  717.             score4.put(p.getUniqueId(), "§6Map: §fOG");
  718.             score3.put(p.getUniqueId(), "§6Server: §fpillars1");
  719.             score2.put(p.getUniqueId(), "§5 ");
  720.             score1.put(p.getUniqueId(), "§7www.intelyc.com");
  721.         }
  722.         if (gameRunning == true) {
  723.             score15.put(p.getUniqueId(), "§1 ");
  724.             score14.put(p.getUniqueId(), "§6Coins: §f" + coins.get(p.getUniqueId()));
  725.             score13.put(p.getUniqueId(), "§6Upgrade:");
  726.             score12.put(p.getUniqueId(), upgradeNext + upgradeTimer);
  727.             score11.put(p.getUniqueId(), "§3 ");
  728.             score10.put(p.getUniqueId(), "§6Beacons:");
  729.             if (yellowbcount == 4) {
  730.                 score9.put(p.getUniqueId(), "§eYellow: §2" + "§2" + checkmark + " " + "§2" + checkmark + " " + "§2" + checkmark + " " + "§2" + checkmark);
  731.             }
  732.             else {
  733.                 if (yellowbcount == 3) {
  734.                     score9.put(p.getUniqueId(), "§eYellow: §2" + "§2" + checkmark + " " + "§2" + checkmark + " " + "§2" + checkmark + " " + "§4" + nomark);
  735.                 }
  736.                 else {
  737.                     if (yellowbcount == 2) {
  738.                         score9.put(p.getUniqueId(), "§eYellow: §2" + "§2" + checkmark + " " + "§2" + checkmark + " " + "§4" + nomark + " " + "§4" + nomark);
  739.                     }
  740.                     else {
  741.                         if (yellowbcount == 1) {
  742.                             score9.put(p.getUniqueId(), "§eYellow: §2" + "§2" + checkmark + " " + "§4" + nomark + " " + "§4" + nomark + " " + "§4" + nomark);
  743.                         }
  744.                         else {
  745.                             score9.put(p.getUniqueId(), "§eYellow: §2" + "§4" + nomark + " " + "§4" + nomark + " " + "§4" + nomark + " " + "§4" + nomark);
  746.                         }
  747.                     }
  748.                    
  749.                 }
  750.                
  751.             }
  752.             if (bluebcount == 4) {
  753.                 score8.put(p.getUniqueId(), "§bBlue: §2" + "§2" + checkmark + " " + "§2" + checkmark + " " + "§2" + checkmark + " " + "§2" + checkmark);
  754.             }
  755.             else {
  756.                 if (bluebcount == 3) {
  757.                     score8.put(p.getUniqueId(), "§bBlue: §2" + "§2" + checkmark + " " + "§2" + checkmark + " " + "§2" + checkmark + " " + "§4" + nomark);
  758.                 }
  759.                 else {
  760.                     if (bluebcount == 2) {
  761.                         score8.put(p.getUniqueId(), "§bBlue: §2" + "§2" + checkmark + " " + "§2" + checkmark + " " + "§4" + nomark + " " + "§4" + nomark);
  762.                     }
  763.                     else {
  764.                         if (bluebcount == 1) {
  765.                             score8.put(p.getUniqueId(), "§bBlue: §2" + "§2" + checkmark + " " + "§4" + nomark + " " + "§4" + nomark + " " + "§4" + nomark);
  766.                         }
  767.                         else {
  768.                             score8.put(p.getUniqueId(), "§bBlue: §2" + "§4" + nomark + " " + "§4" + nomark + " " + "§4" + nomark + " " + "§4" + nomark);
  769.                         }
  770.                     }
  771.                    
  772.                 }
  773.                
  774.             }
  775.             if (greenbcount == 4) {
  776.                 score7.put(p.getUniqueId(), "§aGreen: §2" + "§2" + checkmark + " " + "§2" + checkmark + " " + "§2" + checkmark + " " + "§2" + checkmark);
  777.             }
  778.             else {
  779.                 if (greenbcount == 3) {
  780.                     score7.put(p.getUniqueId(), "§aGreen: §2" + "§2" + checkmark + " " + "§2" + checkmark + " " + "§2" + checkmark + " " + "§4" + nomark);
  781.                 }
  782.                 else {
  783.                     if (greenbcount == 2) {
  784.                         score7.put(p.getUniqueId(), "§aGreen: §2" + "§2" + checkmark + " " + "§2" + checkmark + " " + "§4" + nomark + " " + "§4" + nomark);
  785.                     }
  786.                     else {
  787.                         if (greenbcount == 1) {
  788.                             score7.put(p.getUniqueId(), "§aGreen: §2" + "§2" + checkmark + " " + "§4" + nomark + " " + "§4" + nomark + " " + "§4" + nomark);
  789.                         }
  790.                         else {
  791.                             score7.put(p.getUniqueId(), "§aGreen: §2" + "§4" + nomark + " " + "§4" + nomark + " " + "§4" + nomark + " " + "§4" + nomark);
  792.                         }
  793.                     }
  794.                    
  795.                 }
  796.                
  797.             }
  798.             if (redbcount == 4) {
  799.                 score6.put(p.getUniqueId(), "§cRed: §2" + "§2" + checkmark + " " + "§2" + checkmark + " " + "§2" + checkmark + " " + "§2" + checkmark);
  800.             }
  801.             else {
  802.                 if (redbcount == 3) {
  803.                     score6.put(p.getUniqueId(), "§cRed: §2" + "§2" + checkmark + " " + "§2" + checkmark + " " + "§2" + checkmark + " " + "§4" + nomark);
  804.                 }
  805.                 else {
  806.                     if (redbcount == 2) {
  807.                         score6.put(p.getUniqueId(), "§cRed: §2" + "§2" + checkmark + " " + "§2" + checkmark + " " + "§4" + nomark + " " + "§4" + nomark);
  808.                     }
  809.                     else {
  810.                         if (redbcount == 1) {
  811.                             score6.put(p.getUniqueId(), "§cRed: §2" + "§2" + checkmark + " " + "§4" + nomark + " " + "§4" + nomark + " " + "§4" + nomark);
  812.                         }
  813.                         else {
  814.                             score6.put(p.getUniqueId(), "§cRed: §2" + "§4" + nomark + " " + "§4" + nomark + " " + "§4" + nomark + " " + "§4" + nomark);
  815.                         }
  816.                     }
  817.                    
  818.                 }
  819.                
  820.             }
  821.             score5.put(p.getUniqueId(), "§4 ");
  822.             score4.put(p.getUniqueId(), "§6Kills: §f" + kills.get(p.getUniqueId()));
  823.             score3.put(p.getUniqueId(), "§6Beacons Destroyed: §f" + beaconsdestroyed.get(p.getUniqueId()));
  824.             score2.put(p.getUniqueId(), "§5 ");
  825.             score1.put(p.getUniqueId(), "§7www.intelyc.com");
  826.         }
  827.         if (objective == null) {
  828.             objective = scoreboard.registerNewObjective("pillars", "dummy");
  829.         }
  830.         objective.setDisplaySlot(DisplaySlot.SIDEBAR);
  831.         objective.setDisplayName("§f§lPILLARS");
  832.        
  833.         objective.getScore(score15.get(p.getUniqueId())).setScore(15);
  834.         objective.getScore(score14.get(p.getUniqueId())).setScore(14);
  835.         objective.getScore(score13.get(p.getUniqueId())).setScore(13);
  836.         objective.getScore(score12.get(p.getUniqueId())).setScore(12);
  837.         objective.getScore(score11.get(p.getUniqueId())).setScore(11);
  838.         objective.getScore(score10.get(p.getUniqueId())).setScore(10);
  839.         objective.getScore(score9.get(p.getUniqueId())).setScore(9);
  840.         objective.getScore(score8.get(p.getUniqueId())).setScore(8);
  841.         objective.getScore(score7.get(p.getUniqueId())).setScore(7);
  842.         objective.getScore(score6.get(p.getUniqueId())).setScore(6);
  843.         objective.getScore(score5.get(p.getUniqueId())).setScore(5);
  844.         objective.getScore(score4.get(p.getUniqueId())).setScore(4);
  845.         objective.getScore(score3.get(p.getUniqueId())).setScore(3);
  846.         objective.getScore(score2.get(p.getUniqueId())).setScore(2);
  847.         objective.getScore(score1.get(p.getUniqueId())).setScore(1);
  848.        
  849.         boardMap.put(p.getUniqueId(), scoreboard);
  850.        
  851.         p.setScoreboard(boardMap.get(p.getUniqueId()));
  852.     }
  853.    
  854.    
  855.    
  856.     public void countDowner() {
  857.         if (gameStarting == true) {
  858.             new BukkitRunnable() {
  859.                
  860.                 @SuppressWarnings("deprecation")
  861.                 public void run() {
  862.                     if (countDown >= 1 && gameStarting == true) {
  863.                         for (Player p : Bukkit.getServer().getOnlinePlayers()) {
  864.                             scoreboard.resetScores(score14.get(p.getUniqueId()));
  865.                         }
  866.                         countDown--;
  867.                         for (Player p : Bukkit.getServer().getOnlinePlayers()) {
  868.                             SetScoreBoard(p);
  869.                         }
  870.                     }
  871.                     else if (countDown == 0 && gameStarting == true) {
  872.                         for (Player p : Bukkit.getServer().getOnlinePlayers()) {
  873.                             scoreboard.resetScores(score14.get(p.getUniqueId()));
  874.                            
  875.                             if (yellow.getPlayers().contains(p)) {
  876.                                 World wyellowspawn = Bukkit.getServer().getWorld(getConfig().getString("yellowspawn.world"));
  877.                                   double xyellowspawn = getConfig().getDouble("yellowspawn.x");
  878.                                   double yyellowspawn = getConfig().getDouble("yellowspawn.y");
  879.                                   double zyellowspawn = getConfig().getDouble("yellowspawn.z");
  880.                                  
  881.                                   p.teleport(new Location(wyellowspawn, xyellowspawn, yyellowspawn, zyellowspawn));
  882.                             }
  883.                             if (blue.getPlayers().contains(p)) {
  884.                                 World wbluespawn = Bukkit.getServer().getWorld(getConfig().getString("bluespawn.world"));
  885.                                   double xbluespawn = getConfig().getDouble("bluespawn.x");
  886.                                   double ybluespawn = getConfig().getDouble("bluespawn.y");
  887.                                   double zbluespawn = getConfig().getDouble("bluespawn.z");
  888.                                  
  889.                                   p.teleport(new Location(wbluespawn, xbluespawn, ybluespawn, zbluespawn));
  890.                             }
  891.                             if (green.getPlayers().contains(p)) {
  892.                                 World wgreenspawn = Bukkit.getServer().getWorld(getConfig().getString("greenspawn.world"));
  893.                                   double xgreenspawn = getConfig().getDouble("greenspawn.x");
  894.                                   double ygreenspawn = getConfig().getDouble("greenspawn.y");
  895.                                   double zgreenspawn = getConfig().getDouble("greenspawn.z");
  896.                                  
  897.                                   p.teleport(new Location(wgreenspawn, xgreenspawn, ygreenspawn, zgreenspawn));
  898.                             }
  899.                             if (red.getPlayers().contains(p)) {
  900.                                 World wredspawn = Bukkit.getServer().getWorld(getConfig().getString("redspawn.world"));
  901.                                   double xredspawn = getConfig().getDouble("redspawn.x");
  902.                                   double yredspawn = getConfig().getDouble("redspawn.y");
  903.                                   double zredspawn = getConfig().getDouble("redspawn.z");
  904.                                  
  905.                                   p.teleport(new Location(wredspawn, xredspawn, yredspawn, zredspawn));
  906.                             }
  907.                         }
  908.                        
  909.                        
  910.                        
  911.                         gameStarting = false;
  912.                         gameRunning = true;
  913.                         countDown = 16;
  914.                         for (Player p : Bukkit.getServer().getOnlinePlayers()) {
  915.                             coins.put(p.getUniqueId(), 10);
  916.                             kills.put(p.getUniqueId(), 0);
  917.                             beaconsdestroyed.put(p.getUniqueId(), 0);
  918.                            
  919.                             SetScoreBoard(p);
  920.                         }
  921.                        
  922.                         cancel();
  923.                     }
  924.                     else {
  925.                         cancel();
  926.                     }
  927.                 }
  928.             }.runTaskTimer(this, 0, 20);
  929.         }
  930.     }
  931.    
  932.    
  933.    
  934.     /* THIS THE
  935.     resetScoreBoard(p) method*/
  936.     public void SetScoreBoard(Player p) {
  937.         updateScoreBoard(p);
  938.     }
  939.    
  940.    
  941.    
  942.    
  943.    
  944.    
  945.     // WHEN PLAYER USE ITEM
  946.     @SuppressWarnings("deprecation")
  947.     @EventHandler
  948.     public void onPlayerUse(PlayerInteractEvent event){
  949.         Player p = event.getPlayer();
  950.        
  951.         if (gameRunning == false) {
  952.                 if(p.getItemInHand().getType() == Material.GOLD_INGOT){
  953.                    
  954.                     if(yellow.getPlayers().size() <= 3) {
  955.                         yellow.addPlayer(p);
  956.                         blue.removePlayer(p);
  957.                         green.removePlayer(p);
  958.                         red.removePlayer(p);
  959.                     }
  960.                     else {
  961.                         if (queueTeamYellow.get(1).equals("null")) {
  962.                             queueTeamYellow.put(1, p.getDisplayName());
  963.                             p.sendMessage("§e§lYellow §fTeam is currently full! You we're put in queue 1/1.");
  964.                         }
  965.                         else if (!queueTeamYellow.get(1).equals("null")) {
  966.                             if (queueTeamYellow.get(2).equals("null")) {
  967.                                 queueTeamYellow.put(2, p.getDisplayName());
  968.                                 p.sendMessage("§e§lYellow §fTeam is currently full! You we're put in queue 2/2.");
  969.                             }
  970.                             else if (!queueTeamYellow.get(2).equals("null")) {
  971.                                 if (queueTeamYellow.get(3).equals("null")) {
  972.                                     queueTeamYellow.put(3, p.getDisplayName());
  973.                                     p.sendMessage("§e§lYellow §fTeam is currently full! You we're put in queue 3/3.");
  974.                                 }
  975.                                 else if (!queueTeamYellow.get(3).equals("null")) {
  976.                                     if (queueTeamYellow.get(4).equals("null")) {
  977.                                         queueTeamYellow.put(4, p.getDisplayName());
  978.                                         p.sendMessage("§e§lYellow §fTeam is currently full! You we're put in queue 4/4.");
  979.                                     }
  980.                                     else if (!queueTeamYellow.get(4).equals("null")) {
  981.                                         p.sendMessage("§e§lYellow §fTeam is currently full! Queue is currently full! ._.");
  982.                                     }
  983.                                 }
  984.                             }
  985.                         }
  986.                     }
  987.                     for (Player player : Bukkit.getServer().getOnlinePlayers()) {
  988.                         if (player.getDisplayName() != p.getDisplayName()) {
  989.                             SetScoreBoard(player);
  990.                         }
  991.                     }
  992.                     SetScoreBoard(p);
  993.                 }
  994.                 else if(p.getItemInHand().getType() == Material.DIAMOND){
  995.                     if(blue.getPlayers().size() <= 3) {
  996.                         yellow.removePlayer(p);
  997.                         blue.addPlayer(p);
  998.                         green.removePlayer(p);
  999.                         red.removePlayer(p);
  1000.                     }
  1001.                     else {
  1002.                         if (queueTeamBlue.get(1).equals("null")) {
  1003.                             queueTeamBlue.put(1, p.getDisplayName());
  1004.                             p.sendMessage("§b§lBlue §fTeam is currently full! You we're put in queue 1/1.");
  1005.                         }
  1006.                         else if (!queueTeamBlue.get(1).equals("null")) {
  1007.                             if (queueTeamBlue.get(2).equals("null")) {
  1008.                                 queueTeamBlue.put(2, p.getDisplayName());
  1009.                                 p.sendMessage("§b§lBlue §fTeam is currently full! You we're put in queue 2/2.");
  1010.                             }
  1011.                             else if (!queueTeamBlue.get(2).equals("null")) {
  1012.                                 if (queueTeamBlue.get(3).equals("null")) {
  1013.                                     queueTeamBlue.put(3, p.getDisplayName());
  1014.                                     p.sendMessage("§b§lBlue §fTeam is currently full! You we're put in queue 3/3.");
  1015.                                 }
  1016.                                 else if (!queueTeamBlue.get(3).equals("null")) {
  1017.                                     if (queueTeamBlue.get(4).equals("null")) {
  1018.                                         queueTeamBlue.put(4, p.getDisplayName());
  1019.                                         p.sendMessage("§b§lBlue §fTeam is currently full! You we're put in queue 4/4.");
  1020.                                     }
  1021.                                     else if (!queueTeamBlue.get(4).equals("null")) {
  1022.                                         p.sendMessage("§b§lBlue §fTeam is currently full! Queue is currently full! ._.");
  1023.                                     }
  1024.                                 }
  1025.                             }
  1026.                         }  
  1027.                     }
  1028.                     for (Player player : Bukkit.getServer().getOnlinePlayers()) {
  1029.                         if (player.getDisplayName() != p.getDisplayName()) {
  1030.                             SetScoreBoard(player);
  1031.                         }
  1032.                     }
  1033.                     SetScoreBoard(p);
  1034.                 }
  1035.                 else if(p.getItemInHand().getType() == Material.EMERALD){
  1036.                     if(green.getPlayers().size() <= 3) {
  1037.                         yellow.removePlayer(p);
  1038.                         blue.removePlayer(p);
  1039.                         green.addPlayer(p);
  1040.                         red.removePlayer(p);
  1041.                     }
  1042.                     else {
  1043.                         if (queueTeamGreen.get(1).equals("null")) {
  1044.                             queueTeamGreen.put(1, p.getDisplayName());
  1045.                             p.sendMessage("§a§lGreen §fTeam is currently full! You we're put in queue 1/1.");
  1046.                         }
  1047.                         else if (!queueTeamGreen.get(1).equals("null")) {
  1048.                             if (queueTeamGreen.get(2).equals("null")) {
  1049.                                 queueTeamGreen.put(2, p.getDisplayName());
  1050.                                 p.sendMessage("§a§lGreen §fTeam is currently full! You we're put in queue 2/2.");
  1051.                             }
  1052.                             else if (!queueTeamGreen.get(2).equals("null")) {
  1053.                                 if (queueTeamGreen.get(3).equals("null")) {
  1054.                                     queueTeamGreen.put(3, p.getDisplayName());
  1055.                                     p.sendMessage("§a§lGreen §fTeam is currently full! You we're put in queue 3/3.");
  1056.                                 }
  1057.                                 else if (!queueTeamGreen.get(3).equals("null")) {
  1058.                                     if (queueTeamGreen.get(4).equals("null")) {
  1059.                                         queueTeamGreen.put(4, p.getDisplayName());
  1060.                                         p.sendMessage("§a§lGreen §fTeam is currently full! You we're put in queue 4/4.");
  1061.                                     }
  1062.                                     else if (!queueTeamGreen.get(4).equals("null")) {
  1063.                                         p.sendMessage("§a§lGreen §fTeam is currently full! Queue is currently full! ._.");
  1064.                                     }
  1065.                                 }
  1066.                             }
  1067.                         }
  1068.                     }
  1069.                     for (Player player : Bukkit.getServer().getOnlinePlayers()) {
  1070.                         if (player.getDisplayName() != p.getDisplayName()) {
  1071.                             SetScoreBoard(player);
  1072.                         }
  1073.                     }
  1074.                     SetScoreBoard(p);
  1075.                 }
  1076.                 else if(p.getItemInHand().getType() == Material.REDSTONE){
  1077.                     if(red.getPlayers().size() <= 3) {
  1078.                         yellow.removePlayer(p);
  1079.                         blue.removePlayer(p);
  1080.                         green.removePlayer(p);
  1081.                         red.addPlayer(p);
  1082.                     }
  1083.                     else {
  1084.                         if (queueTeamRed.get(1).equals("null")) {
  1085.                             queueTeamRed.put(1, p.getDisplayName());
  1086.                             p.sendMessage("§c§lRed §fTeam is currently full! You we're put in queue 1/1.");
  1087.                         }
  1088.                         else if (!queueTeamRed.get(1).equals("null")) {
  1089.                             if (queueTeamRed.get(2).equals("null")) {
  1090.                                 queueTeamRed.put(2, p.getDisplayName());
  1091.                                 p.sendMessage("§c§lRed §fTeam is currently full! You we're put in queue 2/2.");
  1092.                             }
  1093.                             else if (!queueTeamRed.get(2).equals("null")) {
  1094.                                 if (queueTeamRed.get(3).equals("null")) {
  1095.                                     queueTeamRed.put(3, p.getDisplayName());
  1096.                                     p.sendMessage("§c§lRed §fTeam is currently full! You we're put in queue 3/3.");
  1097.                                 }
  1098.                                 else if (!queueTeamRed.get(3).equals("null")) {
  1099.                                     if (queueTeamRed.get(4).equals("null")) {
  1100.                                         queueTeamRed.put(4, p.getDisplayName());
  1101.                                         p.sendMessage("§c§lRed §fTeam is currently full! You we're put in queue 4/4.");
  1102.                                     }
  1103.                                     else if (!queueTeamRed.get(4).equals("null")) {
  1104.                                         p.sendMessage("§c§lRed §fTeam is currently full! Queue is currently full! ._.");
  1105.                                     }
  1106.                                 }
  1107.                             }
  1108.                         }
  1109.                     }
  1110.                     for (Player player : Bukkit.getServer().getOnlinePlayers()) {
  1111.                         if (player.getDisplayName() != p.getDisplayName()) {
  1112.                             SetScoreBoard(player);
  1113.                         }
  1114.                     }
  1115.                     SetScoreBoard(p);
  1116.                 }
  1117.         }
  1118.     }
  1119.    
  1120.    
  1121.    
  1122.    
  1123.  // WHEN PLAYER DIES
  1124.     @SuppressWarnings("deprecation")
  1125.     @EventHandler
  1126.     public void onPlayerDeath(PlayerDeathEvent event) {
  1127.         Player p = event.getEntity().getPlayer();
  1128.         Player killer = event.getEntity().getKiller();
  1129.        
  1130.         if (killer instanceof Player) {
  1131.             if (p instanceof Player) {
  1132.                
  1133.                 int value = kills.get(killer.getUniqueId());
  1134.                 kills.put(killer.getUniqueId(), value + 1);
  1135.                
  1136.                 SetScoreBoard(killer);
  1137.             }
  1138.         }
  1139.        
  1140.         p.spigot().respawn();
  1141.        
  1142.         if (yellow.getPlayers().contains(p)) {
  1143.             World wyellowspawn = Bukkit.getServer().getWorld(getConfig().getString("yellowspawn.world"));
  1144.               double xyellowspawn = getConfig().getDouble("yellowspawn.x");
  1145.               double yyellowspawn = getConfig().getDouble("yellowspawn.y");
  1146.               double zyellowspawn = getConfig().getDouble("yellowspawn.z");
  1147.              
  1148.               p.teleport(new Location(wyellowspawn, xyellowspawn, yyellowspawn, zyellowspawn));
  1149.         }
  1150.         if (blue.getPlayers().contains(p)) {
  1151.             World wbluespawn = Bukkit.getServer().getWorld(getConfig().getString("bluespawn.world"));
  1152.               double xbluespawn = getConfig().getDouble("bluespawn.x");
  1153.               double ybluespawn = getConfig().getDouble("bluespawn.y");
  1154.               double zbluespawn = getConfig().getDouble("bluespawn.z");
  1155.              
  1156.               p.teleport(new Location(wbluespawn, xbluespawn, ybluespawn, zbluespawn));
  1157.         }
  1158.         if (green.getPlayers().contains(p)) {
  1159.             World wgreenspawn = Bukkit.getServer().getWorld(getConfig().getString("greenspawn.world"));
  1160.               double xgreenspawn = getConfig().getDouble("greenspawn.x");
  1161.               double ygreenspawn = getConfig().getDouble("greenspawn.y");
  1162.               double zgreenspawn = getConfig().getDouble("greenspawn.z");
  1163.              
  1164.               p.teleport(new Location(wgreenspawn, xgreenspawn, ygreenspawn, zgreenspawn));
  1165.         }
  1166.         if (red.getPlayers().contains(p)) {
  1167.             World wredspawn = Bukkit.getServer().getWorld(getConfig().getString("redspawn.world"));
  1168.               double xredspawn = getConfig().getDouble("redspawn.x");
  1169.               double yredspawn = getConfig().getDouble("redspawn.y");
  1170.               double zredspawn = getConfig().getDouble("redspawn.z");
  1171.              
  1172.               p.teleport(new Location(wredspawn, xredspawn, yredspawn, zredspawn));
  1173.         }
  1174.     }
  1175.    
  1176.    
  1177.    
  1178.     public HashMap<Integer, Block> beaconStore = new HashMap<>();
  1179.  // WHEN PLAYER BREAKS BLOCK
  1180.     @EventHandler
  1181.     public void onBreak(BlockBreakEvent event){
  1182.         Player p = event.getPlayer();
  1183.         Block block = event.getBlock();
  1184.        
  1185.         if (p.getItemInHand().getType() == Material.WOOD_HOE) {
  1186.             event.setCancelled(true);
  1187.            
  1188.             w = block.getLocation().getWorld().getName();
  1189.             x = block.getLocation().getX() + 0.500;
  1190.             y = block.getLocation().getY();
  1191.             z = block.getLocation().getZ() + 0.500;
  1192.            
  1193.             p.sendMessage("§6Saved coordinates for block. (World:" + w + " x:" + x + "," + " y:" + y + "," + " z:" + z + ")");
  1194.  
  1195.         }
  1196.        
  1197.         if (gameRunning == true) {
  1198.             boolean okBreak = false;
  1199.             for(Integer integer : BlockReset.keySet()){
  1200.                   Block bl = BlockReset.get(integer);
  1201.                  
  1202.                   if (bl.equals(block)) {
  1203.                       okBreak = true;
  1204.                   }
  1205.                   else {
  1206.                      
  1207.                   }
  1208.             }
  1209.            
  1210.             Location blockLocation = block.getLocation();
  1211.            
  1212.             if (block.getType() == Material.BEACON) {
  1213.                 okBreak = true;
  1214.                
  1215.                 p.sendMessage(" " + blockLocation);
  1216.                
  1217.                 World world = block.getWorld();
  1218.                
  1219.                
  1220.                
  1221.                 double xyellowBeacon1 = getConfig().getDouble("yellowbeacon1.x");
  1222.                 double yyellowBeacon1 = getConfig().getDouble("yellowbeacon1.y");
  1223.                 double zyellowBeacon1 = getConfig().getDouble("yellowbeacon1.z");
  1224.                 Location yellowBeacon1Location = new Location(world, xyellowBeacon1, yyellowBeacon1, zyellowBeacon1);
  1225.                
  1226.                
  1227.                 double xyellowBeacon2 = getConfig().getDouble("yellowbeacon2.x");
  1228.                 double yyellowBeacon2 = getConfig().getDouble("yellowbeacon2.y");
  1229.                 double zyellowBeacon2 = getConfig().getDouble("yellowbeacon2.z");
  1230.                 Location yellowBeacon2Location = new Location(world, xyellowBeacon2, yyellowBeacon2, zyellowBeacon2);
  1231.                
  1232.                 double xyellowBeacon3 = getConfig().getDouble("yellowbeacon3.x");
  1233.                 double yyellowBeacon3 = getConfig().getDouble("yellowbeacon3.y");
  1234.                 double zyellowBeacon3 = getConfig().getDouble("yellowbeacon3.z");
  1235.                 Location yellowBeacon3Location = new Location(world, xyellowBeacon3, yyellowBeacon3, zyellowBeacon3);
  1236.                
  1237.                 double xyellowBeacon4 = getConfig().getDouble("yellowbeacon4.x");
  1238.                 double yyellowBeacon4 = getConfig().getDouble("yellowbeacon4.y");
  1239.                 double zyellowBeacon4 = getConfig().getDouble("yellowbeacon4.z");
  1240.                 Location yellowBeacon4Location = new Location(world, xyellowBeacon4, yyellowBeacon4, zyellowBeacon4);
  1241.                
  1242.                 if (blockLocation == yellowBeacon1Location) {
  1243.                     yellowbcount--;
  1244.                 }
  1245.                 if (blockLocation == yellowBeacon2Location) {
  1246.                     yellowbcount--;
  1247.                 }
  1248.                 if (blockLocation == yellowBeacon3Location) {
  1249.                     yellowbcount--;
  1250.                 }
  1251.                 if (blockLocation == yellowBeacon4Location) {
  1252.                     yellowbcount--;
  1253.                 }
  1254.                
  1255.                
  1256.                
  1257.                 double xblueBeacon1 = getConfig().getDouble("bluebeacon1.x");
  1258.                 double yblueBeacon1 = getConfig().getDouble("bluebeacon1.y");
  1259.                 double zblueBeacon1 = getConfig().getDouble("bluebeacon1.z");
  1260.                 Location blueBeacon1Location = new Location(world, xblueBeacon1, yblueBeacon1, zblueBeacon1);
  1261.                
  1262.                 double xblueBeacon2 = getConfig().getDouble("bluebeacon2.x");
  1263.                 double yblueBeacon2 = getConfig().getDouble("bluebeacon2.y");
  1264.                 double zblueBeacon2 = getConfig().getDouble("bluebeacon2.z");
  1265.                 Location blueBeacon2Location = new Location(world, xblueBeacon2, yblueBeacon2, zblueBeacon2);
  1266.                
  1267.                 double xblueBeacon3 = getConfig().getDouble("bluebeacon3.x");
  1268.                 double yblueBeacon3 = getConfig().getDouble("bluebeacon3.y");
  1269.                 double zblueBeacon3 = getConfig().getDouble("bluebeacon3.z");
  1270.                 Location blueBeacon3Location = new Location(world, xblueBeacon3, yblueBeacon3, zblueBeacon3);
  1271.                
  1272.                 double xblueBeacon4 = getConfig().getDouble("bluebeacon4.x");
  1273.                 double yblueBeacon4 = getConfig().getDouble("bluebeacon4.y");
  1274.                 double zblueBeacon4 = getConfig().getDouble("bluebeacon4.z");
  1275.                 Location blueBeacon4Location = new Location(world, xblueBeacon4, yblueBeacon4, zblueBeacon4);
  1276.                
  1277.                 if (blockLocation == blueBeacon1Location) {
  1278.                     bluebcount--;
  1279.                 }
  1280.                 if (blockLocation == blueBeacon2Location) {
  1281.                     bluebcount--;
  1282.                 }
  1283.                 if (blockLocation == blueBeacon3Location) {
  1284.                     bluebcount--;
  1285.                 }
  1286.                 if (blockLocation == blueBeacon4Location) {
  1287.                     bluebcount--;
  1288.                 }
  1289.                
  1290.                
  1291.                
  1292.                 double xgreenBeacon1 = getConfig().getDouble("greenbeacon1.x");
  1293.                 double ygreenBeacon1 = getConfig().getDouble("greenbeacon1.y");
  1294.                 double zgreenBeacon1 = getConfig().getDouble("greenbeacon1.z");
  1295.                 Location greenBeacon1Location = new Location(world, xgreenBeacon1, ygreenBeacon1, zgreenBeacon1);
  1296.                
  1297.                 double xgreenBeacon2 = getConfig().getDouble("greenbeacon2.x");
  1298.                 double ygreenBeacon2 = getConfig().getDouble("greenbeacon2.y");
  1299.                 double zgreenBeacon2 = getConfig().getDouble("greenbeacon2.z");
  1300.                 Location greenBeacon2Location = new Location(world, xgreenBeacon2, ygreenBeacon2, zgreenBeacon2);
  1301.                
  1302.                 double xgreenBeacon3 = getConfig().getDouble("greenbeacon3.x");
  1303.                 double ygreenBeacon3 = getConfig().getDouble("greenbeacon3.y");
  1304.                 double zgreenBeacon3 = getConfig().getDouble("greenbeacon3.z");
  1305.                 Location greenBeacon3Location = new Location(world, xgreenBeacon3, ygreenBeacon3, zgreenBeacon3);
  1306.                
  1307.                 double xgreenBeacon4 = getConfig().getDouble("greenbeacon4.x");
  1308.                 double ygreenBeacon4 = getConfig().getDouble("greenbeacon4.y");
  1309.                 double zgreenBeacon4 = getConfig().getDouble("greenbeacon4.z");
  1310.                 Location greenBeacon4Location = new Location(world, xgreenBeacon4, ygreenBeacon4, zgreenBeacon4);
  1311.                
  1312.                 if (blockLocation == greenBeacon1Location) {
  1313.                     greenbcount--;
  1314.                 }
  1315.                 if (blockLocation == greenBeacon2Location) {
  1316.                     greenbcount--;
  1317.                 }
  1318.                 if (blockLocation == greenBeacon3Location) {
  1319.                     greenbcount--;
  1320.                 }
  1321.                 if (blockLocation == greenBeacon4Location) {
  1322.                     greenbcount--;
  1323.                 }
  1324.                
  1325.                
  1326.                
  1327.                 double xredBeacon1 = getConfig().getDouble("redbeacon1.x");
  1328.                 double yredBeacon1 = getConfig().getDouble("redbeacon1.y");
  1329.                 double zredBeacon1 = getConfig().getDouble("redbeacon1.z");
  1330.                 Location redBeacon1Location = new Location(world, xredBeacon1, yredBeacon1, zredBeacon1);
  1331.                 p.sendMessage(" " + redBeacon1Location);
  1332.                
  1333.                 double xredBeacon2 = getConfig().getDouble("redbeacon2.x");
  1334.                 double yredBeacon2 = getConfig().getDouble("redbeacon2.y");
  1335.                 double zredBeacon2 = getConfig().getDouble("redbeacon2.z");
  1336.                 Location redBeacon2Location = new Location(world, xredBeacon2, yredBeacon2, zredBeacon2);
  1337.                
  1338.                 double xredBeacon3 = getConfig().getDouble("redbeacon3.x");
  1339.                 double yredBeacon3 = getConfig().getDouble("redbeacon3.y");
  1340.                 double zredBeacon3 = getConfig().getDouble("redbeacon3.z");
  1341.                 Location redBeacon3Location = new Location(world, xredBeacon3, yredBeacon3, zredBeacon3);
  1342.                
  1343.                 double xredBeacon4 = getConfig().getDouble("redbeacon4.x");
  1344.                 double yredBeacon4 = getConfig().getDouble("redbeacon4.y");
  1345.                 double zredBeacon4 = getConfig().getDouble("redbeacon4.z");
  1346.                 Location redBeacon4Location = new Location(world, xredBeacon4, yredBeacon4, zredBeacon4);
  1347.                
  1348.                 if (blockLocation == redBeacon1Location) {
  1349.                     redbcount--;
  1350.                     p.sendMessage("Okay!");
  1351.                 }
  1352.                 if (blockLocation == redBeacon2Location) {
  1353.                     redbcount--;
  1354.                 }
  1355.                 if (blockLocation == redBeacon3Location) {
  1356.                     redbcount--;
  1357.                 }
  1358.                 if (blockLocation == redBeacon4Location) {
  1359.                     redbcount--;
  1360.                 }
  1361.             }
  1362.            
  1363.             if (okBreak == true) {
  1364.                 event.setCancelled(false);
  1365.             }
  1366.             else {
  1367.                 event.setCancelled(true);
  1368.                 p.sendMessage("§9§lPillars " + dot + " §7You can only break blocks placed by a player!");
  1369.             }
  1370.         }
  1371.     }
  1372.    
  1373.    
  1374.    
  1375.     public int BlocksPlaced = 0;
  1376.     public HashMap<Integer, Block> BlockReset = new HashMap<>();
  1377.     // WHEN PLACED BLOCK
  1378.     @EventHandler
  1379.     public void onPlace(BlockPlaceEvent event) {
  1380.         Block block = event.getBlock();
  1381.        
  1382.         BlocksPlaced++;
  1383.        
  1384.         if (gameRunning == true) {
  1385.             BlockReset.put(BlocksPlaced, block);
  1386.         }
  1387.     }
  1388.    
  1389.    
  1390.    
  1391.    
  1392.     // WHEN GAME IS FINISHED
  1393.     public void gameFinished() {
  1394.  
  1395.         for(Integer integer : BlockReset.keySet()){
  1396.               Block bl = BlockReset.get(integer);
  1397.              
  1398.               bl.setType(Material.AIR);
  1399.         }
  1400.        
  1401.         Bukkit.getServer().reload();
  1402.     }
  1403.    
  1404.    
  1405.    
  1406.     // WHEN PLAYER LEAVES
  1407.     @SuppressWarnings("deprecation")
  1408.     @EventHandler
  1409.     public void onPlayerLeave(PlayerQuitEvent event) {
  1410.         Player p = event.getPlayer();
  1411.        
  1412.         yellow.removePlayer(p);
  1413.         blue.removePlayer(p);
  1414.         green.removePlayer(p);
  1415.         red.removePlayer(p);
  1416.        
  1417.         if (queueTeamYellow.get(1) == p.getDisplayName()) {
  1418.             queueTeamYellow.put(1, queueTeamYellow.get(2));
  1419.             queueTeamYellow.put(2, queueTeamYellow.get(3));
  1420.             queueTeamYellow.put(3, queueTeamYellow.get(4));
  1421.         }
  1422.         if (queueTeamYellow.get(2) == p.getDisplayName()) {
  1423.             queueTeamYellow.put(2, queueTeamYellow.get(3));
  1424.             queueTeamYellow.put(3, queueTeamYellow.get(4));
  1425.         }
  1426.         if (queueTeamYellow.get(3) == p.getDisplayName()) {
  1427.             queueTeamYellow.put(3, queueTeamYellow.get(4));
  1428.         }
  1429.         if (queueTeamYellow.get(4) == p.getDisplayName()) {
  1430.             queueTeamYellow.put(4, "null");
  1431.         }
  1432.        
  1433.         if (queueTeamBlue.get(1) == p.getDisplayName()) {
  1434.             queueTeamBlue.put(1, queueTeamBlue.get(2));
  1435.             queueTeamBlue.put(2, queueTeamBlue.get(3));
  1436.             queueTeamBlue.put(3, queueTeamBlue.get(4));
  1437.         }
  1438.         if (queueTeamBlue.get(2) == p.getDisplayName()) {
  1439.             queueTeamBlue.put(2, queueTeamBlue.get(3));
  1440.             queueTeamBlue.put(3, queueTeamBlue.get(4));
  1441.         }
  1442.         if (queueTeamBlue.get(3) == p.getDisplayName()) {
  1443.             queueTeamBlue.put(3, queueTeamBlue.get(4));
  1444.         }
  1445.         if (queueTeamBlue.get(4) == p.getDisplayName()) {
  1446.             queueTeamBlue.put(4, "null");
  1447.         }
  1448.        
  1449.         if (queueTeamGreen.get(1) == p.getDisplayName()) {
  1450.             queueTeamGreen.put(1, queueTeamGreen.get(2));
  1451.             queueTeamGreen.put(2, queueTeamGreen.get(3));
  1452.             queueTeamGreen.put(3, queueTeamGreen.get(4));
  1453.         }
  1454.         if (queueTeamGreen.get(2) == p.getDisplayName()) {
  1455.             queueTeamGreen.put(2, queueTeamGreen.get(3));
  1456.             queueTeamGreen.put(3, queueTeamGreen.get(4));
  1457.         }
  1458.         if (queueTeamGreen.get(3) == p.getDisplayName()) {
  1459.             queueTeamGreen.put(3, queueTeamGreen.get(4));
  1460.         }
  1461.         if (queueTeamGreen.get(4) == p.getDisplayName()) {
  1462.             queueTeamGreen.put(4, "null");
  1463.         }
  1464.        
  1465.         if (queueTeamRed.get(1) == p.getDisplayName()) {
  1466.             queueTeamRed.put(1, queueTeamRed.get(2));
  1467.             queueTeamRed.put(2, queueTeamRed.get(3));
  1468.             queueTeamRed.put(3, queueTeamRed.get(4));
  1469.         }
  1470.         if (queueTeamRed.get(2) == p.getDisplayName()) {
  1471.             queueTeamRed.put(2, queueTeamRed.get(3));
  1472.             queueTeamRed.put(3, queueTeamRed.get(4));
  1473.         }
  1474.         if (queueTeamRed.get(3) == p.getDisplayName()) {
  1475.             queueTeamRed.put(3, queueTeamRed.get(4));
  1476.         }
  1477.         if (queueTeamRed.get(4) == p.getDisplayName()) {
  1478.             queueTeamRed.put(4, "null");
  1479.         }
  1480.        
  1481.         for (Player player : Bukkit.getServer().getOnlinePlayers()) {
  1482.             SetScoreBoard(player);
  1483.         }
  1484.     }
  1485. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement