Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NickDisguiseEvent and SkinDisguiseEvent #25

Closed
SpraxDev opened this issue Jul 18, 2016 · 1 comment
Closed

NickDisguiseEvent and SkinDisguiseEvent #25

SpraxDev opened this issue Jul 18, 2016 · 1 comment
Labels

Comments

@SpraxDev
Copy link

What steps will reproduce the problem?

@eventhandler
private void onDebug(NickDisguiseEvent e) {
Bukkit.broadcastMessage("called NickDisguiseEvent (" + e.getPlayer().getName() + ")");
}
//same with SkinDisguiseEvent

What were you expecting to happen? What happened instead?

only call Event when PlayerJoin, /nick
but called randomly
When standing AFK and alone on the Server it will Spam youre Chat (you have to be nicked)

What version of the plugin are you using? Type /version <Plugin Name>

NickNamer version 3.12.2
Author: inventivetalent

What Spigot version are you using? Type /version

This server is running CraftBukkit version git-Spigot-db6de12-18fbb24 (MC: 1.8.8) (Implementing API version 1.8.8-R0.1-SNAPSHOT)

What plugins are you using? Type /plugins

Plugins (8): PermissionsEx, EmptyWorldGenerator, ServerUtils, PacketListenerApi, ProtocolLib, NoCheatPlus, NickNamer, LobbyHandler

Do you have an error log? Use pastebin.com. If you're not sure, upload your whole server log

no error

Did your client crash? Upload errors in .minecraft/logs/latest.log as well

didn't crash

Additional information? (Are you using Bungeecord? Did it work in previous versions? etc.)

same informationen from last two issues

@InventivetalentDev
Copy link
Owner

It's not called randomly. It's called every time the name/skin packet is sent to a player, which is done by the server every few seconds. The event doesn't notify plugins about players using the commands, but about outgoing update packets.
That's why the example code sets the nick/skin every time the event is called:

@EventHandler
public void on(NickDisguiseEvent event) {
    event.setNick("inventivetalent");
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants