Rust:Тонкости администрирования сервера uMod или Oxide: различия между версиями

Материал из SurvivalHost Wiki
Перейти к навигации Перейти к поиску
Строка 57: Строка 57:
<p>Плагины</p>
<p>Плагины</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<h1><p>Плагины</p></h1>


<h1>Plugins - Getting Started</h1>
<h1>Plugins - Getting Started</h1>

Версия 17:37, 28 января 2019

Getting Started

Installation

Server requirements

The uMod platform requirements vary depending on the game server.

More information about uMod support for specific games may be found on the <a href="https://umod.org/documentation/umod/game-support">Game Support</a> page.

Installing uMod

Via Direct Download

  1. Download the uMod version <a href="https://umod.org/games">specific to your game</a>.
  2. Copy the files over your existing server installation

Plugins

Plugins are self-contained bits of code which modify game server behavior.

For more information about plugins, view the <a href="https://umod.org/documentation/umod/plugins/getting-started">Plugins - Getting Started</a> page.

<a href="https://umod.org/plugins">View all available plugins</a>

Extensions

Extensions are generally large projects which add functionality to uMod or make substantial changes to a server.

<a href="https://umod.org/extensions">View all available extensions</a>

 

 

Getting Help

Searching

Please search through existing resources before asking for help or creating a new thread.

  1. Search the <a href="https://umod.org/documentation">documentation</a> provided
  2. Search the <a href="https://umod.org/community/search">forums</a> for answers

Plugin and extensions

If an issue is undocumented or unreported:

  1. Visit the resource page and click the help button.
  2. Create a new thread in that resource's forum category.

Site and platform

For general questions or help with the site and/or platform, please use our <a href="https://umod.org/community/35-general-support">General Support</a> forum.

No support guarantee

The following disclaimer applies to free and open-source plugins/extensions available on umod.org.

This is a community-supported site, which means that support is given at the discretion of others in the community and you are not guaranteed a response.

Most free plugins are maintained and supported voluntarily without compensation. Do not expect instant support or free support for open-source resources. Because plugins are open-source, any developer can review the code and potentially answer questions, however that does not mean that every developer is familiar with every plugin.

It can take considerable effort for a developer familiarize themselves with a particular plugin that they did not write. If you want better support from developers, consider donating to them.

 

 

 

Плагины

 


Плагины

Plugins - Getting Started

Plugins are self-contained bits of code which modify game server behavior.

Code files

Plugins are code files distributed as CSharp (C#) files and will have a .cs file extension.

Installing a code file

More information about installing plugins may be found at <a href="https://umod.org/documentation/umod/plugins/installation">Plugins - Installation</a>.

Configuring a plugin

Many plugins, when installed, will generate a JSON configuration file with which a server administrator may change how the plugin works.

More information about configuring plugins may be found at <a href="https://umod.org/documentation/umod/plugins/configuration">Plugins - Configuration</a>.

Plugin permissions

Many plugins include a variety of permissions which must be assigned in order to use features provided by the plugin.

More information about access control may be found at <a href="https://umod.org/documentation/umod/plugins/permissions">Plugins - Permissions</a>.

Plugin commands

Many plugins will include commands which may be used by players or server administrators. Not every game will have both types of commands, and by default commands should be available by console and in-game (if applicable).

Console commands

A console command is a command which is run from..

  1. In-game console (if game has one)
  2. Server application window (if platform supports it)
  3. RCON console (if game supports RCON)

Chat commands

Chat commands are run by players who are currently in-game. Console commands are prefixed with a /.

For example: /help

 

 

 

Plugin installation

Installing uMod plugins usually only takes a few mouse clicks.

Server requirements

To install the plugin on the server, the server provider must support Oxide 2.0 or higher, else the plugins will not load or do anything.

If the server is not online, start it. Then, check that Oxide is fully installed by testing the oxide.version chat or console command.

Download the source code

Download a plugin from the <a href="https://umod.org/plugins">plugins page</a>;

Do not rename the plugin or change the file extension.

Remote server

If the server is not hosted locally, connect to the server via an FTP client. If unsure of the FTP details, please contact the server host.

Plugins directory

Find the plugins folder which is located by default at oxide/plugins if it has not been changed by the server host

Upload the source code

Upload the plugin file into the "plugins" folder and it will be loaded automatically if Oxide is currently installed

Continue to <a href="https://umod.org/documentation/umod/plugins/configuration">configuring the plugin</a>..

Updating

If a plugin is already installed and an update is available simply overwrite the original (.cs) file and the new version will be loaded automatically.

 

 

 

Plugin configuration

Most plugins will generate a JSON configuration file once loaded. With this file, a server owner may change how a plugin works.

Config directory

Configuration files are found in the config folder which is located by default in oxide/config (unless the server host has moved it).

File name

A plugin configuration file will have the same name as the plugin itself.

For example, a plugin that is installed as MyPlugin.cs (if it is configurable) will be accompanied by a JSON file named MyPlugin.json

Do not rename the configuration file or change the file extension.

If a plugin is installed but not configurable, no configuration file will be present.

If a plugin is configurable but no configuration file is available, the plugin may be broken; in this case, check the log files under the oxide/logs directory for errors.

Valid JSON

All plugin configuration files are saved as JSON (JavaScript Object Notation). Configuration files must be valid JSON. Use a validator such as <a href="https://jsonlint.com">jsonlint.com</a> to ensure the configuration is valid JSON.

Applying changes

After making changes to a plugin configuration file, reload the plugin in the server console by using the oxide.reload command. For example:

oxide.reload MyPlugin

 

 

Permissions

Permissions allows server owners to give players unique abilities and benefits on their servers.

Administering permissions is easy; simply enter the desired command and you're done! If your server does not have a console, you can use any compatible RCON tool or remote console to send the commands to the server. Most Oxide/uMod-supported games also support the permission commands in the chat, or will soon.

For this guide, the permission epicstuff.use will be used as an example. Keep in mind that permissions only exist if provided by a plugin or Oxide/uMod itself.

By default, the groups that are created by Oxide/uMod are: admin and default. These can be changed by editing those under the umod.config.json file. The admin group will automatically be assigned to players that are recognized as admin by the server. The "default" group will automatically be assigned to ALL players that connect to the server.

Players

Grant a permission to an individual player

oxide.grant player Wulf epicstuff.use

Revoke a permission from an individual player

oxide.revoke player Wulf epicstuff.use

Show a player's permissions

oxide.show player Wulf

Showing which player or group has a permission

Sometimes this command is helpful when tracking down who has a permission.

oxide.show perm epicstuff.use

Groups

Grant a permission to an entire group

oxide.grant group admin epicstuff.use

Revoke a permission from a group

oxide.revoke group admin epicstuff.use

Adding a player to an existing group

Adding a player to a group will give them all of the permissions assigned to that group.

oxide.usergroup add Wulf admin

Removing a player from an existing group

Removing a player from a group will remove from them all of the permissions assigned to that group.

oxide.usergroup remove Wulf admin

Adding an entirely new group

oxide.group add vipoxide.group add vip VIP 0

Removing an existing group

oxide.group remove vip

Setting the title or rank of a group

The group title is usually a short description of a group, sometimes used for chat titles. The rank is a number which sorts a group based on its importance.

oxide.group set vip "[VIP Member]"oxide.group set vip "[VIP Member]" 1

Setting the parent group of another group

A group will inherit all permissions from its parent group.

oxide.group parent admin default

Showing a group's members and permissions

oxide.show group admin

Showing all groups or permissions

To show all of the permission groups, simple use the command below.

oxide.show groups

The show all of the registered permissions from plugins and Oxide/uMod, use the command below.

oxide.show perms

Using wildcards

A wildcard is something that covers multiple things at once time. For permissions, this is the * symbol. You can use the wildcard (*) to grant multiple permissions at one time. This can be done with all permissions or per plugin based on prefix.

oxide.grant group admin *oxide.grant player Wulf umod.*

Conclusion

The same commands are also available with the "o." prefix (ex. "o.grant").

That's the basics to permissions for Oxide/uMod. Permissions give you a fantastic way to manage staff without worrying about them abusing powers from the game's admin functionality (such as flight, noclip, super speed, etc.) so they can still enjoy the game but also help monitor your server at the same time.

Data Files

Data files are JSON files that plugins may use to store arbitrary data.

Data directory

Data files may be found in the data folder which located by default in oxide/data (unless the server host has moved it).

File names

Data files do not follow any naming convention, a plugin author may specify any name when creating a data file.

It is recommended to plugin authors, when creating a large number of data files, to create them in a subdirectory specific to their plugin.

Valid JSON

All plugin data files are saved as JSON (JavaScript Object Notation). Data files must be valid JSON. If editing a data file manually, use a validator such as <a href="https://jsonlint.com">jsonlint.com</a> to ensure the data file is valid JSON.