This site works best with JavaScript enabled. Please enable JavaScript to get the best experience from this site.
No errors or anything. Works great other than It keeps giving out the book every time you rejoin the server. It also deletes anything you are holding in your 1st slot.
Same problem here. All players are getting a rulebook every time they join.
The same player is getting his name added to hasread.txt every time they join as well.
I would use hasread.txt exclusively instead of relying on .hasPlayedBefore, I've never had good luck with it.
So do I. There are tons of users that find their first inv slot replaced by the book!
Yeah same issue. After a server restart if a person has been given it though they no longer get spammed with them.
The problem is that it does not update the list of users who have already read it as it goes. It only reads that in when it is enabled. It updates the file when it gives it to new people but i never updates the variable that holds all this info.
It's an easy fix.
When he updates hasread.txt in the onPlayerJoin event he needs to update the "received" variable.
received.add(event.getPlayer().getName())
To post a comment, please login or register a new account.