mirror of
https://github.com/GeyserMC/Geyser.git
synced 2024-08-14 23:57:35 +00:00
Spigot: programmatically add Geyser permissions and fix reloading
This commit is contained in:
parent
05e98c3a10
commit
f38c1fbc0f
8 changed files with 67 additions and 35 deletions
|
@ -86,4 +86,13 @@ public abstract class GeyserCommand {
|
|||
public boolean isBedrockOnly() {
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Used for permission defaults on server implementations.
|
||||
*
|
||||
* @return if this command is designated to be used only by server operators.
|
||||
*/
|
||||
public boolean isSuggestedOpOnly() {
|
||||
return false;
|
||||
}
|
||||
}
|
|
@ -145,4 +145,9 @@ public class DumpCommand extends GeyserCommand {
|
|||
public List<String> getSubCommands() {
|
||||
return Arrays.asList("offline", "full", "logs");
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isSuggestedOpOnly() {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -51,4 +51,9 @@ public class ListCommand extends GeyserCommand {
|
|||
|
||||
sender.sendMessage(message);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isSuggestedOpOnly() {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -54,4 +54,9 @@ public class ReloadCommand extends GeyserCommand {
|
|||
geyser.getSessionManager().disconnectAll("geyser.commands.reload.kick");
|
||||
geyser.reload();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isSuggestedOpOnly() {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -54,4 +54,9 @@ public class StopCommand extends GeyserCommand {
|
|||
|
||||
geyser.getBootstrap().onDisable();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isSuggestedOpOnly() {
|
||||
return true;
|
||||
}
|
||||
}
|
|
@ -100,4 +100,9 @@ public class VersionCommand extends GeyserCommand {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isSuggestedOpOnly() {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue