Delay persistence data get

This commit is contained in:
Sam 2017-07-19 11:25:55 +01:00 committed by cnr
parent 8516a98087
commit 8b6f79a5ee
2 changed files with 21 additions and 23 deletions

View File

@ -1,19 +1,5 @@
package mineplex.gemhunters.death.quitnpc; 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.Managers;
import mineplex.core.common.util.F; import mineplex.core.common.util.F;
import mineplex.core.common.util.UtilEnt; import mineplex.core.common.util.UtilEnt;
@ -26,6 +12,19 @@ import mineplex.core.updater.event.UpdateEvent;
import mineplex.core.utils.UtilGameProfile; import mineplex.core.utils.UtilGameProfile;
import mineplex.gemhunters.death.event.QuitNPCDespawnEvent; import mineplex.gemhunters.death.event.QuitNPCDespawnEvent;
import mineplex.gemhunters.economy.EconomyModule; 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 public class QuitNPC implements Listener
{ {
@ -94,7 +93,6 @@ public class QuitNPC implements Listener
return; return;
} }
_disguise.undisguise(_disguise.getActiveDisguise(_entity));
_entity.remove(); _entity.remove();
_hologram.remove(); _hologram.remove();

View File

@ -1,12 +1,5 @@
package mineplex.gemhunters.join; 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.MiniPlugin;
import mineplex.core.ReflectivelyCreateMiniPlugin; import mineplex.core.ReflectivelyCreateMiniPlugin;
import mineplex.core.account.CoreClient; import mineplex.core.account.CoreClient;
@ -23,8 +16,14 @@ import mineplex.gemhunters.persistence.PersistenceModule;
import mineplex.gemhunters.persistence.PersistenceRepository; import mineplex.gemhunters.persistence.PersistenceRepository;
import mineplex.gemhunters.quest.QuestModule; import mineplex.gemhunters.quest.QuestModule;
import mineplex.gemhunters.spawn.SpawnModule; 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 org.bukkit.inventory.ItemStack;
import java.util.concurrent.TimeUnit;
import java.util.function.Consumer;
@ReflectivelyCreateMiniPlugin @ReflectivelyCreateMiniPlugin
public class JoinModule extends MiniPlugin public class JoinModule extends MiniPlugin
{ {
@ -88,6 +87,7 @@ public class JoinModule extends MiniPlugin
} }
_inventory.resetSlots(player); _inventory.resetSlots(player);
_spawn.teleportToSpawn(player);
runAsync(() -> runAsync(() ->
{ {
@ -97,7 +97,7 @@ public class JoinModule extends MiniPlugin
{ {
runSync(() -> _spawn.teleportToSpawn(player)); runSync(() -> _spawn.teleportToSpawn(player));
} }
}); }, 40);
} }
private void loseDurability(ItemStack[] items, long time) private void loseDurability(ItemStack[] items, long time)