1
0
mirror of https://github.com/GeyserMC/Floodgate.git synced 2025-12-24 01:09:19 +00:00

Oopsieskinfix (#6)

Fix wrong method being called for showing player

Co-authored-by: Tim203 <mctim203@gmail.com>
This commit is contained in:
Camotoy
2020-12-20 05:03:11 -05:00
committed by GitHub
parent dd93b98407
commit 928e5f05b0
2 changed files with 5 additions and 2 deletions

View File

@@ -86,6 +86,7 @@ public final class SpigotSkinApplier implements SkinApplier {
properties.put("textures", property);
if (configHolder.get().isApplySkinDirectly()) {
// By running as a task, we don't run into async issues
plugin.getServer().getScheduler().runTask(plugin, () -> {
for (Player p : Bukkit.getOnlinePlayers()) {
if (p != player && p.canSee(player)) {

View File

@@ -54,6 +54,7 @@ public final class SpigotVersionSpecificMethods {
return player.spigot().getLocale();
}
@SuppressWarnings("deprecation")
public void hidePlayer(Player hideFor, Player playerToHide) {
if (NEW_VISIBILITY) {
hideFor.hidePlayer(plugin, playerToHide);
@@ -62,11 +63,12 @@ public final class SpigotVersionSpecificMethods {
hideFor.hidePlayer(playerToHide);
}
@SuppressWarnings("deprecation")
public void showPlayer(Player showFor, Player playerToShow) {
if (NEW_VISIBILITY) {
showFor.hidePlayer(plugin, playerToShow);
showFor.showPlayer(plugin, playerToShow);
return;
}
showFor.hidePlayer(playerToShow);
showFor.showPlayer(playerToShow);
}
}