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

hook.getBannedPlayer(), hook.getKickingPlayer() nullpointerexception. #151

Open
svdragster opened this issue Nov 13, 2013 · 3 comments
Open

Comments

@svdragster
Copy link

BanHook
http://pastebin.com/hVrVX5u1

KickHook:
http://pastebin.com/QXYZ1ABt

Removing the line from the code makes the whole thing work again.

@WWOL
Copy link
Member

WWOL commented Nov 14, 2013

I'm not sure what you mean here.
When you use hook.getBannedPlayer() does that throw the NPE (indicating hook == null) or is the player returned null?

Also KickHook has no method getKickingPlayer(). Looking for getModerator() maybe?
Also also, getBannedPlayer() docs, "@return banned if not ipban, null otherwise". Is it an IP ban.
WWOL

@svdragster
Copy link
Author

Even though I double checked using the right canaryLib, it was still rc2. So the getKickingPlayer was changed to getModerator like in the ban hook.

But still the getBannedPlayer() returns null, also it's no ipban.

@WWOL
Copy link
Member

WWOL commented Nov 15, 2013

OK, I'll have a quick look.

WWOL

EDIT: If the player isn't online then there is no player instance so getBannedPlayer() will be null.
If the player is online then it should work fine as the rest of the code that uses the player instance is working (IE player != null)

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

No branches or pull requests

2 participants