Описание
# 🧲 **LMX-Magnets — Custom Magnetic Zones**
> **Paper plugin | Minecraft 1.21.8 | Java 21+**
---
# 🇺🇸 **English**
## 📖 Overview
**LMX-Magnets** is a gameplay and utility plugin for **Paper** that adds fully configurable magnetic zones to your Minecraft world.
Magnets can attract items, entities, and even players based on realistic “metal interaction” logic.
All magnets are persistent and saved automatically in `config.yml`, surviving server restarts.
> ⚠️ **Status:** Active development — mechanics may expand over time.
---
## ✨ Features
### ✔️ Magnetic Zones
Each magnet has:
* World location
* Radius
* Strength
Magnets:
* Pull metal-related items
* Affect selected entities
* Can pull players wearing/holding metal
* **Do NOT affect Creative players**
### 🔊 Immersive Sound
Players inside a magnet hear a subtle beacon ambient sound.
### 💾 Reliable Persistence
* Saved in `config.yml`
* Auto-loaded on server startup
* If a world isn’t loaded yet, the magnet loads later
---
## 🛠️ Commands (`magnet.use`)
| Command | Description |
| ------------------------------------------------------- | ---------------------------------- |
| `/magnet create ` | Create a magnet |
| `/magnet create ... -r` | Replace existing magnet |
| `/magnet remove ` | Delete a magnet |
| `/magnet list` | Clickable list (teleport on click) |
| `/magnet info ` | Show magnet details |
| `/magnet edit radius ` | Change radius |
| `/magnet edit strength ` | Change strength |
| `/magnet tp ` | Teleport to magnet |
| `/magnet tp nearest` | Teleport to nearest magnet |
Hover text in list: **“Click to teleport.”**
---
## 🎯 What is affected?
### 📦 Items
* Iron & Netherite gear
* Rails & minecarts
* Buckets, anvils, cauldrons
* Lodestone, compasses, shears
* Raw iron materials
* Heavy core, trial keys, etc.
### 🤖 Entities
* Iron Golems
* All minecarts
* Falling anvils
* Ender pearls
* Vindicators
### 👤 Players
Affected if:
* Not in Creative
* Wearing metal armor **or** holding metal
---
## ⚙️ Example config
```yaml
magnets:
iron_core:
world: world
x: 100.0
y: 64.0
z: 200.0
radius: 15.0
strength: 0.4
```
---
## 📌 Requirements
* **Paper 1.21.8**
* **Java 21+**
---
## 📥 Installation
1. Download the `.jar` from **Releases**
2. Put it in `plugins/`
3. Restart the server
4. (Optional) Edit `config.yml`
---
## 🐛 Issues & Support
Please report bugs via **GitHub Issues**.
Suggestions and pull requests are welcome.
---
## 📜 License
**MIT License**
Based on the original plugin by **Andcool**, adapted for **Luminex**.
---
---
# 🇷🇺 **Русский**
## 📖 Описание
**LMX-Magnets** — это плагин для **Paper**, добавляющий настраиваемые магнитные зоны в Minecraft.
Магниты притягивают предметы, некоторых мобов и игроков по логике “металлического взаимодействия”.
Все магниты сохраняются в `config.yml` и восстанавливаются после перезапуска сервера.
> ⚠️ **Статус:** Активная разработка — механики могут дополняться.
---
## ✨ Возможности
### ✔️ Магнитные зоны
Каждый магнит имеет:
* Мир
* Координаты
* Радиус
* Силу притяжения
Магнит:
* тянет металлические предметы
* притягивает некоторых сущностей
* может тянуть игроков с металлом
* **не действует на Creative**
### 🔊 Звук
Игроки внутри радиуса слышат гул маяка.
### 💾 Сохранение
* Хранится в `config.yml`
* Загружается при старте сервера
* Если мир не загружен — магнит появится позже
---
## 🛠️ Команды (`magnet.use`)
| Команда | Описание |
| ------------------------------------------------------- | --------------------- |
| `/magnet create ` | Создать магнит |
| `/magnet create ... -r` | Заменить существующий |
| `/magnet remove ` | Удалить магнит |
| `/magnet list` | Кликабельный список |
| `/magnet info ` | Информация |
| `/magnet edit radius ` | Изменить радиус |
| `/magnet edit strength ` | Изменить силу |
| `/magnet tp ` | Телепорт |
| `/magnet tp nearest` | К ближайшему магниту |
Подсказка при наведении: **«Телепортироваться»**
---
## 🎯 Что притягивается?
### 📦 Предметы
* Железо и незерит
* Рельсы и вагонетки
* Вёдра, наковальни, котлы
* Магнетит, компасы, ножницы
* Сырые железные ресурсы
* Тяжёлое ядро, ключи испытаний и др.
### 🤖 Сущности
* Железные големы
* Вагонетки всех видов
* Падающие наковальни
* Эндер-жемчуг
* Поборники
### 👤 Игроки
Игрок притягивается, если:
* не в Creative
* носит металлическую броню **или** держит металл
---
## ⚙️ Пример конфига
```yaml
magnets:
iron_core:
world: world
x: 100.0
y: 64.0
z: 200.0
radius: 15.0
strength: 0.4
```
---
## 📌 Требования
* **Paper 1.21.8**
* **Java 21+**
---
## 📥 Установка
1. Скачать `.jar` из **Releases**
2. Поместить в `plugins/`
3. Перезапустить сервер
4. (Опционально) настроить `config.yml`
---
## 🐛 Поддержка
Сообщайте об ошибках в **GitHub Issues**.
Идеи и pull requests приветствуются.
---
## 📜 Лицензия
**MIT**
Основано на плагине **Andcool**, адаптировано для **Luminex**.
---
**Created and maintained by *n1ghtshdow* for *Luminex Server*.**