From 8b6f79a5eed8e3fabb6970ff3de2919c6571b317 Mon Sep 17 00:00:00 2001 From: Sam Date: Wed, 19 Jul 2017 11:25:55 +0100 Subject: [PATCH] Delay persistence data get --- .../gemhunters/death/quitnpc/QuitNPC.java | 28 +++++++++---------- .../mineplex/gemhunters/join/JoinModule.java | 16 +++++------ 2 files changed, 21 insertions(+), 23 deletions(-) diff --git a/Plugins/mineplex-game-gemhunters/src/mineplex/gemhunters/death/quitnpc/QuitNPC.java b/Plugins/mineplex-game-gemhunters/src/mineplex/gemhunters/death/quitnpc/QuitNPC.java index 0c79be7ef..e3cc6d88e 100644 --- a/Plugins/mineplex-game-gemhunters/src/mineplex/gemhunters/death/quitnpc/QuitNPC.java +++ b/Plugins/mineplex-game-gemhunters/src/mineplex/gemhunters/death/quitnpc/QuitNPC.java @@ -1,19 +1,5 @@ package mineplex.gemhunters.death.quitnpc; -import java.util.UUID; - -import org.bukkit.Location; -import org.bukkit.Material; -import org.bukkit.entity.ArmorStand; -import org.bukkit.entity.Player; -import org.bukkit.entity.Skeleton; -import org.bukkit.event.EventHandler; -import org.bukkit.event.Listener; -import org.bukkit.event.entity.EntityCombustEvent; -import org.bukkit.event.entity.EntityDeathEvent; -import org.bukkit.inventory.ItemStack; -import org.bukkit.inventory.PlayerInventory; - import mineplex.core.Managers; import mineplex.core.common.util.F; import mineplex.core.common.util.UtilEnt; @@ -26,6 +12,19 @@ import mineplex.core.updater.event.UpdateEvent; import mineplex.core.utils.UtilGameProfile; import mineplex.gemhunters.death.event.QuitNPCDespawnEvent; import mineplex.gemhunters.economy.EconomyModule; +import org.bukkit.Location; +import org.bukkit.Material; +import org.bukkit.entity.ArmorStand; +import org.bukkit.entity.Player; +import org.bukkit.entity.Skeleton; +import org.bukkit.event.EventHandler; +import org.bukkit.event.Listener; +import org.bukkit.event.entity.EntityCombustEvent; +import org.bukkit.event.entity.EntityDeathEvent; +import org.bukkit.inventory.ItemStack; +import org.bukkit.inventory.PlayerInventory; + +import java.util.UUID; public class QuitNPC implements Listener { @@ -94,7 +93,6 @@ public class QuitNPC implements Listener return; } - _disguise.undisguise(_disguise.getActiveDisguise(_entity)); _entity.remove(); _hologram.remove(); diff --git a/Plugins/mineplex-game-gemhunters/src/mineplex/gemhunters/join/JoinModule.java b/Plugins/mineplex-game-gemhunters/src/mineplex/gemhunters/join/JoinModule.java index e7bd8f00a..435278517 100644 --- a/Plugins/mineplex-game-gemhunters/src/mineplex/gemhunters/join/JoinModule.java +++ b/Plugins/mineplex-game-gemhunters/src/mineplex/gemhunters/join/JoinModule.java @@ -1,12 +1,5 @@ package mineplex.gemhunters.join; -import java.util.concurrent.TimeUnit; -import java.util.function.Consumer; - -import org.bukkit.entity.Player; -import org.bukkit.event.EventHandler; -import org.bukkit.event.player.PlayerJoinEvent; - import mineplex.core.MiniPlugin; import mineplex.core.ReflectivelyCreateMiniPlugin; import mineplex.core.account.CoreClient; @@ -23,8 +16,14 @@ import mineplex.gemhunters.persistence.PersistenceModule; import mineplex.gemhunters.persistence.PersistenceRepository; import mineplex.gemhunters.quest.QuestModule; import mineplex.gemhunters.spawn.SpawnModule; +import org.bukkit.entity.Player; +import org.bukkit.event.EventHandler; +import org.bukkit.event.player.PlayerJoinEvent; import org.bukkit.inventory.ItemStack; +import java.util.concurrent.TimeUnit; +import java.util.function.Consumer; + @ReflectivelyCreateMiniPlugin public class JoinModule extends MiniPlugin { @@ -88,6 +87,7 @@ public class JoinModule extends MiniPlugin } _inventory.resetSlots(player); + _spawn.teleportToSpawn(player); runAsync(() -> { @@ -97,7 +97,7 @@ public class JoinModule extends MiniPlugin { runSync(() -> _spawn.teleportToSpawn(player)); } - }); + }, 40); } private void loseDurability(ItemStack[] items, long time)