Minecraft Vanish Plugin Coden in 1.16.5?

Pl
- in Plugins
14

I'm currently coding a Vanish plugin but since the newer versions have changed it with the hideplayer / showplayer, I currently have a problem so I don't know what to add that I go to the Vanish, I hope you could help somehow

I have the problem with:

for (Player all: Bukkit.getOnlinePlayers ()) {
all.showPlayer (plugin, player);

for (Player all: Bukkit.getOnlinePlayers ()) {
all.hidePlayer (plugin, player);

Minecraft Vanish Plugin Coden in 1.16.5
Es

I think you have to do it now via the player interface.

https://hub.spigotmc.org/...ity.Player

Di

The plugin needs to be your main class that inherits from JavaPlugin. The easiest way to get it is with Hauptklasse.getPlugin (Hauptklasse.class), you have to change the name of course.

The player is the player you want to hide or show, you have already saved it under the variable name "p" (which should be changed because it is not meaningful).

Pl

And how does it work exactly?

Pl

So have now packed it in the main class

you mean it right?

Di

Unfortunately I can't see your change

Pl

I have inserted the code for the vanish command in the main, I have not done more

Screenshot 1:

Screenshot 2:

what do I have to change right now?

Di

Replace player with p and write "this" instead of plugin (without quotation marks). I just don't know how you came up with it, because I didn't write that. Basically, you should divide different parts of the plugin into different classes.

Pl

Have now made the Vanish code into an extra class and changed it as you described it, but now I get an error message in the console when I run the code

Screenshot console:

Screenshot intellij

Pl

I also added the code

Plugins.getPlugin (Plugins.class);

now it looks exactly like this:

but the error message in the console is still displayed

Es
Pl

The problem is I don't know how to use it, that's the problem

Di

Instead of this "(Plugin) this" you should write "Plugins.getPlugin (Plugins.class)".

Pl

I say thank you for your help

Ed

Just download a plugin.

Minecraft Vanish? bo bookletKaput