some review

This commit is contained in:
Konicai 2024-06-10 23:39:21 -05:00
parent ffb8256899
commit 6159799804
4 changed files with 8 additions and 13 deletions

View file

@ -77,8 +77,7 @@ public interface CommandSource {
* @return a GeyserConnection if this source represents a Bedrock player that is connected
* to this Geyser instance, otherwise null
*/
@Nullable
GeyserConnection connection();
@Nullable GeyserConnection connection();
/**
* Returns the locale of the command source.

View file

@ -66,7 +66,6 @@ import org.geysermc.geyser.platform.spigot.world.manager.GeyserSpigotWorldManage
import org.geysermc.geyser.text.GeyserLocale;
import org.geysermc.geyser.util.FileUtils;
import org.incendo.cloud.bukkit.BukkitCommandManager;
import org.incendo.cloud.bukkit.CloudBukkitCapabilities;
import org.incendo.cloud.execution.ExecutionCoordinator;
import org.incendo.cloud.paper.LegacyPaperCommandManager;
@ -172,7 +171,7 @@ public class GeyserSpigotPlugin extends JavaPlugin implements GeyserBootstrap {
);
LegacyPaperCommandManager<GeyserCommandSource> cloud;
try {
// LegacyPaperCommandManager works for spigot too. todo: use PaperCommandManager instead for Paper 1.20.6+
// LegacyPaperCommandManager works for spigot too, see https://cloud.incendo.org/minecraft/paper
cloud = new LegacyPaperCommandManager<>(
this,
ExecutionCoordinator.simpleCoordinator(),
@ -182,14 +181,13 @@ public class GeyserSpigotPlugin extends JavaPlugin implements GeyserBootstrap {
throw new RuntimeException(e);
}
if (cloud.hasCapability(CloudBukkitCapabilities.BRIGADIER)) {
try {
// Should always be available on 1.13 and up
// Commodore brigadier on Spigot/Paper 1.13 - 1.18.2
// Paper-only brigadier on 1.19+
cloud.registerBrigadier();
} catch (BukkitCommandManager.BrigadierInitializationException e) {
geyserLogger.debug("Failed to initialize Brigadier support: " + e.getMessage());
}
}
this.commandRegistry = new SpigotCommandRegistry(geyser, cloud);

View file

@ -35,7 +35,6 @@ import java.util.Map;
* Permissions related to Geyser
*/
public final class Permissions {
private static final Map<String, TriState> PERMISSIONS = new HashMap<>();
public static final String CHECK_UPDATE = register("geyser.update");

View file

@ -39,7 +39,6 @@ import java.util.Collections;
import java.util.List;
public abstract class GeyserCommand implements org.geysermc.geyser.api.command.Command {
public static final String DEFAULT_ROOT_COMMAND = "geyser";
/**