Player Events

Sends a configurable message/command when a player dies and leaves or joins the server

Редакция NLZONE · 2 мин чтения · 1 просмотр
Player Events
Скачать Player Events1.16 – 1.20.1 · с официальной страницы: modrinth.com
Перейти к загрузке

Что это

Sends a configurable message/command when a player dies and leaves or joins the server

  • Тип: мод
  • Загрузчик: fabric, quilt
  • Версии Minecraft: 1.16 – 1.20.1
  • Скачиваний на Modrinth: 10 975

Подробно

Note: this mod is server side only and won't work on clients

A Fabric mod that executes and sends configurable commands and messages respectively on certain events triggered by a player, such as Dying, Joining a server, Killing another player, etc.

Since 2.2.0 Datapacks can define functions that will be executed on an event, using the corresponding function tag #playerevents:

The config file is located in the config directory (config/playerevents.json) and looks like this:

JSON { "death": { "actions": [ "${player} just died!" ], "broadcasttoeveryone": true, "pickmessagerandomly": false }, "firstjoin": { "actions": [ "Welcome to the server ${player}! Remember to read the rules" ], "broadcasttoeveryone": false, "pickmessagerandomly": false }, "join": { "actions": [ "Welcome ${player}", "/say Hello ${player}" ], "broadcasttoeveryone": true, "pickmessagerandomly": false }, "killentity": { "actions": [ "${player} killed ${killedEntity}" ], "broadcasttoeveryone": true, "pickmessagerandomly": false }, "killplayer": { "actions": [ "${player} killed ${killedPlayer}", "F ${killedPlayer}" ], "broadcasttoeveryone": true, "pickmessagerandomly": true }, "leave": { "actions": [ "Goodbye ${player}!", "/say Hope to see you soon ${player}" ], "broadcasttoeveryone": true, "pickmessagerandomly": false }, "customcommands": [ { "command": "/plugins", "actions": [ "Hey! We don't use plugins" ], "broadcasttoeveryone": false, "pickmessagerandomly": false }, { "command": "/spawn", "actions": [ "/tp ${player} 0 64 0 0 0" ], "broadcasttoeveryone": true, "pickmessagerandomly": false } ] }

On the JSON file you can declare, under the actions array on each object, what is going to be sent and/or executed on that event. You can also set these messages to be sent only to the player by setting broadcasttoeveryone to false, but this won't work with events like leave (because the player isn't in the server anymore).

Since 2.2.0 You can choose to randomly send one of the defined messages for a given event by setting pickmessagerandomly to true.

Every event has a ${player} token, and each instance of this token will be replaced with the player that triggers the event. Other events have extra tokens that work the same way. Most (if not all) tokens have properties that can be accessed with some

Как установить

Скачайте файл на официальной странице ниже и положите его в папку mods (для модов) или plugins (для плагинов) вашего сервера или клиента. Для модов нужен совместимый загрузчик. Версия должна совпадать с версией Minecraft.

Текст подготовлен автоматически из описания на Modrinth и ждёт проверки редакцией.

Редакция NLZONE

Пишем о серверах, модах и играх, в которые играем сами. Нашли ошибку — напишите нам, исправим.

Комментарии 0

Комментарии к этому материалу отключены.

Читайте также