diff --git a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/gui/events/ClansButtonClickEvent.java b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/gui/events/ClansButtonClickEvent.java index 72bad2675..516336d75 100644 --- a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/gui/events/ClansButtonClickEvent.java +++ b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/clans/gui/events/ClansButtonClickEvent.java @@ -34,7 +34,7 @@ public class ClansButtonClickEvent extends Event return _cancelled; } - public ButtonType getButtonType() { return _type} + public ButtonType getButtonType() { return _type; } public HandlerList getHandlers() { diff --git a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/tutorial/tutorials/clans/ClansMainTutorial.java b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/tutorial/tutorials/clans/ClansMainTutorial.java index d037671f2..cac6eaf04 100644 --- a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/tutorial/tutorials/clans/ClansMainTutorial.java +++ b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/tutorial/tutorials/clans/ClansMainTutorial.java @@ -15,13 +15,12 @@ import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; import org.bukkit.event.EventPriority; import org.bukkit.event.block.BlockBreakEvent; +import org.bukkit.event.block.BlockPlaceEvent; import org.bukkit.event.entity.EntityDamageEvent; import org.bukkit.event.player.PlayerDropItemEvent; 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; @@ -30,7 +29,6 @@ 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; @@ -131,27 +129,6 @@ public class ClansMainTutorial extends Tutorial player.getInventory().clear(); ClansManager.getInstance().getPvpTimer().pause(player); - - // Spawn Holograms - addHologram(player, - getPoint(region, ClansMainTutorial.Point.SPAWN).add(0, 1.5, -6), - C.cGoldB + "Welcome to the Clans Tutorial!", - " ", - "This will teach you the basics of Clans.", - "It will take about 5 minutes to complete.", - "You must complete it before playing Clans.", - " ", - "Walk forward to begin!"); - - 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 @@ -255,10 +232,16 @@ public class ClansMainTutorial extends Tutorial @EventHandler public void breakBlock(BlockBreakEvent event) { - System.out.println("main break"); if (isInTutorial(event.getPlayer())) { - System.out.println("cencelled"); + event.setCancelled(true); + } + } + + @EventHandler + public void placeBlock(BlockPlaceEvent event) { + if (isInTutorial(event.getPlayer())) + { event.setCancelled(true); } } @@ -406,7 +389,7 @@ public class ClansMainTutorial extends Tutorial @EventHandler (priority = EventPriority.LOWEST) public void onClick(ClansButtonClickEvent event) { - if(isInTutorial(event.getPlayer())) + if(isInTutorial(event.getPlayer())) event.setCancelled(true); } } diff --git a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/tutorial/tutorials/clans/objective/goals/clan/BuildHouseGoal.java b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/tutorial/tutorials/clans/objective/goals/clan/BuildHouseGoal.java index 15ab7376b..86d20ea1b 100644 --- a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/tutorial/tutorials/clans/objective/goals/clan/BuildHouseGoal.java +++ b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/tutorial/tutorials/clans/objective/goals/clan/BuildHouseGoal.java @@ -78,7 +78,7 @@ public class BuildHouseGoal extends ObjectiveGoal } } - @EventHandler + @EventHandler (priority = EventPriority.HIGHEST) public void blockPlace(BlockPlaceEvent event) { if (!contains(event.getPlayer())) diff --git a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/tutorial/tutorials/clans/objective/goals/classes/UseBullsChargeGoal.java b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/tutorial/tutorials/clans/objective/goals/classes/UseBullsChargeGoal.java index 720448e01..0c2754c18 100644 --- a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/tutorial/tutorials/clans/objective/goals/classes/UseBullsChargeGoal.java +++ b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/tutorial/tutorials/clans/objective/goals/classes/UseBullsChargeGoal.java @@ -1,5 +1,9 @@ package mineplex.game.clans.tutorial.tutorials.clans.objective.goals.classes; +import mineplex.game.clans.clans.ClansManager; +import mineplex.minecraft.game.classcombat.Class.ClassManager; +import mineplex.minecraft.game.classcombat.Class.ClientClass; +import mineplex.minecraft.game.classcombat.Class.IPvpClass; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; @@ -15,8 +19,15 @@ public class UseBullsChargeGoal extends ObjectiveGoal } @Override - protected void customStart(Player player) - { + protected void customStart(Player player) { + ClientClass client = ClansManager.getInstance().getClassManager().Get(player); + + for(IPvpClass clazz: ClansManager.getInstance().getClassManager().GetAllClasses()) { + if(clazz.GetName().toLowerCase().contains("default")) { + client.SetGameClass(clazz); + break; + } + } } @Override diff --git a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/tutorial/tutorials/clans/objective/goals/finalobj/DisbandClanGoal.java b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/tutorial/tutorials/clans/objective/goals/finalobj/DisbandClanGoal.java index fedb379bf..e31792c35 100644 --- a/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/tutorial/tutorials/clans/objective/goals/finalobj/DisbandClanGoal.java +++ b/Plugins/Mineplex.Game.Clans/src/mineplex/game/clans/tutorial/tutorials/clans/objective/goals/finalobj/DisbandClanGoal.java @@ -30,6 +30,7 @@ public class DisbandClanGoal extends ObjectiveGoal @Override protected void customFinish(Player player) { + ClansManager.getInstance().resetLeftTimer(player.getUniqueId()); } @EventHandler(priority = EventPriority.HIGHEST)