Search in sources :

Example 1 with Region

use of com.gmail.stefvanschiedev.buildinggame.utils.region.Region in project buildinggame by stefvanschie.

the class EntityTimer method run.

/**
 * Checks to see if the entities are still in the correct plot and teleports them back if that's not the case
 *
 * @since 4.0.0
 */
@Override
public void run() {
    ArenaManager.getInstance().getArenas().stream().flatMap(arena -> arena.getPlots().stream()).forEach(plot -> {
        Region boundary = plot.getBoundary();
        if (boundary == null)
            return;
        plot.getEntities().keySet().forEach(entity -> {
            var location = entity.getLocation();
            if (!boundary.isInside(location))
                entity.teleport(plot.getEntities().get(entity));
            else
                plot.getEntities().put(entity, location);
        });
    });
}
Also used : Region(com.gmail.stefvanschiedev.buildinggame.utils.region.Region) BukkitRunnable(org.bukkit.scheduler.BukkitRunnable) ArenaManager(com.gmail.stefvanschiedev.buildinggame.managers.arenas.ArenaManager) Region(com.gmail.stefvanschiedev.buildinggame.utils.region.Region)

Example 2 with Region

use of com.gmail.stefvanschiedev.buildinggame.utils.region.Region in project buildinggame by stefvanschie.

the class Move method onPlayerMove.

/**
 * Handles player movement in-game
 *
 * @param e an event representing a player moving
 * @see PlayerMoveEvent
 * @since 2.1.0
 */
@EventHandler
public void onPlayerMove(PlayerMoveEvent e) {
    YamlConfiguration messages = SettingsManager.getInstance().getMessages();
    var player = e.getPlayer();
    Location to = e.getTo();
    Location from = e.getFrom();
    if (ArenaManager.getInstance().getArena(player) == null) {
        // check if player wants to go inside (except spectators of course)
        for (var arena : ArenaManager.getInstance().getArenas()) {
            if (arena.getState() == GameState.WAITING || arena.getState() == GameState.STARTING)
                continue;
            for (var plot : arena.getPlots()) {
                if (plot.getBoundary().isInside(to) && !plot.getBoundary().isInside(from)) {
                    // teleport this intruder back
                    player.teleport(from);
                    MessageManager.getInstance().send(player, ChatColor.RED + "You can't access this plot when this arena is in-game");
                } else if (plot.getBoundary().isInside(to)) {
                    // use algorithm to find nearest block to push them out of the arena
                    player.teleport(getClosestPositionOutsideActivePlot(player.getLocation()));
                    MessageManager.getInstance().send(player, ChatColor.RED + "You can't access this plot when this arena is in-game");
                }
            }
        }
        return;
    }
    if (SettingsManager.getInstance().getConfig().getBoolean("allow-fly-out-bounds"))
        return;
    var arena = ArenaManager.getInstance().getArena(player);
    var plot = arena.getPlot(player);
    Region boundary = plot.getBoundary();
    if (plot.getGamePlayer(player).getGamePlayerType() == GamePlayerType.SPECTATOR) {
        var gamePlayer = plot.getGamePlayer(player);
        if (!boundary.isInside(to)) {
            player.teleport(gamePlayer.getSpectates().getPlayer());
            MessageManager.getInstance().send(player, MessageManager.translate(messages.getStringList("in-game.move-out-bounds")));
        }
        return;
    }
    if (arena.getState() == GameState.VOTING) {
        teleportBack(arena.getVotingPlot(), player, from, to);
        return;
    }
    if (arena.getState() == GameState.RESETING) {
        teleportBack(arena.getFirstPlot(), player, from, to);
        return;
    }
    if (arena.getState() != GameState.BUILDING) {
        return;
    }
    if (!boundary.isInside(from)) {
        List<Block> allBlocks = boundary.getAllBlocks();
        player.teleport(allBlocks.get(ThreadLocalRandom.current().nextInt(allBlocks.size())).getLocation());
        return;
    }
    if (!boundary.isInside(to)) {
        player.teleport(from);
        MessageManager.getInstance().send(player, messages.getStringList("in-game.move-out-bounds"));
    }
}
Also used : Region(com.gmail.stefvanschiedev.buildinggame.utils.region.Region) Block(org.bukkit.block.Block) YamlConfiguration(org.bukkit.configuration.file.YamlConfiguration) Location(org.bukkit.Location) EventHandler(org.bukkit.event.EventHandler)

Example 3 with Region

use of com.gmail.stefvanschiedev.buildinggame.utils.region.Region in project buildinggame by stefvanschie.

the class VoteTimer method run.

/**
 * Called whenever a second has passed. This will generate a new plot if needed or end the game if all plots have
 * been voted on.
 *
 * @since 2.1.0
 */
@Override
public void run() {
    running = true;
    if (seconds == originalSeconds) {
        plot = getNextPlot();
        if (plot == null) {
            arena.setState(GameState.RESETING);
            Plot first = null;
            Plot second = null;
            Plot third = null;
            for (var plot : arena.getPlots()) {
                if (first == null || first.getPoints() < plot.getPoints()) {
                    third = second;
                    second = first;
                    first = plot;
                    continue;
                }
                if (second == null || second.getPoints() < plot.getPoints()) {
                    third = second;
                    second = plot;
                    continue;
                }
                if (third == null || third.getPoints() < plot.getPoints())
                    third = plot;
            }
            // call events
            if (first != null)
                Bukkit.getPluginManager().callEvent(new PlayerWinEvent(arena, first.getGamePlayers(), Win.FIRST));
            if (second != null)
                Bukkit.getPluginManager().callEvent(new PlayerWinEvent(arena, second.getGamePlayers(), Win.SECOND));
            if (third != null)
                Bukkit.getPluginManager().callEvent(new PlayerWinEvent(arena, third.getGamePlayers(), Win.THIRD));
            arena.setFirstPlot(first);
            arena.setSecondPlot(second);
            arena.setThirdPlot(third);
            // create a schematic of the first plot
            if (config.getBoolean("schematics.enable") && Bukkit.getPluginManager().isPluginEnabled("WorldEdit")) {
                Region region = arena.getFirstPlot().getBoundary();
                var dateTimeFormatter = DateTimeFormatter.ofPattern("yyy-MM-dd_HH-mm-ss");
                String players = arena.getFirstPlot().getGamePlayers().stream().map(gp -> '-' + gp.getPlayer().getName()).reduce("", String::concat);
                var fileName = LocalDateTime.now().format(dateTimeFormatter) + players + ".schem";
                var file = new File(SettingsManager.getInstance().getWinnerSchematicsFolder(), fileName);
                region.saveSchematic(file);
            }
            for (var plot : arena.getUsedPlots()) {
                for (var gamePlayer : plot.getAllGamePlayers()) {
                    var player = gamePlayer.getPlayer();
                    player.getInventory().clear();
                    if (first != null)
                        first.getLocation().teleport(player);
                    MessageManager.getInstance().send(player, messages.getStringList("game-ends.message"));
                    if (second != null && third != null) {
                        for (String message : messages.getStringList("game-ends.winners")) MessageManager.getInstance().send(player, message.replace("%first_players%", first.getPlayerFormat()).replace("%second_players%", second.getPlayerFormat()).replace("%third_players%", third.getPlayerFormat()));
                    }
                    // noinspection ConstantConditions
                    gamePlayer.addTitleAndSubtitle(messages.getString("winner.title").replace("%first%", first.getPlayerFormat()).replace("%second%", second == null ? "" : second.getPlayerFormat()).replace("%third%", third == null ? "" : third.getPlayerFormat()).replace("%first_points%", first.getPoints() + "").replace("%second_points%", second == null ? "0" : second.getPoints() + "").replace("%third_points%", third == null ? "0" : third.getPoints() + ""), messages.getString("winner.subtitle").replace("%first%", first.getPlayerFormat()).replace("%second%", second == null ? "" : second.getPlayerFormat()).replace("%third%", third == null ? "" : third.getPlayerFormat()).replace("%first_points%", first.getPoints() + "").replace("%second_points%", second == null ? "0" : second.getPoints() + "").replace("%third_points%", third == null ? "0" : second.getPoints() + ""));
                    gamePlayer.sendActionbar(messages.getString("winner.actionbar").replace("%first%", first.getPlayerFormat()).replace("%second%", second == null ? "" : second.getPlayerFormat()).replace("%third%", third == null ? "" : third.getPlayerFormat()).replace("%first_points%", String.valueOf(first.getPoints())).replace("%second_points%", second == null ? "0" : String.valueOf(second.getPoints())).replace("third_points", third == null ? "0" : String.valueOf(third.getPoints())));
                    if (SDVault.getInstance().isEnabled() && gamePlayer.getGamePlayerType() == GamePlayerType.PLAYER) {
                        String moneyString;
                        if (first.equals(plot)) {
                            moneyString = config.getString("money.first");
                            messages.getStringList("winner.first").forEach(message -> MessageManager.getInstance().send(player, message.replace("%points%", plot.getPoints() + "")));
                            config.getStringList("commands.first").forEach(command -> CommandUtil.dispatch(command.replace("%player%", player.getName())));
                        } else if (second.equals(plot)) {
                            moneyString = config.getString("money.second");
                            messages.getStringList("winner.second").forEach(message -> MessageManager.getInstance().send(player, message.replace("%points%", plot.getPoints() + "")));
                            config.getStringList("commands.second").forEach(command -> CommandUtil.dispatch(command.replace("%player%", player.getName())));
                        } else if (third.equals(plot)) {
                            moneyString = config.getString("money.third");
                            messages.getStringList("winner.third").forEach(message -> MessageManager.getInstance().send(player, message.replace("%points%", plot.getPoints() + "")));
                            config.getStringList("commands.third").forEach(command -> CommandUtil.dispatch(command.replace("%player%", player.getName())));
                        } else {
                            moneyString = config.getString("money.others");
                            config.getStringList("commands.others").forEach(command -> CommandUtil.dispatch(command.replace("%player%", player.getName())));
                        }
                        // compute money
                        MathElement element = MathElementFactory.parseText(moneyString.replace("%points%", String.valueOf(arena.getPlot(player).getVotes().stream().mapToInt(Vote::getPoints).sum())));
                        double money = element == null ? Double.NaN : element.compute();
                        if (Double.isNaN(money))
                            Main.getInstance().getLogger().warning("Unable to parse mathematical equation");
                        if (Double.isFinite(money) && arena.hasMoneyEnabled()) {
                            if (player.hasPermission("bg.rewards.money.double"))
                                money *= 2;
                            // booster multiplier
                            money *= Booster.getMultiplier(player);
                            if (SDVault.getEconomy().depositPlayer(player, money).transactionSuccess()) {
                                if (Booster.hasBooster(player)) {
                                    for (String message : messages.getStringList("vault.message.booster")) MessageManager.getInstance().send(player, message.replace("%money%", money + ""));
                                } else {
                                    for (String message : messages.getStringList("vault.message.no-booster")) MessageManager.getInstance().send(player, message.replace("%money%", money + ""));
                                }
                            }
                        }
                    }
                }
            }
            if (first != null) {
                first.getGamePlayers().forEach(gamePlayer -> config.getStringList("win-commands").forEach(command -> {
                    command = command.replace("%winner%", gamePlayer.getPlayer().getName());
                    if (!command.isEmpty() && command.charAt(0) == '@') {
                        String targetText = command.split(" ")[0];
                        Target.parse(targetText).execute(command.substring(targetText.length() + 1));
                    } else {
                        Bukkit.dispatchCommand(gamePlayer.getPlayer(), command);
                    }
                }));
            }
            arena.getWinTimer().runTaskTimer(Main.getInstance(), 20L, 20L);
            running = false;
            this.cancel();
            return;
        }
        arena.setVotingPlot(plot);
        arena.getUsedPlots().forEach(plot -> plot.getAllGamePlayers().forEach(gamePlayer -> {
            var player = gamePlayer.getPlayer();
            if (!config.getBoolean("names-after-voting") && config.getBoolean("scoreboards.vote.enable")) {
                arena.getVoteScoreboard(plot).show(player);
            }
            player.setPlayerTime(this.plot.getTime(), false);
            player.setPlayerWeather(this.plot.isRaining() ? WeatherType.DOWNFALL : WeatherType.CLEAR);
        }));
    }
    // timings
    try {
        config.getConfigurationSection("timings.vote-timer.at").getKeys(false).forEach(key -> {
            if (seconds == Integer.parseInt(key)) {
                config.getStringList("timings.vote-timer.at." + Integer.parseInt(key)).forEach(command -> CommandUtil.dispatch(command.replace("%arena%", arena.getName())));
            }
        });
        config.getConfigurationSection("timings.vote-timer.every").getKeys(false).forEach(key -> {
            if (seconds % Integer.parseInt(key) == 0) {
                config.getStringList("timings.vote-timer.every." + Integer.parseInt(key)).forEach(command -> CommandUtil.dispatch(command.replace("%arena%", arena.getName())));
            }
        });
    } catch (NullPointerException | NumberFormatException ignore) {
    }
    seconds--;
    if (seconds <= 0) {
        arena.getUsedPlots().stream().flatMap(plot -> plot.getGamePlayers().stream()).forEach(player -> {
            Player pl = player.getPlayer();
            if (config.getBoolean("names-after-voting")) {
                messages.getStringList("voting.message").forEach(message -> MessageManager.getInstance().send(pl, message.replace("%playerplot%", this.plot.getPlayerFormat())));
                player.addTitleAndSubtitle(messages.getString("voting.title").replace("%playerplot%", this.plot.getPlayerFormat()), messages.getString("voting.subtitle").replace("%playerplot%", this.plot.getPlayerFormat()));
                player.sendActionbar(messages.getString("voting.actionbar").replace("%playerplot%", this.plot.getPlayerFormat()));
            }
            if (!this.plot.hasVoted(pl) && !this.plot.getGamePlayers().contains(player))
                this.plot.addVote(new Vote(config.getInt("voting.default-vote-points"), pl));
        });
        seconds = originalSeconds;
    }
}
Also used : GamePlayerType(com.gmail.stefvanschiedev.buildinggame.utils.gameplayer.GamePlayerType) MathElement(com.gmail.stefvanschiedev.buildinggame.utils.math.MathElement) MathElementFactory(com.gmail.stefvanschiedev.buildinggame.utils.math.util.MathElementFactory) Win(com.gmail.stefvanschiedev.buildinggame.api.Win) PlayerWinEvent(com.gmail.stefvanschiedev.buildinggame.api.events.PlayerWinEvent) MessageManager(com.gmail.stefvanschiedev.buildinggame.managers.messages.MessageManager) LocalDateTime(java.time.LocalDateTime) SettingsManager(com.gmail.stefvanschiedev.buildinggame.managers.files.SettingsManager) Player(org.bukkit.entity.Player) Plot(com.gmail.stefvanschiedev.buildinggame.utils.plot.Plot) File(java.io.File) Nullable(org.jetbrains.annotations.Nullable) Contract(org.jetbrains.annotations.Contract) Region(com.gmail.stefvanschiedev.buildinggame.utils.region.Region) com.gmail.stefvanschiedev.buildinggame.utils(com.gmail.stefvanschiedev.buildinggame.utils) YamlConfiguration(org.bukkit.configuration.file.YamlConfiguration) Main(com.gmail.stefvanschiedev.buildinggame.Main) Timer(com.gmail.stefvanschiedev.buildinggame.timers.utils.Timer) DateTimeFormatter(java.time.format.DateTimeFormatter) Arena(com.gmail.stefvanschiedev.buildinggame.utils.arena.Arena) SDVault(com.gmail.stefvanschiedev.buildinggame.managers.softdependencies.SDVault) Bukkit(org.bukkit.Bukkit) WeatherType(org.bukkit.WeatherType) PlayerWinEvent(com.gmail.stefvanschiedev.buildinggame.api.events.PlayerWinEvent) MathElement(com.gmail.stefvanschiedev.buildinggame.utils.math.MathElement) Player(org.bukkit.entity.Player) Plot(com.gmail.stefvanschiedev.buildinggame.utils.plot.Plot) Region(com.gmail.stefvanschiedev.buildinggame.utils.region.Region) File(java.io.File)

Example 4 with Region

use of com.gmail.stefvanschiedev.buildinggame.utils.region.Region in project buildinggame by stefvanschie.

the class LiquidFlow method onBlockFromTo.

/**
 * Handles liquid flowing
 *
 * @param e an event indicating that a liquid has flown
 * @see BlockFromToEvent
 * @since 2.2.1
 */
@EventHandler
public void onBlockFromTo(BlockFromToEvent e) {
    Location from = e.getBlock().getLocation();
    Location to = e.getToBlock().getLocation();
    for (var arena : ArenaManager.getInstance().getArenas()) {
        for (var plot : arena.getPlots()) {
            Region boundary = plot.getBoundary();
            if (boundary == null)
                continue;
            if (boundary.isInside(from) != boundary.isInside(to))
                // checks if the source flows/goes out of the boundary and vice versa
                e.setCancelled(true);
        }
    }
}
Also used : Region(com.gmail.stefvanschiedev.buildinggame.utils.region.Region) Location(org.bukkit.Location) EventHandler(org.bukkit.event.EventHandler)

Example 5 with Region

use of com.gmail.stefvanschiedev.buildinggame.utils.region.Region in project buildinggame by stefvanschie.

the class CommandManager method onSetBounds.

/**
 * Called whenever a player wants to set the boundary of a plot
 *
 * @param player the player
 * @param arena the arena
 * @param id the plot id to set the boundary of
 * @since 5.8.0
 */
@Subcommand("setbounds")
@Description("Set the boundary of a plot (inclusive)")
@CommandPermission("bg.setbounds")
@CommandCompletion("@arenas @nothing")
public void onSetBounds(Player player, Arena arena, int id) {
    final var plot = arena.getPlot(id);
    if (plot == null) {
        MessageManager.getInstance().send(player, ChatColor.RED + "That's not a valid plot");
        return;
    }
    player.getInventory().setItemInMainHand(new ItemBuilder(player, Material.STICK).setDisplayName(ChatColor.LIGHT_PURPLE + "Wand").setClickEvent(new Consumer<>() {

        private Location previousLocation;

        @Override
        public void accept(PlayerInteractEvent event) {
            YamlConfiguration arenas = SettingsManager.getInstance().getArenas();
            YamlConfiguration messages = SettingsManager.getInstance().getMessages();
            var player = event.getPlayer();
            var action = event.getAction();
            if (action != Action.LEFT_CLICK_BLOCK && action != Action.RIGHT_CLICK_BLOCK)
                return;
            if (previousLocation == null) {
                previousLocation = event.getClickedBlock().getLocation();
                MessageManager.getInstance().send(player, ChatColor.GREEN + "Now click on the other corner");
            } else {
                // second time
                var location = event.getClickedBlock().getLocation();
                String name = arena.getName();
                int plotID = plot.getId();
                World world = location.getWorld();
                if (previousLocation.getWorld().equals(world)) {
                    arenas.set(name + '.' + plotID + ".high.world", world.getName());
                    arenas.set(name + '.' + plotID + ".low.world", previousLocation.getWorld().getName());
                } else {
                    MessageManager.getInstance().send(player, ChatColor.RED + "The world has to be the same");
                    event.setCancelled(true);
                    return;
                }
                int highestX = Math.max(previousLocation.getBlockX(), location.getBlockX());
                int lowestX = Math.min(previousLocation.getBlockX(), location.getBlockX());
                int highestY = Math.max(previousLocation.getBlockY(), location.getBlockY());
                int lowestY = Math.min(previousLocation.getBlockY(), location.getBlockY());
                int highestZ = Math.max(previousLocation.getBlockZ(), location.getBlockZ());
                int lowestZ = Math.min(previousLocation.getBlockZ(), location.getBlockZ());
                // x
                arenas.set(name + '.' + plotID + ".high.x", highestX);
                arenas.set(name + '.' + plotID + ".low.x", lowestX);
                // y
                arenas.set(name + '.' + plotID + ".high.y", highestY);
                arenas.set(name + '.' + plotID + ".low.y", lowestY);
                // z
                arenas.set(name + '.' + plotID + ".high.z", highestZ);
                arenas.set(name + '.' + plotID + ".low.z", lowestZ);
                SettingsManager.getInstance().save();
                String worldName = world.getName();
                Supplier<World> worldSupplier = () -> Bukkit.getWorld(worldName);
                Region region = RegionFactory.createRegion(worldSupplier, highestX, highestY, highestZ, lowestX, lowestY, lowestZ);
                plot.setBoundary(region);
                messages.getStringList("commands.setbounds.success").forEach(message -> MessageManager.getInstance().send(player, message.replace("%place%", plotID + "").replace("%arena%", name)));
                previousLocation = null;
                player.getInventory().setItemInMainHand(null);
            }
            event.setCancelled(true);
        }
    }).build());
    MessageManager.getInstance().send(player, ChatColor.GREEN + "Please click on one corner");
}
Also used : CommandHelp(co.aikar.commands.CommandHelp) Player(org.bukkit.entity.Player) ReportMenu(com.gmail.stefvanschiedev.buildinggame.utils.guis.ReportMenu) Action(org.bukkit.event.block.Action) Supplier(java.util.function.Supplier) org.bukkit(org.bukkit) Main(com.gmail.stefvanschiedev.buildinggame.Main) com.gmail.stefvanschiedev.buildinggame.utils(com.gmail.stefvanschiedev.buildinggame.utils) Locale(java.util.Locale) PlayerInteractEvent(org.bukkit.event.player.PlayerInteractEvent) GamePlayerType(com.gmail.stefvanschiedev.buildinggame.utils.gameplayer.GamePlayerType) CommandSender(org.bukkit.command.CommandSender) co.aikar.commands.annotation(co.aikar.commands.annotation) ArenaSelection(com.gmail.stefvanschiedev.buildinggame.utils.guis.ArenaSelection) BaseCommand(co.aikar.commands.BaseCommand) RegionFactory(com.gmail.stefvanschiedev.buildinggame.utils.region.RegionFactory) ArenaMode(com.gmail.stefvanschiedev.buildinggame.utils.arena.ArenaMode) GamePlayer(com.gmail.stefvanschiedev.buildinggame.utils.gameplayer.GamePlayer) PotentialLocation(com.gmail.stefvanschiedev.buildinggame.utils.potential.PotentialLocation) MessageManager(com.gmail.stefvanschiedev.buildinggame.managers.messages.MessageManager) SettingsManager(com.gmail.stefvanschiedev.buildinggame.managers.files.SettingsManager) Plot(com.gmail.stefvanschiedev.buildinggame.utils.plot.Plot) Consumer(java.util.function.Consumer) List(java.util.List) Region(com.gmail.stefvanschiedev.buildinggame.utils.region.Region) YamlConfiguration(org.bukkit.configuration.file.YamlConfiguration) StatManager(com.gmail.stefvanschiedev.buildinggame.managers.stats.StatManager) com.gmail.stefvanschiedev.buildinggame.timers(com.gmail.stefvanschiedev.buildinggame.timers) Arena(com.gmail.stefvanschiedev.buildinggame.utils.arena.Arena) ArenaManager(com.gmail.stefvanschiedev.buildinggame.managers.arenas.ArenaManager) StatType(com.gmail.stefvanschiedev.buildinggame.utils.stats.StatType) MainSpawnManager(com.gmail.stefvanschiedev.buildinggame.managers.mainspawn.MainSpawnManager) PlayerInteractEvent(org.bukkit.event.player.PlayerInteractEvent) Region(com.gmail.stefvanschiedev.buildinggame.utils.region.Region) Supplier(java.util.function.Supplier) YamlConfiguration(org.bukkit.configuration.file.YamlConfiguration) PotentialLocation(com.gmail.stefvanschiedev.buildinggame.utils.potential.PotentialLocation)

Aggregations

Region (com.gmail.stefvanschiedev.buildinggame.utils.region.Region)9 YamlConfiguration (org.bukkit.configuration.file.YamlConfiguration)6 Plot (com.gmail.stefvanschiedev.buildinggame.utils.plot.Plot)4 Main (com.gmail.stefvanschiedev.buildinggame.Main)3 ArenaManager (com.gmail.stefvanschiedev.buildinggame.managers.arenas.ArenaManager)3 SettingsManager (com.gmail.stefvanschiedev.buildinggame.managers.files.SettingsManager)3 MessageManager (com.gmail.stefvanschiedev.buildinggame.managers.messages.MessageManager)3 com.gmail.stefvanschiedev.buildinggame.utils (com.gmail.stefvanschiedev.buildinggame.utils)3 GamePlayerType (com.gmail.stefvanschiedev.buildinggame.utils.gameplayer.GamePlayerType)3 PotentialLocation (com.gmail.stefvanschiedev.buildinggame.utils.potential.PotentialLocation)3 Player (org.bukkit.entity.Player)3 MainSpawnManager (com.gmail.stefvanschiedev.buildinggame.managers.mainspawn.MainSpawnManager)2 Timer (com.gmail.stefvanschiedev.buildinggame.timers.utils.Timer)2 Arena (com.gmail.stefvanschiedev.buildinggame.utils.arena.Arena)2 GamePlayer (com.gmail.stefvanschiedev.buildinggame.utils.gameplayer.GamePlayer)2 Supplier (java.util.function.Supplier)2 org.bukkit (org.bukkit)2 Location (org.bukkit.Location)2 EventHandler (org.bukkit.event.EventHandler)2 PlayerInteractEvent (org.bukkit.event.player.PlayerInteractEvent)2