mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2024-11-04 01:39:54 +01:00
Merge branch 'master' of https://github.com/CitizensDev/Citizens2 into skins2-2
This commit is contained in:
commit
f0d6843867
@ -553,6 +553,19 @@ public class NMS {
|
|||||||
((CraftServer) Bukkit.getServer()).getHandle().players.remove(handle);
|
((CraftServer) Bukkit.getServer()).getHandle().players.remove(handle);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void addOrRemoveFromPlayerList(org.bukkit.entity.Entity entity, boolean remove) {
|
||||||
|
if (entity == null)
|
||||||
|
return;
|
||||||
|
EntityHuman handle = (EntityHuman) getHandle(entity);
|
||||||
|
if (handle.world == null)
|
||||||
|
return;
|
||||||
|
if (remove) {
|
||||||
|
handle.world.players.remove(handle);
|
||||||
|
} else if (!handle.world.players.contains(handle)) {
|
||||||
|
handle.world.players.add(handle);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@SuppressWarnings("rawtypes")
|
@SuppressWarnings("rawtypes")
|
||||||
public static void replaceTrackerEntry(Player player) {
|
public static void replaceTrackerEntry(Player player) {
|
||||||
WorldServer server = (WorldServer) NMS.getHandle(player).getWorld();
|
WorldServer server = (WorldServer) NMS.getHandle(player).getWorld();
|
||||||
|
Loading…
Reference in New Issue
Block a user