idk some "cool" stuff
This commit is contained in:
29
src/main/java/hdvtdev/blockAndSeek/BlockAndSeekGame.java
Normal file
29
src/main/java/hdvtdev/blockAndSeek/BlockAndSeekGame.java
Normal file
@@ -0,0 +1,29 @@
|
||||
package hdvtdev.blockAndSeek;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
public class BlockAndSeekGame {
|
||||
|
||||
private final Set<Player> players = Collections.synchronizedSet(new HashSet<>());
|
||||
|
||||
public BlockAndSeekGame(String name, List<String> players) {
|
||||
for (String player : players) {
|
||||
this.addPlayer(player);
|
||||
}
|
||||
}
|
||||
|
||||
public void addPlayer(String name) {
|
||||
Player p = Bukkit.getPlayerExact(name);
|
||||
if (p != null) players.add(p);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user