PC-49 - Kick players out of their clan when they start the tutorial if they have one (from previously playing the tutorial).

This commit is contained in:
Shaun Bennett 2016-03-31 18:24:47 +11:00
parent 7c70092f3b
commit 30a098c645

View File

@ -20,6 +20,7 @@ import org.bukkit.event.player.PlayerJoinEvent;
import org.bukkit.plugin.java.JavaPlugin;
import mineplex.core.common.util.C;
import mineplex.core.common.util.Callback;
import mineplex.core.common.util.F;
import mineplex.core.common.util.UtilAlg;
import mineplex.core.common.util.UtilInv;
@ -28,6 +29,7 @@ import mineplex.core.hologram.HologramManager;
import mineplex.core.npc.NpcManager;
import mineplex.core.updater.UpdateType;
import mineplex.core.updater.event.UpdateEvent;
import mineplex.game.clans.clans.ClanInfo;
import mineplex.game.clans.clans.ClansManager;
import mineplex.game.clans.clans.event.ClansCommandPreExecutedEvent;
import mineplex.game.clans.economy.GoldManager;
@ -143,6 +145,12 @@ public class ClansMainTutorial extends Tutorial
addHologram(player,
getPoint(region, ClansMainTutorial.Point.SPAWN).add(0, 1.5, -23),
"Jump Off!");
ClanInfo clan = ClansManager.getInstance().getClan(player);
if (clan != null)
{
ClansManager.getInstance().getClanDataAccess().delete(clan, null);
}
}
@Override