Befehle und Rechte
Warnung
These docs have not been fully updated to SpongeAPI 8 and may be out of date. If you feel like you can help update them, please submit a PR!
Befehle stellen eine Möglichkeit da um Server zu administrieren und Spieler mit dem Server interagieren zu lassen.
In Sponge werden Befehle durch ein Rechtesystem verwaltet (englisch permission management). Rechte erlauben es Serverbetreibern festzulegen wer was darf (und was nicht!). Standardmäßig wird Spielern mit Operator Status das Ausführen alle Befehle erlaubt. Spieler ohne Operator Status haben keinen Zugriff auf administrative Befehle oder Befehle für die bestimmte Rechte vergeben sein müssen. Der Serverbetreiber kann durch das Vergeben von Berechtigungen, mit Hilfe eines passenden Plugins, Feineinstellungen vornehmen.
Bemerkung
Sponge ist kein Rechteverwaltungssystem. Um Rechte an einzelne Spieler oder Gruppen zu geben oder entziehen wird ein entsprechendes Plugin benötigt.
Operator Befehle
Diese Befehle sind, zusätzlich zu den normalen Befehlen für Spieler, für Server Moderatoren (englisch operator) verfügbar.
Sponge
Diese Befehle sind für Spieler mit Operator Status oder einer gleichwertigen Berechtigung, auf Servern die Sponge einsetzen, verfügbar.
Befehl |
Beschreibung |
Berechtigung |
|---|---|---|
/sponge audit |
Erzwingt das Laden von ungeladenen Klassen um Mixin Debugging zu aktivieren. |
sponge.command.audit |
/sponge chunks |
Gibt die Chunk-Informationen für eine Welt, eine Dimension oder global aus. |
sponge.command.chunk |
/sponge heap |
Gibt den dynamischen Speicher (englisch heap) der JVM aus. |
sponge.command.heap |
/sponge mods |
Lists currently installed forge mods. (SpongeForge only) |
sponge.command.mods |
/sponge info |
Shows the type and some additional information about the block or entity you are looking at. |
sponge.command.info |
/sponge plugins list |
Lists currently installed Sponge plugins. |
sponge.command.plugins.list |
/sponge plugins refresh |
Stößt die Plugin-Eigenen Prozeduren an, sich selbst neu zu laden. |
sponge.command.plugins.refresh |
/sponge plugins info |
Provides information relating to the provided plugin |
sponge.command.plugins.info |
/sponge reload global |
Reloads the global config |
sponge.command.reload.global |
/sponge reload world |
Reloads the world config |
sponge.command.reload.world |
/sponge tps |
Zeigt die Ticks pro Sekunde für jede Welt an. |
sponge.command.tps |
/sponge version |
Gibt die Versionen von der verwendeten Spongeimplementierung und der Sponge-API in der Konsole aus. |
sponge.command.version |
/sponge which |
Prints which plugin provided the command, it’s aliases and alternatives. |
sponge.command.which |
/sponge:callback |
Internally used for callback actions on
|
|
/sponge:pagination |
Internally used for callback actions on
|
Sponge Befehlsparameter
/sponge chunks <global | world <world> | dump all>
/sponge info [block | blockat [world] <x y z> | entity]
/sponge save [-g] [-d dim|*] [-w world|*]
/sponge plugins refresh [pluginId]
/sponge plugins info <pluginId>
/sponge reload world <world>
Befehls Konflikte
In cases of command conflict, Sponge provides a primary alias mechanism to specify which command is to be used. For
example, Minecraft provides the reload command and
Sponge provides the reload command. To
specify which command to use, prefix it with minecraft or sponge and a :. So, to use Sponge’s reload command
above, type in /sponge:reload. This approach can also be used to handle conflicts between mods and/or plugins. Do
the same thing, just use the mod-id or the plugin-id and a :. An example is /examplemodid:tp.
Furthermore, the primary alias mechanism can be used to overcome incompatibilities. Let’s say a plugin registers a command, but the command is incompatible with your mod. If you can configure your mod to use a Minecraft native command or another plugin’s command, you can restore the expected behavior or prevent unexpected behaviors.
Bemerkung
Das /sponge audit sorgt dafür, dass alle noch nicht geladenen Klassen geladen werden, wodurch die gesamte Aufgabe von allen eingebauten Umgebungsvariablen aufgezeichnet werden kann. DIes benötigt die mixin.checks Variable, weitere Informationen unter Mixin wiki.
Sponge provides two permissions for debugging purposes:
Allow using Sponge’s block and entity tracking message channel:
sponge.debug.block-trackingThis message channel is used by the client (if the SpongeForge mod is installed) to display the block and entity owner and notifier in the debug view.Allow hovering of command execution errors to get the stacktrace:
sponge.debug.hover-stacktrace
Forge
Die folgenden Befehle sind nur nutzbar, wenn SpongeForge genutzt wird. Andere Implementierungen der SpongeAPI (wie z. B. SpongeVanilla) enthalten diese Befehle nicht.
Befehl |
Beschreibung |
Berechtigung |
|---|---|---|
/forge tps |
Zeigt die Ticks pro Sekunde für jede Welt an. |
forge.command.forge |
/forge track |
Aktiviert das Tracken von Blockobjekten. |
forge.command.forge |
Für alle Forge Mods, die die Vanilla Befehl-API benutzen, wird diese Form von Befehlberechtigungen benutzt <modid>.command.<befehlsname>.
Vanilla
Es gibt viele Vanilla-Befehle die auch in Sponge-Servern verwendet werden können. Die Liste hier ist nicht vollständig, umfasst aber die am häufigsten genutzten Befehle.
Diese Befehle stehen nur für Operatoren oder Spieler mit passender Berechtigung zur Verfügung. Generell haben die Berechtigungen für Vanilla-Befehle die Struktur minecraft.command.<Befehl>, wie man unten sehen kann.
Befehl |
Beschreibung |
Berechtigung |
|---|---|---|
/ban |
Einen Spieler verbannen. |
minecraft.command.ban |
/ban-ip |
Eine IP Adresse bannen. |
minecraft.command.ban-ip |
/banlist |
Eine Liste aller verbannten Spieler anzeigen. |
minecraft.command.banlist |
/clear |
Ein Inventar leeren. |
minecraft.command.clear |
/deop |
Einem Spieler Operator Rechte entziehen. |
minecraft.command.deop |
/difficulty |
Den Schwierigkeitsgrad des Spiels ändern. |
minecraft.command.difficulty |
/gamemode |
Den Spielmodus eines Spielers festlegen. |
minecraft.command.gamemode |
/gamerule |
Eine Spielregel festlegen. |
minecraft.command.gamerule |
/give |
Einem Spieler einen Gegenstand (englisch item) geben. |
minecraft.command.give |
/kill |
Einen Spieler oder Objekt töten. |
minecraft.command.kill |
/op |
Einem Spieler Operator Rechte geben. |
minecraft.command.op |
/pardon |
Einen Spieler von der Bannliste streichen. |
minecraft.command.pardon |
/save-all |
Den Spielstand des Servers sichern. |
minecraft.command.save-all |
/save-off |
Das automatische Speichern deaktivieren. |
minecraft.command.save-off |
/save-on |
Das automatische Speichern aktivieren. |
minecraft.command.save-on |
/setidletimeout |
Festlegen wie lange Spieler abwesend sein können, bevor sie vom Server gekickt werden. |
minecraft.command.setidletimeout |
/setworldspawn |
Den Spawnpunkt der Welt festlegen. |
minecraft.command.setworldspawn |
/stop |
Den Server anhalten. |
minecraft.command.stop |
/toggledownfall |
Zwischen Sonnenschein und Regen umschalten. |
minecraft.command.toggledownfall |
/tp |
Teleportiert Spieler und Objekte. |
minecraft.command.tp |
/weather |
Setzt das Wetter auf die angegebene Bedingung. |
minecraft.command.weather |
/whitelist |
Verwaltung der Liste der erlaubten Spielernamen für den Server. |
minecraft.command.whitelist |
/worldborder |
Die Weltgrenze bearbeiten. |
minecraft.command.worldborder |
Sponge also creates permissions for these Minecraft features:
Allow player to use the entity-selector in commands:
minecraft.selectorErlaubt Spielern den Spawn-Schutz auf allen Welten zu umgehen: ‚‘ minecraft.spawn-protection.override‘‘
Erlaubt Spielern den Force Gamemode auf allen Welten zu umgehen: ‚‘ minecraft.force-gamemode.override‘‘
Ermöglicht das Bearbeiten eines normalen Befehlsblocks mit dem angegebenen Namen:
minecraft.commandblock.edit.block.<name>Ermöglicht das Bearbeiten einer Befehlsblocklore mit dem angegebenen Namen:
minecraft.commandblock.edit.minecart.<name>
Bemerkung
These permissions use the actual name of the commandblock, which is normally @ by default.
Es gibt weiter extra Berechtigungen um den Zugriff auf den Server zu verwalten:
Ignoriere Whitelist:
minecraft.login.bypass-whitelistErlaube das ignorieren des Spielerlimits:
minecraft.login.bypass-player-limit
Bemerkung
Sponge offers improved multi-world support, such as per-world world borders. By default, Sponge only changes the
world border (or other world options) of the world the player is currently in. The vanilla behavior of setting it
for all worlds can be restored using the global configuration and setting
sponge.commands.multi-world-patches.worldborder (or the corresponding entry) to false. See
global.conf for details. Sponge assumes that multi-world plugins also
provide optimized configuration commands for those options and thus does not provide its own variants.
Befehle für Spieler
Die folgenden Befehle sind für alle Spieler ohne Operator Status im unmodifizierten (englisch vanilla) Minecraft verfügbar.
Befehl |
Beschreibung |
Berechtigung |
|---|---|---|
/help |
Zeige Informationen über Commands auf einem Server, normalerweise wird das Sponge Kommando genutzt! |
minecraft.command.help |
/me |
Teile jedem mit, was du gerade tust. |
minecraft.command.me |
/say |
Zeigt jedem aktuell verbundenen Mitspieler eine Nachricht an (oder, falls Selektoren benutzt werden, nur diesen Spielern). |
minecraft.command.say |
/tell |
Sendet eine private Nachricht an einen anderen Spieler. |
minecraft.command.tell |
A full list of vanilla commands can be found at: https://minecraft.wiki/w/Commands#List_and_summary_of_commands. Permissions
for vanilla Minecraft commands on a Sponge server are of the structure minecraft.command.<command>.
Besondere Befehls-Funktionen
Sponge and most Sponge plugins support additional command features such as auto completion and hoverable text. The image
below shows the output using the /sponge plugins command (yellow box). The elements in that list can be hovered over
to get addition information such as the current version number (red box). Some elements in the example below also have
additional actions bound to them. For example, the plugin entries in that list can be clicked to show more detailed
information (purple box) about that plugin. This is equivalent to sending the /sponge plugins <pluginId> command.
The auto completion can be triggered by pressing tab. Entering /sponge plugins (with a trailing space) and then
pressing tab will show a list of possible values (turquoise box) that can be used in that context. Pressing tab again
will iterate the possibilities, if any. Theoretically it is possible to write most commands by pressing only tab and
space (and maybe the first letter of each segment).
Tipp
Wenn du selbst ein Plugin-Autor bist und ein Texte mit Tooltipps oder Aktionen verwenden möchtest, dann sieh dir unsere Text Dokumentation an.