Use new boolean

This commit is contained in:
fullwall 2024-09-24 20:02:19 +08:00
parent 7935dd2ab6
commit 8c4cf4a4b4
12 changed files with 20 additions and 20 deletions

View File

@ -58,8 +58,8 @@ public class PlayerlistTrackerEntry extends EntityTrackerEntry {
return;
skinnable.getSkinTracker().updateViewer(entityplayer.getBukkitEntity());
}
Bukkit.getPluginManager().callEvent(
new NPCLinkToPlayerEvent(((NPCHolder) tracker).getNPC(), entityplayer.getBukkitEntity()));
Bukkit.getPluginManager().callEvent(new NPCLinkToPlayerEvent(((NPCHolder) tracker).getNPC(),
entityplayer.getBukkitEntity(), !Bukkit.isPrimaryThread()));
}
}
}

View File

@ -106,8 +106,8 @@ public class PlayerlistTrackerEntry extends EntityTrackerEntry {
public void updateLastPlayer(EntityPlayer lastUpdatedPlayer) {
if (lastUpdatedPlayer != null) {
Bukkit.getPluginManager().callEvent(
new NPCLinkToPlayerEvent(((NPCHolder) tracker).getNPC(), lastUpdatedPlayer.getBukkitEntity()));
Bukkit.getPluginManager().callEvent(new NPCLinkToPlayerEvent(((NPCHolder) tracker).getNPC(),
lastUpdatedPlayer.getBukkitEntity(), !Bukkit.isPrimaryThread()));
}
}

View File

@ -107,8 +107,8 @@ public class PlayerlistTrackerEntry extends EntityTrackerEntry {
public void updateLastPlayer(EntityPlayer lastUpdatedPlayer) {
if (lastUpdatedPlayer != null) {
Bukkit.getPluginManager().callEvent(
new NPCLinkToPlayerEvent(((NPCHolder) tracker).getNPC(), lastUpdatedPlayer.getBukkitEntity()));
Bukkit.getPluginManager().callEvent(new NPCLinkToPlayerEvent(((NPCHolder) tracker).getNPC(),
lastUpdatedPlayer.getBukkitEntity(), !Bukkit.isPrimaryThread()));
}
}

View File

@ -107,8 +107,8 @@ public class PlayerlistTrackerEntry extends EntityTrackerEntry {
public void updateLastPlayer(EntityPlayer lastUpdatedPlayer) {
if (lastUpdatedPlayer != null) {
Bukkit.getPluginManager().callEvent(
new NPCLinkToPlayerEvent(((NPCHolder) tracker).getNPC(), lastUpdatedPlayer.getBukkitEntity()));
Bukkit.getPluginManager().callEvent(new NPCLinkToPlayerEvent(((NPCHolder) tracker).getNPC(),
lastUpdatedPlayer.getBukkitEntity(), !Bukkit.isPrimaryThread()));
}
}

View File

@ -108,8 +108,8 @@ public class PlayerlistTracker extends PlayerChunkMap.EntityTracker {
public void updateLastPlayer(EntityPlayer lastUpdatedPlayer) {
if (lastUpdatedPlayer != null) {
Bukkit.getPluginManager().callEvent(
new NPCLinkToPlayerEvent(((NPCHolder) tracker).getNPC(), lastUpdatedPlayer.getBukkitEntity()));
Bukkit.getPluginManager().callEvent(new NPCLinkToPlayerEvent(((NPCHolder) tracker).getNPC(),
lastUpdatedPlayer.getBukkitEntity(), !Bukkit.isPrimaryThread()));
}
}

View File

@ -108,8 +108,8 @@ public class PlayerlistTracker extends PlayerChunkMap.EntityTracker {
public void updateLastPlayer(EntityPlayer lastUpdatedPlayer) {
if (lastUpdatedPlayer != null) {
Bukkit.getPluginManager().callEvent(
new NPCLinkToPlayerEvent(((NPCHolder) tracker).getNPC(), lastUpdatedPlayer.getBukkitEntity()));
Bukkit.getPluginManager().callEvent(new NPCLinkToPlayerEvent(((NPCHolder) tracker).getNPC(),
lastUpdatedPlayer.getBukkitEntity(), !Bukkit.isPrimaryThread()));
}
}

View File

@ -108,8 +108,8 @@ public class PlayerlistTracker extends PlayerChunkMap.EntityTracker {
public void updateLastPlayer(EntityPlayer lastUpdatedPlayer) {
if (lastUpdatedPlayer != null) {
Bukkit.getPluginManager().callEvent(
new NPCLinkToPlayerEvent(((NPCHolder) tracker).getNPC(), lastUpdatedPlayer.getBukkitEntity()));
Bukkit.getPluginManager().callEvent(new NPCLinkToPlayerEvent(((NPCHolder) tracker).getNPC(),
lastUpdatedPlayer.getBukkitEntity(), !Bukkit.isPrimaryThread()));
}
}

View File

@ -38,7 +38,7 @@ public class PlayerlistTracker extends ChunkMap.TrackedEntity {
boolean res = super.add(conn);
if (res) {
Bukkit.getPluginManager().callEvent(new NPCLinkToPlayerEvent(((NPCHolder) tracker).getNPC(),
conn.getPlayer().getBukkitEntity()));
conn.getPlayer().getBukkitEntity(), !Bukkit.isPrimaryThread()));
}
return res;
}

View File

@ -38,7 +38,7 @@ public class PlayerlistTracker extends ChunkMap.TrackedEntity {
boolean res = super.add(conn);
if (res) {
Bukkit.getPluginManager().callEvent(new NPCLinkToPlayerEvent(((NPCHolder) tracker).getNPC(),
conn.getPlayer().getBukkitEntity()));
conn.getPlayer().getBukkitEntity(), !Bukkit.isPrimaryThread()));
}
return res;
}

View File

@ -38,7 +38,7 @@ public class CitizensEntityTracker extends ChunkMap.TrackedEntity {
boolean res = super.add(conn);
if (res) {
Bukkit.getPluginManager().callEvent(new NPCLinkToPlayerEvent(((NPCHolder) tracker).getNPC(),
conn.getPlayer().getBukkitEntity()));
conn.getPlayer().getBukkitEntity(), !Bukkit.isPrimaryThread()));
}
return res;
}

View File

@ -38,7 +38,7 @@ public class CitizensEntityTracker extends ChunkMap.TrackedEntity {
boolean res = super.add(conn);
if (res) {
Bukkit.getPluginManager().callEvent(new NPCLinkToPlayerEvent(((NPCHolder) tracker).getNPC(),
conn.getPlayer().getBukkitEntity()));
conn.getPlayer().getBukkitEntity(), !Bukkit.isPrimaryThread()));
}
return res;
}

View File

@ -105,8 +105,8 @@ public class PlayerlistTrackerEntry extends EntityTrackerEntry {
public void updateLastPlayer(EntityPlayer lastUpdatedPlayer) {
if (lastUpdatedPlayer != null) {
Bukkit.getPluginManager().callEvent(
new NPCLinkToPlayerEvent(((NPCHolder) tracker).getNPC(), lastUpdatedPlayer.getBukkitEntity()));
Bukkit.getPluginManager().callEvent(new NPCLinkToPlayerEvent(((NPCHolder) tracker).getNPC(),
lastUpdatedPlayer.getBukkitEntity(), !Bukkit.isPrimaryThread()));
lastUpdatedPlayer = null;
}
}