remove player from tutorial on kick

This commit is contained in:
Ben 2016-03-27 15:36:54 +01:00
parent e4e40baf52
commit 1aa4b4a47d

View File

@ -13,18 +13,19 @@ import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.HandlerList;
import org.bukkit.event.Listener;
import org.bukkit.event.player.PlayerKickEvent;
import org.bukkit.event.player.PlayerQuitEvent;
import org.bukkit.plugin.java.JavaPlugin;
import mineplex.core.common.util.C;
import mineplex.core.common.util.UtilTextBottom;
import mineplex.core.hologram.Hologram;
import mineplex.core.hologram.HologramManager;
import mineplex.core.updater.UpdateType;
import mineplex.core.updater.event.UpdateEvent;
import mineplex.game.clans.message.ClansMessageManager;
import mineplex.game.clans.tutorial.objective.Objective;
import mineplex.game.clans.tutorial.objective.ObjectiveListener;
import mineplex.core.common.util.C;
import mineplex.game.clans.message.ClansMessageManager;
public abstract class Tutorial implements Listener, ObjectiveListener
{
@ -256,6 +257,15 @@ public abstract class Tutorial implements Listener, ObjectiveListener
quit(event.getPlayer());
}
}
@EventHandler
public void onKick(PlayerKickEvent event)
{
if (isInTutorial(event.getPlayer()))
{
quit(event.getPlayer());
}
}
@EventHandler
public void displayDescription(UpdateEvent event)