From 8a8a8de18a3289be2c33768d78d281f31d8f4bd3 Mon Sep 17 00:00:00 2001 From: TheKaVu Date: Tue, 23 May 2023 09:20:56 +0200 Subject: [PATCH] Changed playerCount to Set of players and renamed to players in GameEndEvent (#30) --- .../java/dev/kavu/gameapi/event/GameEndEvent.java | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/main/java/dev/kavu/gameapi/event/GameEndEvent.java b/src/main/java/dev/kavu/gameapi/event/GameEndEvent.java index dad8c75..1c597bc 100644 --- a/src/main/java/dev/kavu/gameapi/event/GameEndEvent.java +++ b/src/main/java/dev/kavu/gameapi/event/GameEndEvent.java @@ -1,23 +1,27 @@ package dev.kavu.gameapi.event; import dev.kavu.gameapi.game.GameType; +import org.bukkit.entity.Player; import org.bukkit.event.Cancellable; import org.bukkit.event.HandlerList; +import java.util.Set; + public class GameEndEvent extends GameEvent implements Cancellable { private static final HandlerList handlers = new HandlerList(); - private final int playerCount; + + private final Set players; private boolean cancelled; - public GameEndEvent(GameType gameType, int playerCount) { + public GameEndEvent(GameType gameType, Set players) { super(gameType); - this.playerCount = playerCount; + this.players = players; } - public int getPlayerCount() { - return playerCount; + public Set getPlayers() { + return players; } @Override