Imanity-Software / ImanitySpigot3-git

Thee Issue Tracker for ImanitySpigot3
2 stars 0 forks source link

Invisible Players with Bolt Practice #237

Closed serumanooo closed 3 days ago

serumanooo commented 2 weeks ago

Expected behavior

I expect the player to be visible, since it never happened before I switched to ImanitySpigot.

Observed/Actual behavior

It looks like chunks take 1-2 seconds to load and then you cant see your opponent.

Steps/models to reproduce

There is no specific way to reproduce it, its just random.

Plugin list

ImanitySpigot3 version

2024.06.1 BUILD 5

Agreements

Other

Here is a video showing the bug: https://youtu.be/P6hDzTkilsY It doesnt happen all the time, and I dont believe its exactly a chunk issue, cuz the chunks load just fine for the other player, it never happens for both players at the same time. I also tried changing Imanity settings, and no matter what I change on it, I cant fix the bug. I tested with other spigot and it didnt happen.

Xefreh commented 2 weeks ago

Have you ever tried to disable async chunk generation/loading or disable async entity tracker ?

serumanooo commented 1 week ago

Have you ever tried to disable async chunk generation/loading or disable async entity tracker ?

Yeah, as I said in the post, I tried changing a lot of config options, none of them fixed the issue

serumanooo commented 1 week ago

Idk if this other bug is related to the one in the post, but this also happens when the server is using ImanitySpigot: https://youtu.be/CCSJ0GUMlwY This used to happen with CarbonSpigot and was fixed some months ago. It was related to async entity tracker or something like that

Fluid4321 commented 4 days ago

Same issue.

Xefreh commented 4 days ago

Hi, so I tested using a small code to try if vanishing players had an issue on ispigot but I've not found any. my code:

package fr.xefreh.testvanish;

import org.bukkit.Bukkit;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import org.bukkit.plugin.java.JavaPlugin;

import java.util.*;

public class Main extends JavaPlugin implements CommandExecutor {
    public static final Map<UUID, List<UUID>> hidingMap = new HashMap<>();

    @Override
    public void onEnable() {
        this.getCommand("vanish").setExecutor(this);
    }

    @Override
    public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
        if (args.length == 1) {
            if (sender instanceof Player) {
                Player player = (Player) sender;
                Player target = Bukkit.getPlayer(args[0]);
                if (target != null && target != player) {
                    if (hidingMap.get(player.getUniqueId()) == null) {
                        hidingMap.put(player.getUniqueId(), new ArrayList<>(Collections.singleton(target.getUniqueId())));
                        sender.sendMessage("hiding player " + target.getName());
                        player.hidePlayer(target);
                    } else if (hidingMap.get(player.getUniqueId()).contains(target.getUniqueId())) {
                        hidingMap.get(player.getUniqueId()).remove(target.getUniqueId());
                        sender.sendMessage("showing player " + target.getName());
                        player.showPlayer(target);
                    } else {
                        hidingMap.get(player.getUniqueId()).add(target.getUniqueId());
                        sender.sendMessage("hiding player " + target.getName());
                        player.hidePlayer(target);
                    }
                }
            }
            return true;
        }
        return false;
    }
}
Xefreh commented 4 days ago

maybe bolt assumes that if a player is dead, it doesn't need to showPlayer again.

LeeGodSRC commented 3 days ago

Not ImanitySpigot3 issue, confirmed by Bolt developer.