Skip to content
This repository has been archived by the owner on Aug 31, 2019. It is now read-only.

Commit

Permalink
Handle kick events
Browse files Browse the repository at this point in the history
  • Loading branch information
jedediah committed Dec 5, 2014
1 parent 6f10feb commit 025922e
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import org.bukkit.event.EventPriority;
import org.bukkit.event.Listener;
import org.bukkit.event.player.PlayerJoinEvent;
import org.bukkit.event.player.PlayerKickEvent;
import org.bukkit.event.player.PlayerQuitEvent;

/** Listener for player-related events. */
Expand Down Expand Up @@ -42,4 +43,9 @@ public void onPlayerJoin(final PlayerJoinEvent event) {
public void onPlayerQuit(final PlayerQuitEvent event) {
this.plugin.getPlayerManager().removePlayer(event.getPlayer());
}

@EventHandler(priority = EventPriority.MONITOR)
public void onPlayerKick(final PlayerKickEvent event) {
this.plugin.getPlayerManager().removePlayer(event.getPlayer());
}
}

0 comments on commit 025922e

Please sign in to comment.