Minecraft PlayJoinEvent?

pr
14

My playerjoinevent does not start:

@EventHandler
public void PlayerJoin (PlayerLoginEvent event) {
Player e = event.getPlayer ();
[…]

No error message, nothing

I'm currently programming for version 1.10

Lu

Event registered?

Lu

And is not it "PlayerJoinEvent"? Do not program with Java / MC for a long time

pr

How do I register the event? ^^

Ma

There's missing on the one hand an "on".

Has the event been registered?

pr

How do I register the event? ^^

Ma

In onEnable:

getServer (). GetPluginManager (). RegisterEvents (new classname (), this);

pr

And in class name then "PlayerJoin"?

Ma

No. The name of the class the event is in.

pr

I have it all in the same class: main.java ^^

ta

Where is an "on" missing?

pr

Did that change from: PlayerJoin (PlayerLoginEvent event) {

on PlayerJoin (PlayerJoinEvent event)

Ma

Then it would be this / new main class instead of the class

ta

I can write too

@EventHandler
public void I PurchaseBook (PlayerJoinEvent e) {}

Lu

That's a basic element.