Add Override annotations where appropriate

By: md_5 <git@md-5.net>
This commit is contained in:
Bukkit/Spigot
2019-04-28 11:37:52 +10:00
parent d66310a2f1
commit 82854b7bd7
176 changed files with 503 additions and 0 deletions

View File

@@ -24,11 +24,13 @@ public class InactivityConversationCanceller implements ConversationCanceller {
this.timeoutSeconds = timeoutSeconds;
}
@Override
public void setConversation(@NotNull Conversation conversation) {
this.conversation = conversation;
startTimer();
}
@Override
public boolean cancelBasedOnInput(@NotNull ConversationContext context, @NotNull String input) {
// Reset the inactivity timer
stopTimer();
@@ -36,6 +38,7 @@ public class InactivityConversationCanceller implements ConversationCanceller {
return false;
}
@Override
@NotNull
public ConversationCanceller clone() {
return new InactivityConversationCanceller(plugin, timeoutSeconds);
@@ -46,6 +49,7 @@ public class InactivityConversationCanceller implements ConversationCanceller {
*/
private void startTimer() {
taskId = plugin.getServer().getScheduler().scheduleSyncDelayedTask(plugin, new Runnable() {
@Override
public void run() {
if (conversation.getState() == Conversation.ConversationState.UNSTARTED) {
startTimer();