mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2024-11-23 19:16:34 +01:00
Delay calculating skin updates a bit, partially fixes the skin issue!
This commit is contained in:
parent
62c6b724df
commit
8a52f81ae5
@ -280,7 +280,10 @@ public class EventListen implements Listener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
|
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
|
||||||
public void onPlayerJoin(PlayerJoinEvent event) {
|
public void onPlayerJoin(final PlayerJoinEvent event) {
|
||||||
|
new BukkitRunnable() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
final Player player = event.getPlayer();
|
final Player player = event.getPlayer();
|
||||||
final List<EntityPlayer> nearbyNPCs = new ArrayList<EntityPlayer>();
|
final List<EntityPlayer> nearbyNPCs = new ArrayList<EntityPlayer>();
|
||||||
for (NPC npc : getAllNPCs()) {
|
for (NPC npc : getAllNPCs()) {
|
||||||
@ -294,13 +297,16 @@ public class EventListen implements Listener {
|
|||||||
public void run() {
|
public void run() {
|
||||||
sendToPlayer(player, nearbyNPCs);
|
sendToPlayer(player, nearbyNPCs);
|
||||||
}
|
}
|
||||||
}.runTaskLater(CitizensAPI.getPlugin(), 40);
|
}.runTaskLater(CitizensAPI.getPlugin(), 30);
|
||||||
new BukkitRunnable() {
|
new BukkitRunnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
sendToPlayer(player, nearbyNPCs);
|
sendToPlayer(player, nearbyNPCs);
|
||||||
}
|
}
|
||||||
}.runTaskLater(CitizensAPI.getPlugin(), 80);
|
}.runTaskLater(CitizensAPI.getPlugin(), 70);
|
||||||
|
}
|
||||||
|
}.runTaskLater(CitizensAPI.getPlugin(), 10);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void sendToPlayer(final Player player, final List<EntityPlayer> nearbyNPCs) {
|
void sendToPlayer(final Player player, final List<EntityPlayer> nearbyNPCs) {
|
||||||
|
Loading…
Reference in New Issue
Block a user