Kommandoere

Kommandoer er en metode, hvor server operatørerne kan administrere deres server, og hvor spillere kan interagere med serveren.

I Sponge, kommandoer følger et system af tilladelser. Tilladelser tillade server operatører for at styre, hvem der kan få adgang til hvilke kommandoer. Som standard tildeles alle kommandoer til spillere med OP status. Spillere uden operatør status ikke har adgang til administrative kommandoer eller kommandoer, der kræver en tildelt tilladelse node. En server kan operatøren finjustere der har adgang til hvilke kommandoer ved at tilføje / virkningsløs tilladelse noder via et tilladelser plugin.

Bemærk

Sponge is not a permissions-management plugin. To add and negate permissions for individual players or groups, you will need to find a permissions-management plugin.

Operator Commands

These commands, in addition to regular player commands, are available to server operators.

Sponge

The following commands are available to players with operator status (or the correct permission node) on servers powered by Sponge.

Kommando

Beskrivelse

Tilladelse

/sponge audit

Forces loading of unloaded classes to enable mixin debugging.

sponge.command.audit

/sponge chunks

Prints out the chunk data for a world, a dimension, or globally.

sponge.command.chunks

/sponge config

Alters a global, world, or a dimension config.

sponge.command.config

/sponge heap

Dumps the JVM heap.

sponge.command.heap

/sponge plugins

Lists currently installed plugins.

sponge.command.plugins

/sponge plugins reload

Asks plugins to perform their own reload procedures.

sponge.command.plugins.reload

/sponge reload

Reloads the global, world, or dimension config.

sponge.command.reload

/sponge save

Saves the global, world, or dimension config.

sponge.command.save

/sponge timings

The main command for the timings module.

sponge.command.timings

/sponge tps

Display ticks per second for each world.

sponge.command.tps

/sponge version

Prints the Sponge/SpongeAPI versions to the console.

sponge.command.version


Sponge Command Parameters

  • /sponge chunks [-g] [-d dim] [-w world]

  • /sponge config [-g] [-d dim] [-w world] key value

  • /sponge save [-g] [-d dim|*] [-w world|*]

  • /sponge reload [-g] [-d dim|*] [-w world|*]

Bemærk

The /sponge audit command forces loading of any classes which have not yet been loaded, allowing the full output from all mixin debugging environment variables to be captured. This also requires the mixins.checks variable, see the Mixin wiki for more information.

Tip

Here are a few simple examples of the sponge config command in action. Please see Konfiguration af Sponge for a more detailed explanation.

  1. /sponge config logging.chunk-load true

Since no dimension was specified, the dimension would default to the sender(player) dimension. So if you were in a mystcraft dimension, this would alter the mystcraft dimension config.

  1. /sponge config -d nether logging.chunk-load true

Since a dimension type was specified, this would alter the nether dimension config (and hence all nether worlds).

  1. /sponge config -w DIM1 logging.chunk-load true

This would alter the config of world named DIM1.

Timings

Timings are a tool built into Sponge that allows server administrators to monitor the performance of their server. Timings will collect information about a server so that a report may later be generated on the data. Information that is recorded by timings include the server motd, version, uptime, memory, installed plugins, tps, percent of tps loss, amount of players, tile entities, entities, and chunks. Below is a list of sub-commands to /sponge timings:

Kommando

Beskrivelse

/sponge timings on

Enables timings. Note that this will also reset timings data.

/sponge timings off

Disables timings. Note that most timings commands will not function and timings will not be recorded if timings are disabled.

/sponge timings reset

Resets all timing data and begins recording timing data after the time this command was done.

/sponge timings report

Generates the timings report on your server performance at https://timings.aikar.co

/sponge timings verbon

Enables timings monitoring at the verbose level.

/sponge timings verboff

Disables timings monitoring at the verbose level. Note that high-frequency timings will not be available.

/sponge timings cost

Gets the cost of using timings.

Forge

The following commands are available only when using the SpongeForge coremod on Forge. Other implementations of the Sponge API, such as SpongeVanilla, do not include these commands.

Kommando

Beskrivelse

Tilladelse

/forge tps

Display ticks per second for each world.

forge.command.forge

/forge track

Enable tile entity tracking.

forge.command.forge


For any Forge mods that use the vanilla command API, command permissions are provided in the form <modid>.command.<commandname>.

Vanilla

There are several commands built-in to vanilla Minecraft that are also available on servers powered by Sponge. The list below is not comprehensive, but it includes the most commonly used commands. These commands are available to players with operator status (or the correct permission node). In general, permissions for vanilla Minecraft commands on a Sponge server are of the structure minecraft.command.<command>, as shown below.

Kommando

Beskrivelse

Tilladelse

/ban

Ban a player.

minecraft.command.ban

/ban-ip

Ban a player’s IP address.

minecraft.command.ban-ip

/banlist

View all banned players.

minecraft.command.banlist

/clear

Clear an inventory.

minecraft.command.clear

/deop

Remove OP from a player.

minecraft.command.deop

/difficulty

Set the game difficulty.

minecraft.command.difficulty

/gamemode

Set the gamemode of a player.

minecraft.command.gamemode

/gamerule

Set a gamerule.

minecraft.command.gamerule

/give

Give an item to a player.

minecraft.command.give

/kill

Kill a player or entity.

minecraft.command.kill

/op

Give Operator status to a player.

minecraft.command.op

/pardon

Remove a player from the ban list.

minecraft.command.pardon

/save-all

Save the server.

minecraft.command.save-all

/save-off

Disable automatic server saving.

minecraft.command.save-off

/save-on

Enable automatic server saving.

minecraft.command.save-on

/setidletimeout

Define how long players can be idle before getting kicked.

minecraft.command.setidletimeout

/setworldspawn

Set the spawnpoint for the world.

minecraft.command.setworldspawn

/stop

Stop the server.

minecraft.command.stop

/toggledownfall

Toggle between sunny and rainy weather.

minecraft.command.toggledownfall

/tp

Teleport players and entities.

minecraft.command.tp

/weather

Set the weather to a defined condition.

minecraft.command.weather

/whitelist

Manage the server whitelist.

minecraft.command.whitelist

/worldborder

Manage the world border.

minecraft.command.worldborder


Sponge also creates a spawn-protection bypass permission, and two permissions for controlling the ability to edit commandblocks. Note that these permissions use the actual name of the commandblock, which is normally @ by default.

  • Allow player to bypass spawn-protection on all worlds: minecraft.spawn-protection.override

  • Allow editing an ordinary commandblock of the given name: minecraft.commandblock.edit.block.<name>

  • Allow editing a minecart commandblock of the given name: minecraft.commandblock.edit.minecart.<name>

Player Commands

The following commands are available as part of vanilla Minecraft to players without operator status.

Kommando

Beskrivelse

Tilladelse

/help

View information on commands used on the server

minecraft.command.help

/me

Tell everyone what you are doing.

minecraft.command.me

/say

Display a message to everyone (or, if using selectors, specific players).

minecraft.command.say

/tell

Privately message another player.

minecraft.command.tell


A full list of vanilla commands can be found at: http://minecraft.gamepedia.com/Commands#List_of_commands. Permissions for vanilla Minecraft commands on a Sponge server are of the structure minecraft.command.<command>.