Banish all use of Optionals from Velocity entirely

This commit is contained in:
Andrew Steinborn
2021-05-13 04:35:50 -04:00
parent 6cd3b00428
commit 14be98c88c
8 changed files with 37 additions and 45 deletions

View File

@@ -7,7 +7,7 @@
package com.velocitypowered.api.plugin;
import java.util.Optional;
import org.checkerframework.checker.nullness.qual.Nullable;
/**
* A wrapper around a plugin loaded by the proxy.
@@ -26,7 +26,7 @@ public interface PluginContainer {
*
* @return the instance if available
*/
default Optional<?> instance() {
return Optional.empty();
default @Nullable Object instance() {
return null;
}
}