Delete Entry from SQL-Table and confirm the deletion to a CommandSender in a spigot plugin
Regarding your questions:


Is an early return better for the first method? Or is it just a question of personal taste?


The alternative you suggest would be:
private void deleteMessage(CommandSender sender, int messageId) {
    int deleted = DatabaseMethods.deleteMessage(messageId);
    if (deleted == 0) {
        sender.sendMessage(MessageManager.couldNotBeFound(messageId));
        return;
    } 
    sender.sendMessage(MessageManager.deletedMessage(messageId));
}

I generally don't recommend it. A developer might delete the empty return thinking it's unnecessary causing a bug. The if-else is more readable in my opinion.


Can the SQL-handling be improved? Should maybe the method return a boolean instead of an int?


If the delete operation can return only 0 or 1, then it should be a boolean. However, there are more than two outcomes: the database is down, the database call times out, etc. &quot;Message not found&quot; is just one of the reasons for deleteMessage to return 0. So instead of MessageManager.couldNotBeFound(messageId)), would be more appropriate to say &quot;message cannot be deleted&quot;.
To tell the user &quot;message not found&quot;, you can let the second method throw the exception and catch it in the first method.
One more thing, from the method signature is not clear why deleteMessage(CommandSender sender, int messageId) needs a CommandSender, a better name can be deleteMessageAndNotify.