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:
@@ -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)) {
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user