#httpspaste md 5 netyocibuniqa java
1 messages · Page 1 of 1 (latest)
k
are u using intellij?
I have 2 other classes that I know work as I have tested them
Don't return BasketballMode in the command
no
just return false
ok
and you never actually registered the command
getCommand("whatever your command is").setExecutor(this);
In the onEnabled()
Send me the other classes too
ok
pretty sure that's a command
lemme try it
how 💀
if (event.getEntity() instanceof Player player) {
Main.HasBall = player.getUniqueId();
}
I want the shooter though
I already know how to get the entity
but you cannot get the UUID of a shooter
event.getShooter() is just an entity
under a different method name
it still returns an entity
if you put .get the only other thing that comes up is .getClass
therefore you can cast it the same way
if (event.getShooter() instanceof Player player) {
Main.HasBall = player.getUniqueId();
}
where would I put that?
Look I'm going to be completely honest with you, this is a horrible plugin idea if you're just learning how to code. I highly recommend making something simple like /fly or /feed, then start working up the difficulty slowly.
I figured that shit out