简体   繁体   中英

How does the Event-API of “Spigot / Bukkit” work?

Iam trying to understand, how object-oriented programming in Java works. Herefor I thougth the Spigot-API would be a very nice example.

For everyone, who doesnt know spigot : Its an API for making minecraft plugins.

I reached the point, where I understood quite a few things, but now I´m stuck on "Eventlistener". There is an Event-API in Spigot for this : https://www.spigotmc.org/wiki/using-the-event-api/

This page explains how to use listeners. But how is it possible, to implement an whole Interface without all methods and not to use the @Override annotation ?

It's an interface to tag all listeners.

It doesn't contain any methods so there is nothing to override.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM