Skip to content
Advertisement

error: Class is not abstract and does not override abstract method

Well, I’m trying to compile a java plugin for Bukkit/Spigot, but I’m getting the following error:

JavaScript

The respective parts of the file where’s the error (I mean):

JavaScript

And this:

JavaScript

The plugin ins’t mine, but I need to compile with the correct version of spigot. The problem is that I don’t know much about java to solve this error. Can anyone help me?

Advertisement

Answer

If you want to understand the concept then read the whole answer else go to the end and read the block quote for the solution.

An interface in java as its name suggests is just an interface. If we go specifically in java’s perspective. Interface are classes with functions declared but not implemented. So when some other class implements that interface that class has to implement all the functions of interface also along with its own functions.

For example

This is an interface in java

JavaScript

This is a class implementing it

JavaScript

The only rule you should remember when a class implement an interface it has to implement all of the declared functions in interface.

In your code you have already implemented sendMessage and sendRawMessage. Now to remove the error you only have to implement ‘sendTitle’ as shown in the error.

Advertisement