Skip to content

Commit

Permalink
Changed playerCount to Set of players and renamed to players in GameE…
Browse files Browse the repository at this point in the history
…ndEvent (#30)
  • Loading branch information
TheKaVu committed May 23, 2023
1 parent 98004b6 commit 8a8a8de
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions src/main/java/dev/kavu/gameapi/event/GameEndEvent.java
Original file line number Diff line number Diff line change
@@ -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<Player> players;
private boolean cancelled;

public GameEndEvent(GameType gameType, int playerCount) {
public GameEndEvent(GameType gameType, Set<Player> players) {
super(gameType);
this.playerCount = playerCount;
this.players = players;
}

public int getPlayerCount() {
return playerCount;
public Set<Player> getPlayers() {
return players;
}

@Override
Expand Down

0 comments on commit 8a8a8de

Please sign in to comment.