Been here at Bukkit for over 2 years now, and I have loved every bit of it.
Thanks to everyone that has made it such a great experience to be...
Or instead of looping through all the offline players you could just use:
This is why it isn't default.
Sorry about the late reply.
Can you paste your CustomEntitySkeleton class.
It's the constructor from the tutorial.. I just copied and pasted it here.
Missing the constructor
private CustomEntityType(String name, int id, EntityType entityType, Class<? extends EntityInsentient>...
Your not even listening to me now and that is clearly evident. I have told you the line number in the code you have posted on what...
Your still casting the player to the sender without checking first on line 3. This will throw a ClassCastException is the sender...
Yes that is the check you need to-do before casting the Player to the sender.
I really don't think you need an example as you have done an instance of check further down in your code. But here you go anyway....
You need to check if the variable sender from the parameter is an instance of a Player before you cast a Player to it. Also why are...
The third line in the code you pasted you cast the Player to the sender. So your instance of check further down is useless by that...
Assigning a value to a variable has nothing todo whether you used a scheduler before or not. It's the very basic's of java. Like said above...
"This code won't work" is a very broad statement. Was there any errors in the console? Did you register the event?
Yeah I see that now. When I edited my post it was right after I posted and saw the post above mine using Action.Physical in it. Then...
Having one of us just re-write your code to make it work isn't going to help you learn.
Paste the stack trace with the NPE's and we...
For what you are doing wrong both me and artish1 have told you what you need to fix.
If your still not to sure about HashMaps:...
Use the Action.PHYSICAL in your player interact event to see if they stepped on a pressure plate.
Edit: ninja'd by bobacadodl
Separate names with a comma.