NoMobs — инструкция по Skript для управления спавном мобов

🛡️ NoMobs — инструкция по Skript для управления мобами
Здесь собраны: описание возможностей, все команды, примеры использования и полный исходный код.
- 🚫 Отключает спавн всех мобов или отдельных категорий.
- ⚔️ Позволяет отдельно блокировать агрессивных мобов.
- 🐑 Позволяет отдельно блокировать мирных мобов.
- 🏘️ Запрещает спавн жителей.
- 🛡️ Отключает появление железных големов.
- 📦 Убирает дроп с мобов после смерти.
- 📍 Ограничивает количество мобов в чанке.
- 🎯 Позволяет запрещать конкретных мобов по названию.
✨ Основные возможности
☠️ Антидроп
Скрипт очищает дроп после смерти мобов. Это значит, что обычные существа, жители и железные големы не будут оставлять предметы после смерти. Игроков это не касается.
🚫 Контроль спавна
Скрипт проверяет каждое появление существа и может моментально удалить моба, если он попадает под запрет.
- Все мобы сразу
- Только агрессивные
- Только мирные
- Только жители
- Только железные големы
- Любые выбранные типы мобов
📍 Лимиты по чанкам
Можно ограничить число мобов в каждом чанке, чтобы снизить нагрузку на сервер.
- Общий лимит всех мобов в чанке
- Лимит конкретного типа моба в чанке
⏱️ Автоочистка каждые 3 секунды
Даже если моб появился нестандартным способом, скрипт всё равно проверит его и удалит, если он нарушает текущие ограничения.
👾 Категории мобов в скрипте
⚔️ Агрессивные мобы
zombie, skeleton, creeper, spider, cave spider, enderman, witch, slime, magma cube, blaze, ghast, pig zombie, zombie pigman, silverfish, guardian
🐑 Мирные мобы
cow, pig, sheep, chicken, horse, mooshroom, mushroom cow, wolf, ocelot, rabbit, bat, squid, snowman
🏘️ Отдельные сущности
villager, iron golem
🔐 Права доступа
Для использования команды нужен пермишен:
📘 Подробное описание команд
📋 /nomobs
Показывает текущее состояние скрипта и список всех доступных подкоманд.
Что можно увидеть:
- включён ли полный запрет мобов;
- запрещены ли агрессивные мобы;
- запрещены ли мирные мобы;
- запрещены ли жители;
- запрещены ли железные големы;
- установлен ли лимит по чанку.
🔄 /nomobs reload
Перезагружает Skript-файл nomobs без полного перезапуска сервера.
Полезно использовать:
- после редактирования файла;
- после изменения логики или текста сообщений;
- для быстрого применения правок.
♻️ /nomobs reset
Полностью сбрасывает все ограничения и лимиты скрипта.
Сбрасывается:
- полный запрет спавна;
- запрет агрессивных мобов;
- запрет мирных мобов;
- запрет жителей;
- запрет железных големов;
- общий лимит на чанк;
- временные данные проверки.
🚫 /nomobs all on | off
on — полностью отключает спавн всех мобов на сервере.
off — снова разрешает спавн мобов.
Это самый жёсткий режим. Если он включён, остальные разрешения уже не имеют значения, потому что удаляться будут вообще все существа.
⚔️ /nomobs hostile on | off
on — запрещает спавн всех агрессивных мобов из списка скрипта.
off — снова разрешает их появление.
🐑 /nomobs passive on | off
on — запрещает спавн всех мирных мобов из списка скрипта.
off — снова разрешает спавн мирных мобов.
🏘️ /nomobs villager on | off
on — запрещает спавн жителей.
off — снова разрешает их спавн.
🛡️ /nomobs irongolem on | off
on — запрещает спавн железных големов.
off — снова разрешает их появление.
🎯 /nomobs block <mob>
Запрещает конкретного моба по названию.
Примеры: zombie, creeper, skeleton, villager, iron golem
✅ /nomobs unblock <mob>
Снимает запрет с конкретного моба.
📚 /nomobs blocklist <mob1,mob2,mob3>
Позволяет сразу запретить список мобов через запятую.
Удобно для быстрой массовой настройки.
📖 /nomobs unblocklist <mob1,mob2,mob3>
Снимает запрет сразу с нескольких мобов, перечисленных через запятую.
📍 /nomobs limit <number|off>
Устанавливает общий лимит мобов в одном чанке.
- number — включить ограничение;
- off — отключить ограничение.
Если лимит превышен, новые мобы в этом чанке будут удаляться.
🎯 /nomobs limittype <mob> <number|off>
Ограничивает количество мобов конкретного типа в одном чанке.
- number — задать лимит;
- off — убрать лимит для указанного моба.
⚡ Блок команд и примеры
🛑 Остановить спавн всех мобов
Команда:
Пример:
✅ Разрешить спавн всех мобов обратно
Команда:
Пример:
⚔️ Запретить только агрессивных мобов
Команда:
Пример:
🐑 Запретить только мирных мобов
Команда:
Пример:
🏘️ Запретить жителей
Команда:
Пример:
🛡️ Запретить железных големов
Команда:
Пример:
🎯 Запретить конкретного моба
Команда:
Примеры:
/nomobs block creeper
/nomobs block skeleton
✅ Разрешить конкретного моба
Команда:
Примеры:
/nomobs unblock creeper
📚 Запретить сразу несколько мобов
Команда:
Примеры:
/nomobs blocklist villager,iron golem
📖 Разрешить сразу несколько мобов
Команда:
Пример:
📍 Установить общий лимит мобов в чанке
Команда:
Примеры:
/nomobs limit 10
❌ Выключить общий лимит мобов
Команда:
Пример:
🎯 Установить лимит на конкретного моба
Команда:
Примеры:
/nomobs limittype creeper 2
/nomobs limittype villager 3
🔓 Выключить лимит на конкретного моба
Команда:
Примеры:
/nomobs limittype villager off
♻️ Сбросить все запреты и лимиты
Команда:
Пример:
🔄 Перезагрузить скрипт
Команда:
Пример:
📋 Посмотреть статус настроек
Команда:
Пример:
🧩 Готовые сценарии использования
🛑 Сценарий 1. Полностью отключить мобов на сервере
⚔️ Сценарий 2. Отключить только агрессивных мобов
🏘️ Сценарий 3. Убрать только жителей и големов
/nomobs irongolem on
💥 Сценарий 4. Запретить криперов и ограничить зомби
/nomobs limittype zombie 3
📍 Сценарий 5. Ограничить нагрузку на сервер по чанкам
📄 Исходный код скрипта nomobs.sk
Скопируйте его в файл plugins/Skript/scripts/nomobs.sk, после чего выполните перезагрузку:
options:
nm_prefix: &8[&cNoMobs&8] &7
on load:
if {nomobs.enabled} is not set:
set {nomobs.enabled} to false
if {nomobs.hostile.enabled} is not set:
set {nomobs.hostile.enabled} to false
if {nomobs.passive.enabled} is not set:
set {nomobs.passive.enabled} to false
if {nomobs.villagers.enabled} is not set:
set {nomobs.villagers.enabled} to false
if {nomobs.irongolems.enabled} is not set:
set {nomobs.irongolems.enabled} to false
if {nomobs.chunklimit.global} is not set:
set {nomobs.chunklimit.global} to -1
if {nomobs.version} is not set:
set {nomobs.version} to 1
#
# АНТИДРОП
#
on death:
if victim is a player:
stop
clear drops
on death of iron golem:
clear drops
on death of villager:
clear drops
#
# СПАВН
#
on spawn:
if event-entity is a player:
stop
if event-entity is not a living entity:
stop
set {_type} to "%type of event-entity%"
set {_hostile} to false
set {_passive} to false
set {_villager} to false
set {_irongolem} to false
set {_ver} to {nomobs.version}
if {_type} is "zombie":
set {_hostile} to true
if {_type} is "skeleton":
set {_hostile} to true
if {_type} is "creeper":
set {_hostile} to true
if {_type} is "spider":
set {_hostile} to true
if {_type} is "cave spider":
set {_hostile} to true
if {_type} is "enderman":
set {_hostile} to true
if {_type} is "witch":
set {_hostile} to true
if {_type} is "slime":
set {_hostile} to true
if {_type} is "magma cube":
set {_hostile} to true
if {_type} is "blaze":
set {_hostile} to true
if {_type} is "ghast":
set {_hostile} to true
if {_type} is "pig zombie":
set {_hostile} to true
if {_type} is "zombie pigman":
set {_hostile} to true
if {_type} is "silverfish":
set {_hostile} to true
if {_type} is "guardian":
set {_hostile} to true
if {_type} is "cow":
set {_passive} to true
if {_type} is "pig":
set {_passive} to true
if {_type} is "sheep":
set {_passive} to true
if {_type} is "chicken":
set {_passive} to true
if {_type} is "horse":
set {_passive} to true
if {_type} is "mooshroom":
set {_passive} to true
if {_type} is "mushroom cow":
set {_passive} to true
if {_type} is "wolf":
set {_passive} to true
if {_type} is "ocelot":
set {_passive} to true
if {_type} is "rabbit":
set {_passive} to true
if {_type} is "bat":
set {_passive} to true
if {_type} is "squid":
set {_passive} to true
if {_type} is "snowman":
set {_passive} to true
if event-entity is a villager:
set {_villager} to true
if event-entity is an iron golem:
set {_irongolem} to true
if {_type} is "iron golem":
set {_irongolem} to true
if {_type} is "irongolem":
set {_irongolem} to true
if {_type} is "golem":
set {_irongolem} to true
if {nomobs.enabled} is true:
cancel event
delete event-entity
stop
if {nomobs.hostile.enabled} is true:
if {_hostile} is true:
cancel event
delete event-entity
stop
if {nomobs.passive.enabled} is true:
if {_passive} is true:
cancel event
delete event-entity
stop
if {nomobs.villagers.enabled} is true:
if {_villager} is true:
cancel event
delete event-entity
stop
if {nomobs.irongolems.enabled} is true:
if {_irongolem} is true:
cancel event
delete event-entity
stop
if {nomobs_blocked_value::%{_ver}%::%{_type}%} is true:
cancel event
delete event-entity
stop
set {_chunkid} to "%world of event-entity%|%chunk of event-entity%"
if {nomobs.chunklimit.global} > -1:
set {_count} to 0
loop all entities in world of event-entity:
if loop-entity is not a player:
if loop-entity is a living entity:
if "%world of loop-entity%|%chunk of loop-entity%" is {_chunkid}:
add 1 to {_count}
if {_count} >= {nomobs.chunklimit.global}:
cancel event
delete event-entity
stop
if {nomobs_type_limit_value::%{_ver}%::%{_type}%} is set:
set {_counttype} to 0
loop all entities in world of event-entity:
if loop-entity is not a player:
if loop-entity is a living entity:
if "%world of loop-entity%|%chunk of loop-entity%" is {_chunkid}:
if "%type of loop-entity%" is {_type}:
add 1 to {_counttype}
if {_counttype} >= {nomobs_type_limit_value::%{_ver}%::%{_type}%}:
cancel event
delete event-entity
stop
every 3 seconds:
delete {nomobs_scan_global::*}
delete {nomobs_scan_type::*}
set {_ver} to {nomobs.version}
loop all worlds:
loop all entities in loop-world:
if loop-entity is not a player:
if loop-entity is a living entity:
set {_type} to "%type of loop-entity%"
set {_hostile} to false
set {_passive} to false
set {_villager} to false
set {_irongolem} to false
set {_remove} to false
if {_type} is "zombie":
set {_hostile} to true
if {_type} is "skeleton":
set {_hostile} to true
if {_type} is "creeper":
set {_hostile} to true
if {_type} is "spider":
set {_hostile} to true
if {_type} is "cave spider":
set {_hostile} to true
if {_type} is "enderman":
set {_hostile} to true
if {_type} is "witch":
set {_hostile} to true
if {_type} is "slime":
set {_hostile} to true
if {_type} is "magma cube":
set {_hostile} to true
if {_type} is "blaze":
set {_hostile} to true
if {_type} is "ghast":
set {_hostile} to true
if {_type} is "pig zombie":
set {_hostile} to true
if {_type} is "zombie pigman":
set {_hostile} to true
if {_type} is "silverfish":
set {_hostile} to true
if {_type} is "guardian":
set {_hostile} to true
if {_type} is "cow":
set {_passive} to true
if {_type} is "pig":
set {_passive} to true
if {_type} is "sheep":
set {_passive} to true
if {_type} is "chicken":
set {_passive} to true
if {_type} is "horse":
set {_passive} to true
if {_type} is "mooshroom":
set {_passive} to true
if {_type} is "mushroom cow":
set {_passive} to true
if {_type} is "wolf":
set {_passive} to true
if {_type} is "ocelot":
set {_passive} to true
if {_type} is "rabbit":
set {_passive} to true
if {_type} is "bat":
set {_passive} to true
if {_type} is "squid":
set {_passive} to true
if {_type} is "snowman":
set {_passive} to true
if loop-entity is a villager:
set {_villager} to true
if loop-entity is an iron golem:
set {_irongolem} to true
if {_type} is "iron golem":
set {_irongolem} to true
if {_type} is "irongolem":
set {_irongolem} to true
if {_type} is "golem":
set {_irongolem} to true
if {nomobs.enabled} is true:
set {_remove} to true
if {nomobs.hostile.enabled} is true:
if {_hostile} is true:
set {_remove} to true
if {nomobs.passive.enabled} is true:
if {_passive} is true:
set {_remove} to true
if {nomobs.villagers.enabled} is true:
if {_villager} is true:
set {_remove} to true
if {nomobs.irongolems.enabled} is true:
if {_irongolem} is true:
set {_remove} to true
if {nomobs_blocked_value::%{_ver}%::%{_type}%} is true:
set {_remove} to true
if {_remove} is true:
delete loop-entity
else:
set {_chunkid} to "%world of loop-entity%|%chunk of loop-entity%"
if {nomobs.chunklimit.global} > -1:
add 1 to {nomobs_scan_global::%{_chunkid}%}
if {nomobs_scan_global::%{_chunkid}%} > {nomobs.chunklimit.global}:
delete loop-entity
if {nomobs_type_limit_value::%{_ver}%::%{_type}%} is set:
add 1 to {nomobs_scan_type::%{_chunkid}%::%{_type}%}
if {nomobs_scan_type::%{_chunkid}%::%{_type}%} > {nomobs_type_limit_value::%{_ver}%::%{_type}%}:
delete loop-entity
command /nomobs [<text>] [<text>] [<text>]:
permission: nomobs.admin
permission message: {@nm_prefix}&cНет прав.
trigger:
set {_ver} to {nomobs.version}
if arg 1 is not set:
send "&8&m-------------------------------------"
send "{@nm_prefix}&fСтатус:"
send "&7Полный запрет: &e%{nomobs.enabled}%"
send "&7Агрессивные: &e%{nomobs.hostile.enabled}%"
send "&7Мирные: &e%{nomobs.passive.enabled}%"
send "&7Жители: &e%{nomobs.villagers.enabled}%"
send "&7Железные големы: &e%{nomobs.irongolems.enabled}%"
send "&7Лимит на чанк (общий): &e%{nomobs.chunklimit.global}%"
send "&e/nomobs all on|off"
send "&e/nomobs hostile on|off"
send "&e/nomobs passive on|off"
send "&e/nomobs villager on|off"
send "&e/nomobs irongolem on|off"
send "&e/nomobs block <mob>"
send "&e/nomobs unblock <mob>"
send "&e/nomobs blocklist zombie,creeper,skeleton"
send "&e/nomobs unblocklist zombie,creeper,skeleton"
send "&e/nomobs limit <number|off>"
send "&e/nomobs limittype <mob> <number|off>"
send "&e/nomobs reset"
send "&e/nomobs reload"
send "&8&m-------------------------------------"
stop
if arg 1 is "reload":
execute console command "sk reload nomobs"
send "{@nm_prefix}&aСкрипт nomobs перезагружен."
stop
if arg 1 is "reset":
set {nomobs.enabled} to false
set {nomobs.hostile.enabled} to false
set {nomobs.passive.enabled} to false
set {nomobs.villagers.enabled} to false
set {nomobs.irongolems.enabled} to false
set {nomobs.chunklimit.global} to -1
add 1 to {nomobs.version}
delete {nomobs_scan_global::*}
delete {nomobs_scan_type::*}
send "{@nm_prefix}&aВсе запреты и лимиты сброшены."
stop
if arg 1 is "all":
if arg 2 is "on":
set {nomobs.enabled} to true
send "{@nm_prefix}&cПолный запрет спавна мобов включён."
stop
if arg 2 is "off":
set {nomobs.enabled} to false
send "{@nm_prefix}&aПолный запрет спавна мобов выключен."
stop
if arg 1 is "hostile":
if arg 2 is "on":
set {nomobs.hostile.enabled} to true
send "{@nm_prefix}&cСпавн агрессивных мобов запрещён."
stop
if arg 2 is "off":
set {nomobs.hostile.enabled} to false
send "{@nm_prefix}&aСпавн агрессивных мобов разрешён."
stop
if arg 1 is "passive":
if arg 2 is "on":
set {nomobs.passive.enabled} to true
send "{@nm_prefix}&cСпавн мирных мобов запрещён."
stop
if arg 2 is "off":
set {nomobs.passive.enabled} to false
send "{@nm_prefix}&aСпавн мирных мобов разрешён."
stop
if arg 1 is "villager":
if arg 2 is "on":
set {nomobs.villagers.enabled} to true
send "{@nm_prefix}&cСпавн жителей запрещён."
stop
if arg 2 is "off":
set {nomobs.villagers.enabled} to false
send "{@nm_prefix}&aСпавн жителей разрешён."
stop
if arg 1 is "irongolem":
if arg 2 is "on":
set {nomobs.irongolems.enabled} to true
send "{@nm_prefix}&cСпавн железных големов запрещён."
stop
if arg 2 is "off":
set {nomobs.irongolems.enabled} to false
send "{@nm_prefix}&aСпавн железных големов разрешён."
stop
if arg 1 is "block":
if arg 2 is set:
set {nomobs_blocked_value::%{_ver}%::%arg 2%} to true
send "{@nm_prefix}&cЗапрещён спавн: &e%arg 2%"
stop
if arg 1 is "unblock":
if arg 2 is set:
delete {nomobs_blocked_value::%{_ver}%::%arg 2%}
send "{@nm_prefix}&aРазрешён спавн: &e%arg 2%"
stop
if arg 1 is "blocklist":
if arg 2 is set:
set {_listtext} to arg 2
replace all ", " with "," in {_listtext}
set {_list::*} to {_listtext} split at ","
loop {_list::*}:
set {nomobs_blocked_value::%{_ver}%::%loop-value%} to true
send "{@nm_prefix}&cСписок мобов запрещён: &e%{_listtext}%"
stop
if arg 1 is "unblocklist":
if arg 2 is set:
set {_listtext} to arg 2
replace all ", " with "," in {_listtext}
set {_list::*} to {_listtext} split at ","
loop {_list::*}:
delete {nomobs_blocked_value::%{_ver}%::%loop-value%}
send "{@nm_prefix}&aСписок мобов разблокирован: &e%{_listtext}%"
stop
if arg 1 is "limit":
if arg 2 is "off":
set {nomobs.chunklimit.global} to -1
send "{@nm_prefix}&aОбщий лимит мобов на чанк выключен."
stop
if arg 2 is set:
set {nomobs.chunklimit.global} to arg 2 parsed as integer
send "{@nm_prefix}&eОбщий лимит мобов на чанк: &c%arg 2%"
stop
if arg 1 is "limittype":
if arg 2 is set:
if arg 3 is "off":
delete {nomobs_type_limit_value::%{_ver}%::%arg 2%}
send "{@nm_prefix}&aЛимит по типу выключен для: &e%arg 2%"
stop
if arg 3 is set:
set {nomobs_type_limit_value::%{_ver}%::%arg 2%} to arg 3 parsed as integer
send "{@nm_prefix}&eЛимит на чанк для &6%arg 2%&e: &c%arg 3%"
stop
send "{@nm_prefix}&cНеверное использование команды."
✅ Итог
NoMobs — полезный административный Skript для точного контроля мобов на сервере. Он помогает снизить нагрузку, убрать ненужных существ, отключить дроп и навести порядок в чанках. Для небольших и средних серверов это удобное решение без установки тяжёлых дополнительных плагинов.
Вернуться Вчера, 12:19 Просмотров: 4 Автор: xlop



