Fix Java 8 API compatibility
This commit is contained in:
5 files changed
+21
-7
No files matched your search
@@ -25,6 +25,7 @@
|
||||
*/
|
||||
package com.github.games647.fastlogin.bukkit;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import me.clip.placeholderapi.expansion.PlaceholderExpansion;
|
||||
@@ -49,7 +50,7 @@ public class PremiumPlaceholder extends PlaceholderExpansion {
|
||||
|
||||
@Override
|
||||
public @NotNull List<String> getPlaceholders() {
|
||||
return List.of(PLACEHOLDER_VARIABLE);
|
||||
return Collections.singletonList(PLACEHOLDER_VARIABLE);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+1
-1
@@ -81,7 +81,7 @@ public abstract class ToggleCommand implements CommandExecutor {
|
||||
plugin.getBungeeManager().sendPluginMessage((PluginMessageRecipient) invoker, message);
|
||||
} else {
|
||||
Optional<? extends Player> optPlayer = Bukkit.getServer().getOnlinePlayers().stream().findFirst();
|
||||
if (optPlayer.isEmpty()) {
|
||||
if (!optPlayer.isPresent()) {
|
||||
plugin.getLog().info("No player online to send a plugin message to the proxy");
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user