diff --git a/type.thepark/src/main/java/net/swofty/type/thepark/TypeTheParkLoader.java b/type.thepark/src/main/java/net/swofty/type/thepark/TypeTheParkLoader.java index 7c677fffd..74c0391ef 100644 --- a/type.thepark/src/main/java/net/swofty/type/thepark/TypeTheParkLoader.java +++ b/type.thepark/src/main/java/net/swofty/type/thepark/TypeTheParkLoader.java @@ -103,13 +103,18 @@ public void afterInitialize(MinecraftServer server) { if (shouldRenderTraps(p)) { return true; } + if (p.getMissionData().isCurrentlyActive(MissionTalkToMolbertAgainAgainAgain.class)) { + return finalIndex == 1; + } + if (p.getMissionData().isCurrentlyActive(MissionHelpMolbert.class)) { + return finalIndex == 1; + } if(!p.getMissionData().isCurrentlyActive(MissionPlaceTraps.class)) { return false; } MissionData.ActiveMission activeMission = p.getMissionData().getMission(MissionPlaceTraps.class).getKey(); List placedTraps = (List) activeMission.getCustomData().getOrDefault("placedTraps", new ArrayList()); - Logger.info("Placed traps for player {}: {}", p.getUsername(), placedTraps); return !placedTraps.contains(finalIndex); }); entities.add(text); @@ -140,6 +145,9 @@ public void afterInitialize(MinecraftServer server) { if (player.getMissionData().isCurrentlyActive(MissionTalkToMolbertAgainAgainAgain.class)) { return finalIndex == 1; } + if (player.getMissionData().isCurrentlyActive(MissionHelpMolbert.class)) { + return finalIndex == 1; + } if(!player.getMissionData().isCurrentlyActive(MissionPlaceTraps.class)) { return false; } diff --git a/type.thepark/src/main/java/net/swofty/type/thepark/events/ActionContinueParkMission.java b/type.thepark/src/main/java/net/swofty/type/thepark/events/ActionContinueParkMission.java index e61a56538..410abe2cc 100644 --- a/type.thepark/src/main/java/net/swofty/type/thepark/events/ActionContinueParkMission.java +++ b/type.thepark/src/main/java/net/swofty/type/thepark/events/ActionContinueParkMission.java @@ -1,5 +1,6 @@ package net.swofty.type.thepark.events; +import net.minestom.server.entity.Entity; import net.swofty.type.generic.entity.npc.HypixelNPC; import net.swofty.type.generic.event.EventNodes; import net.swofty.type.generic.event.HypixelEvent; @@ -9,12 +10,12 @@ import net.swofty.type.skyblockgeneric.mission.missions.thepark.birchpark.MissionTravelToThePark; import net.swofty.type.skyblockgeneric.mission.missions.thepark.darkthicket.MissionFindTheCampfire; import net.swofty.type.skyblockgeneric.mission.missions.thepark.darkthicket.MissionTravelToTheDarkThicket; -import net.swofty.type.skyblockgeneric.mission.missions.thepark.jungle.MissionTalkToMolbert; +import net.swofty.type.skyblockgeneric.mission.missions.thepark.jungle.MissionTalkToMolbertAgainAgainAgain; import net.swofty.type.skyblockgeneric.mission.missions.thepark.savanna.MissionTravelToTheSavannaWoodland; import net.swofty.type.skyblockgeneric.mission.missions.thepark.spruce.MissionTravelToTheSpruceWoods; import net.swofty.type.skyblockgeneric.user.SkyBlockPlayer; +import net.swofty.type.thepark.TypeTheParkLoader; import net.swofty.type.thepark.npcs.NPCWorkerXavier; -import org.tinylog.Logger; public class ActionContinueParkMission implements HypixelEventClass { @@ -60,6 +61,11 @@ public void run(PlayerRegionChangeEvent event) { }); } } + case JUNGLE_ISLAND -> { + if (data.isCurrentlyActive(MissionTalkToMolbertAgainAgainAgain.class)) { + TypeTheParkLoader.entities.forEach(Entity::updateViewableRule); + } + } case null, default -> { } } diff --git a/type.thepark/src/main/java/net/swofty/type/thepark/npcs/NPCMolbert.java b/type.thepark/src/main/java/net/swofty/type/thepark/npcs/NPCMolbert.java index e4b750ebb..48219e53a 100644 --- a/type.thepark/src/main/java/net/swofty/type/thepark/npcs/NPCMolbert.java +++ b/type.thepark/src/main/java/net/swofty/type/thepark/npcs/NPCMolbert.java @@ -145,6 +145,7 @@ public void onClick(NPCInteractEvent event) { if (data.isCurrentlyActive(MissionTalkToMolbertAgainAgainAgain.class)) { TypeTheParkLoader.entities.forEach(Entity::updateViewableRule); setDialogue(player, "stuck").thenRun(() -> { + data.endMission(MissionTalkToMolbertAgainAgainAgain.class); NPCOption.sendOption(player, "molbert", false, List.of( new NPCOption.Option( "help", @@ -153,11 +154,10 @@ public void onClick(NPCInteractEvent event) { "HELP MOLBERT", (p) -> { data.endMission(MissionHelpMolbert.class); + TypeTheParkLoader.entities.forEach(Entity::updateViewableRule); } ) )); - if (data.isCurrentlyActive(MissionTalkToMolbertAgainAgainAgain.class)) - data.endMission(MissionTalkToMolbertAgainAgainAgain.class); }); return; } @@ -231,7 +231,7 @@ protected DialogueSet[] dialogues(HypixelPlayer player) { "...and then I ate the §6carrot §fbecause I was almost starving in there!" }).build(), DialogueSet.builder().key("option-iknow").lines(new String[]{ - "§cOf, fine you caught me. But §cplease don't tell the others§f, they wouldn't want to be my friends anymore if they knew the truth.", + "§fOk, fine you caught me. But §cplease don't tell the others§f, they wouldn't want to be my friends anymore if they knew the truth.", "Here, take this §acompensation §ffor all the trouble I made you go through.", "I hope you forgive me after this and we can still be §6friends§f." }).build(), diff --git a/type.thepark/src/main/java/net/swofty/type/thepark/npcs/NPCRomero.java b/type.thepark/src/main/java/net/swofty/type/thepark/npcs/NPCRomero.java index 7e7842d78..357accba8 100644 --- a/type.thepark/src/main/java/net/swofty/type/thepark/npcs/NPCRomero.java +++ b/type.thepark/src/main/java/net/swofty/type/thepark/npcs/NPCRomero.java @@ -16,7 +16,7 @@ public NPCRomero() { super(new HumanConfiguration() { @Override public String[] holograms(HypixelPlayer player) { - return new String[]{}; + return new String[]{" "}; } @Override