Repository navigation
EN
Global Update
Folia
- Folia support. Supported version range: 1.21 - 26.3.
- Mine resets run chunk by chunk: each part is executed on the region thread of its own chunk (up to 10,000 blocks or 10 ms per step).
- All tasks go through the LLib scheduler: timers run on the global scheduler, database work runs asynchronously, actions run on the player's thread, teleports use teleportAsync.
- Holograms are created and updated on the region thread of their location.
Mining Statistics
- Counts mined blocks: in total and per material. Increments are accumulated in memory and written to the database in batches (every 5 s by default, asynchronously). On error they are returned to the queue; when the plugin shuts down, a final synchronous write is made.
- Commands: /lm stats [player] [material], /lm top [material] [page]. Permissions: lastmines.stats, lastmines.stats.others, lastmines.top (stats and top are available without lastmines.admin).
- Placeholders: %lm_top_name%, %lm_topvalue% (also with a material), %lm_blocks_total%, %lm_blocks%, %lm_rank%, %lm_rank_%. The same values are available as %lastmines_top_…% / %lastmines_stats_…%. They read memory only and never touch the database. An empty top slot shows - and 0.
Database
- The plugin now supports databases, for fast operation and cross-server use.
- File sql.yml: Memory, H2, SQLite, MySQL, MariaDB, PostgreSQL (HikariCP pool, drivers are downloaded automatically). The schema version is stored in the database, and indexes were added for the top. On a database shared by several servers, the data is summed.
File syntax:
driver: H2 table_prefix: 'lastmines' h2: name: 'LastMines' # <name>.db sqlite: name: 'LastMines' # <name>.db mysql: host: 'localhost' # IP:PORT - if PORT is not specified, the default 3306 is name: 'lastmines' user: 'Last' pass: 'LastStudio' mariadb: host: 'localhost' # IP:PORT - if PORT is not specified, the default 3306 is name: 'lastmines' user: 'Last' pass: 'LastStudio' postgresql: host: 'localhost' # IP:PORT - if PORT is not specified, the default 5432 is used name: 'lastmines' user: 'Last' pass: 'LastStudio' Mining statistics stats: enable: true flush_interval: 5s # how often to send the accumulated data to the datab top_refresh: 45s # how often to refresh the top cache top_size: 100 # how many top positions to keep in the cache
Actions
- All action types come from LLib: message, title, actionbar, sound, console, pive, particle and others.
- Each line is parsed once when the config is loaded; an error in one line does
- New entry format [type] [chance:N] value, plus "when", "target" and repeat tags anywhere in the line ([chance:N] must come right after [type]):
- when: [update], [update:N], and the new [break] and [break:MATERIAL] (when
- target: [all], [mine], [radius:N], and the new [self] (the player who broke the block; the default for [break])
- chance: [chance:N]
- repeat: the new [every:N], which runs any action every N seconds with any tbar] [radius:7] text
- Substitutions: %player%, %breaker%, %material%, %mine% and PlaceholderAPI.
- [console], [broadcast] and *_all run once from the console (previously once per player, and not at all when no players were online).
- The lastmines.edit.commands permission is required to add [console] and [play Added for security.
Modes and the Copy Command
- ALL_BLOCKS is now a working mode: if there are not enough of the required blomediately and works without a timer.
- Reset by percentage (reset_percent: N): when ≤ N% of the blocks remain, the mine refills immediately. Works in any mode.
- /lm copy (permission lastmines.copy): copies all settings of an cate, except the area, teleport point, hologram and statistics. The copy is
created stopped and without an area. - A mine can exist without an area (no positions); such a mine is not reset.
Fixes
- A server version such as 26.2.build.7-beta was not recognized (a warning was was skipped).
- The update checker reported "a new version is available" even when your versior was silently lost.
- The message "Mine with ID %mine% already exists" showed the literal %mine% inreate).
RU
Глобальное обновление
Folia
- Поддержка Folia. Диапозон поддерживаемых версий: 1.21 - 26.3.
- Сброс шахты идёт по чанкам: каждая часть выполняется в потоке региона своего чанка (за шаг до 10 000 блоков или 10 мс).
- Все задачи идут через планировщик библиотеки LLib: таймеры - глобальный, база данные - асинхронно, действия - в потоке игрока, телепорт -
teleportAsync. - Голограммы создаются и обновляются в потоке региона своей точки.
Статистика добычи
- Счёт добытых блоков: всего и по материалам. Приращения копятся в памяти и пишутся в базу пачкой (по умолчанию раз в 5 с, асинхронно). При ошибке возвращаются в очередь, при выключении плагина — последняя синхронная запись.
- Команды:
/lm stats [игрок] [материал],/lm top [материал] [страница]. Права:lastmines.stats,lastmines.stats.others,lastmines.top(statsиtopдоступны безlastmines.admin). - Плейсхолдеры:
%lm_top_<N>_name%,%lm_top_<N>_value%(и с материалом),%lm_blocks_total%,%lm_blocks_<материал>%,%lm_rank%,%lm_rank_<материал>%. Те же значения как%lastmines_top_…%/%lastmines_stats_…%. Читают только память, базу не трогают. Пустое место в топе:-и0.
База данных
- Плагин получил поддержку баз данных, для её быстрой работы и меж-серверности.
- Файл
sql.yml: Memory, H2, SQLite, MySQL, MariaDB, PostgreSQL (пул HikariCP, драйверы подгружаются сами). Версия схемы хранится в базе, добавлены индексы для топа. В общей базе нескольких серверов данные суммируются.
Синтаксис файла:
driver: H2 table_prefix: 'lastmines' h2: name: 'LastMines' # <name>.db sqlite: name: 'LastMines' # <name>.db mysql: host: 'localhost' # IP:PORT - если не указан PORT то будет по умолчанию 3306 name: 'lastmines' user: 'Last' pass: 'LastStudio' mariadb: host: 'localhost' # IP:PORT - если не указан PORT то будет по умолчанию 3306 name: 'lastmines' user: 'Last' pass: 'LastStudio' postgresql: host: 'localhost' # IP:PORT - если не указан PORT то будет по умолчанию 5432 name: 'lastmines' user: 'Last' pass: 'LastStudio' # Статистика добычи / Mining statistics stats: enable: true flush_interval: 5s # как часто отправлять накопленное в бд top_refresh: 45s # как часто обновлять кэш топа top_size: 100 # сколько позиций топа держать в кэше
Действия
- Все типы действий берутся из LLib:
message,title,actionbar,sound,console,player,vault,playerpoints,give,particleи другие. - Строка разбирается один раз при загрузке конфига; ошибка в одной строке не мешает остальным.
- Новая запись
[тип] [когда] [кому] [chance:N] значение:
- когда:
[update],[update:N], а также новые[break]и[break:МАТЕРИАЛ](при добыче блока)- кому:
[all],[mine],[radius:N], новое[self](игроку, сломавшему блок; для[break]— по умолчанию)- шанс:
[chance:N]
- Подстановки:
%player%,%breaker%,%material%,%mine%и PlaceholderAPI. [console],[broadcast]и*_allвыполняются один раз от консоли (раньше - по разу на игрока, а без игроков не выполнялись).- Право
lastmines.edit.commandsдля добавления[console]и[player]через меню. Сделано для безопасности.
Режимы и команда копирования
- ALL_BLOCKS рабочий режим: Не будет хватать нужных блоков - автошахта сразу же перезаполняется и работает без таймера.
- Сброс по проценту (
reset_percent: N): осталось ≤ N% блоков - шахта сразу перезаполняется. Работает в любом режиме. /lm copy <шахта> <новая>(правоlastmines.copy): копирует все настройки автошахты и делает её копию, кроме области, точки телепорта, голограммы и статистики. Копия создаётся остановленной и без области.- Шахта может существовать без области (
positionsотсутствует) - такая шахта не сбрасывается.
Исправления
- Версия сервера вида
26.2.build.7-betaне распознавалась (предупреждение и пропуск проверки версии). - Проверка обновлений говорила «вышла новая версия», даже если у вас версия новее; ошибка проверки молча терялась.
- Сообщение «Шахта с ID %mine% уже существует» показывало
%mine%вместо названия (/lm create).