I personally think you could have somethin (vaguely) similar to a stacktrace.
You could have something like
public class PlayerDisconnectedEvent extends Event {
protected Event triggeringEvent;
public Event getTriggeringEvent() {
return this.triggeringEvent; //which would be the kick event
}
protected void setTriggeringEvent(Event trigger) {
this.triggeringEvent= trigger;
}
//Note that the property and it's getter and setter should be defined in Event and inherited.
}
That way, you could explore through events and see the cause for diconnecting, then getting the cause event for kicking and so on and so forth.
I didn’t really got the plugins.
Guess sponge will need special plugins made for it, or basic plugins already made will work?
Also good luck with the release.
Bukkit plugins are made using Bukkit’s API.
For Sponge, you’ll need plugins made using Sponge’s API.
You can still have the same plugins you had over at Bukkit, but they will have to be ported over to Sponge before you can use them.
This caught my eye and made me laugh because I do the exact same thing with my private plugins! One of my plugins is currently in version “Comedic Kangaroo”
I know you guys are rewriting the code. But how long do you think it will take to update to 1.8. And i was Woundering how i might apply to help Develop the new Api?
All and all good luck to you. Can’t white tell i can use the api!
PlayerQuitEvent in Bukkit, is ALWAYS fired whenever a player leaves the game. That is good, the PlayerKickEvent gets fired ONLY if the player was kicked. If you’re trying to do some player-leave-the-server code, then only listen for PlayerQuitEvent, but you’d listen for PlayerKickEvent if you actually cared about the kick, for example, the kick message.