Описание
# 🕌 **FaithBreak v1.5.0 — Admin Controls & Configurable Breaks!** 🛡️
### 🌟 **Join Our Discord for Giveaways & Events!** 🎮
Join our **[Discord Server](https://discord.gg/snkKDmc89f)** 🔗 for monthly giveaways & events where you can win coupon codes or plugins like **[AstralSwords Premium](https://builtbybit.com/resources/astral-swords.81777/)** or **[TrimBlades](https://builtbybit.com/resources/trimblades.87033/)**! 🎨🚀
---
Warriors of faith, **v1.5.0** is here with **Force Kick Mode** for server admins and a **configurable break duration**! Full admin control over prayer enforcement, plus the flexibility to set your own break time. 🚀
---
## ✨ **What's New in v1.5.0** ✨
### 🎯 Major Improvements
* **feat:** 🔒 **FORCE KICK MODE** — New config option for admins! When enabled, ALL opted-in players are kicked during prayer times — even those in Reminder Mode. Players who used `/non-muslim` are still respected.
* **feat:** ⏱️ **CONFIGURABLE BREAK DURATION** — Admins can now set the prayer break length in minutes via `break-duration` in config. Minimum: 12 minutes, no upper limit!
* **feat:** ⚠️ **SMART WARNINGS** — Players who try to select Reminder Mode while Force Kick is active get a clear warning that they'll still be kicked.
* **fix:** 🧹 **CODE CLEANUP** — Cleaned up redundant kick logic in the non-Middle-Eastern player path for better reliability.
### 🆕 New Config Options
| Option | Default | Description |
|--------|---------|-------------|
| `force-kick-mode` | `false` | When `true`, overrides Reminder Mode → Kick for all players |
| `break-duration` | `12` | Prayer break duration in minutes (min: 12) |
---
## 📋 **Full Feature List** 📋
### 🎮 Player Modes
| Mode | What Happens | Command |
|------|-------------|---------|
| 🔴 **Kick Mode** (Default) | Kicked from server during prayer time | `/muslim kick` |
| 🟡 **Reminder Mode** | Chat reminder only — no kick! | `/muslim reminder` |
| 🟢 **Opt-Out** | Nothing happens — fully opted out | `/non-muslim` |
> ⚠️ If the server has **Force Kick Mode** enabled, Reminder Mode players will still be kicked. Opt-Out players are always respected.
---
## 🔍 What Does FaithBreak Do?
FaithBreak helps players take breaks during prayer times:
- 🌍 **Smart Location Detection**: Automatically detects each player's location based on their IP
- 🕰️ **Prayer Time Awareness**: Calculates accurate prayer times for each player's specific location
- ⏱️ **Timely Reminders**: Two minutes before prayer time, players are kicked or reminded
- ⏳ **Configurable Break**: Kicked players can't rejoin for the configured duration (default: 12 min)
- 🌐 **Multi-Language Magic**: Messages automatically appear in each player's Minecraft language!
- 🎯 **Player Choice**: Choose between Kick Mode, Reminder Mode, or Opt-Out — saved permanently!
- 🔒 **Admin Override**: Server admins can force kick mode globally via config
---
## 💻 Commands
### Player Commands
| Command | Description |
|---------|-------------|
| `/muslim` | Opt in with **Kick Mode** (default) |
| `/muslim kick` | Set mode to **Kick** — kicked during prayer times |
| `/muslim reminder` | Set mode to **Reminder** — chat alerts only, no kick |
| `/non-muslim` | **Opt out** of all prayer kicks and reminders (saved permanently!) |
| `/fb lang` | View current language and available options |
| `/fb lang ` | Change your language (e.g., `/fb lang ar_SA`) |
### Admin Commands (OP only)
| Command | Description |
|---------|-------------|
| `/fb kick ` | Test the kick screen without the break timer |
> 💡 **Tab Completions**: All commands support tab completion! Type `/muslim ` and press Tab to see `kick` and `reminder` suggestions.
---
## 🌍 Supported Languages (10 Total!)
- 🇬🇧 **English** (en_US)
- 🇸🇦 **Arabic** (ar_SA) - العربية
- 🇵🇰 **Urdu** (ur_PK) - اردو
- 🇪🇸 **Spanish** (es_ES) - Español
- 🇫🇷 **French** (fr_FR) - Français
- 🇮🇩 **Indonesian** (id_ID) - Bahasa Indonesia
- 🇮🇳 **Hindi** (hi_IN) - हिन्दी
- 🇩🇪 **German** (de_DE) - Deutsch
- 🇵🇱 **Polish** (pl_PL) - Polski
- 🇳🇱 **Dutch** (nl_NL) - Nederlands
**💡 Server Owners**: Add more languages by creating `[code].yml` files in `plugins/FaithBreak/messages/`!
---
## 📋 Features in Detail
### 🔔 What Happens During Prayer Time?
**For Players in Kick Mode (Default):**
1. 2 minutes before prayer → kicked from server
2. See localized message with prayer name + mode info
3. Kick screen shows how to switch to Reminder Mode or Opt-Out
4. Can rejoin after the configured break duration
**For Players in Reminder Mode:**
1. 2 minutes before prayer → receive a chat reminder
2. Message: "⏰ Reminder: It's [Prayer] prayer time!"
3. No kick — keep playing!
> ⚠️ If `force-kick-mode: true` is set in config, Reminder Mode players are kicked instead.
**For Opted-Out Players:**
- Nothing happens — fully invisible to the prayer system
### 🎮 Choosing Your Mode
**Want to be kicked for prayer? (Strict enforcement)**
```
/muslim kick
```
**Want chat reminders only? (No kick)**
```
/muslim reminder
```
### 🚫 Don't Want Prayer Notifications?
Use `/non-muslim` to opt out:
- You won't receive kicks or reminders
- **Your choice is saved permanently!**
- Switch back anytime with `/muslim`
### 🔒 Privacy First
By default, FaithBreak does NOT log player locations to console:
- No more "Player X location detected: Country, City" spam
- Enable `log-player-locations: true` in config only if needed
### 🧪 Test Mode for Admins
Want to see what players see when kicked?
```
/fb kick Fajr
```
- Shows the exact kick screen with mode info
- No break timer — rejoin immediately!
---
### 📸 What Players See
### English Player (Kick Screen)
```
It's Fajr prayer time! Please take a break.
You can rejoin in 12 minutes.
You are in Kick Mode. Type /muslim reminder for chat-only alerts.
Not Muslim? Type /non-muslim to opt out.
(Your choice is saved permanently and survives restarts)
Learn More: https://modrinth.com/plugin/faithbreak
```
### English Player (Reminder Mode — Chat Message)
```
⏰ Reminder: It's Fajr prayer time!
(You are in Reminder Mode. Use /muslim kick to enable strict kicking)
```
### English Player (Reminder Mode — Force Kick Active)
```
§aYou have opted in to §eReminder Mode§a.
§c⚠ Note: The server has Force Kick Mode enabled. You will still be kicked.
```
### Arabic Player (Kick Screen)
```
حان وقت صلاة الفجر! يرجى أخذ استراحة.
يمكنك العودة بعد 12 دقيقة.
You are in Kick Mode. Type /muslim reminder for chat-only alerts.
Not Muslim? Type /non-muslim to opt out.
(Your choice is saved permanently and survives restarts)
معرفة المزيد: https://modrinth.com/plugin/faithbreak
```
## ⚙️ Configuration
```yaml
# config.yml
debug-mode: false # Detailed debug logging
log-player-locations: false # Log player country/city (default: OFF)
# Force Kick Mode — override Reminder Mode → Kick for all players
# Players who used /non-muslim (Opt-Out) are still ignored
force-kick-mode: false
# Prayer break duration in minutes (minimum: 12)
break-duration: 12
```
## ❓ Frequently Asked Questions
**Q: What's the difference between Kick Mode and Reminder Mode?**
A: **Kick Mode** removes you from the server for the configured break duration during prayer. **Reminder Mode** sends you a chat message but lets you keep playing.
**Q: What is Force Kick Mode?**
A: It's a server-side config option (`force-kick-mode: true`). When enabled, ALL opted-in players are kicked — even those who chose Reminder Mode. Only `/non-muslim` players are excluded.
**Q: Can I change the break duration?**
A: Yes! Server admins can set `break-duration` in `config.yml` to any value ≥ 12 minutes.
**Q: Will my mode choice be remembered after I log off?**
A: Yes! Your mode (Kick/Reminder/Opt-Out) is saved permanently to `playerdata.yml`.
**Q: I was using `/non-muslim` from the old version — will my data be lost?**
A: No! FaithBreak automatically migrates your old `optout.yml` data to the new system.
**Q: Is my location logged to console?**
A: Not by default! Location logging is OFF unless the server admin enables `log-player-locations` in config.
**Q: How do I test the kick screen?**
A: Use `/fb kick Fajr` (or any prayer name) as an OP — you can rejoin immediately!
**Q: I'm not Muslim, will I get kicked?**
A: No! Type `/non-muslim` once to permanently opt out.
**Q: Can I change the language?**
A: Yes! Use `/fb lang ` to change manually, or let the plugin auto-detect from your Minecraft client.
**Q: What if I'm on a VPN or local network?**
A: The plugin detects local/private IPs and disables itself for those connections.
**Q: How do I add a new language?**
A: Copy any existing language file from `plugins/FaithBreak/messages/`, rename it, translate, and restart!
---
## 🎯 **Why Update to v1.5.0?**
**If you've wanted:**
- Full admin control over prayer enforcement on your server
- The ability to force all players into Kick Mode globally
- A configurable break duration instead of a fixed 12 minutes
- Cleaner, more reliable kick logic
**v1.5.0 delivers all of this!**
---
## 🙏 Why I Made This
I made this plugin to help my fellow **Muslim brothers and sisters** stay on track with their **prayer times**.
Let's be real — it's easy to get completely lost in Minecraft and forget 😅
This plugin gives a gentle nudge at the right moment 🕌⏰
Also, fun fact: this plugin is **automatically bundled** with every plugin I make.
Check out my other creations on [Modrinth](https://modrinth.com/user/CiscoCodes)! 😉✨
---
## ☕ Support Me on Ko-fi
If you like my work, consider buying me a coffee:
[](https://ko-fi.com/cisocodes)
---
## 🤝 Contributing
Want to help improve FaithBreak?
- 🌐 **Translate**: Add your language by creating a new `.yml` file
- 🐛 **Report Bugs**: Contact me on [Discord](https://discord.gg/xpJHXywRbx)
- 💡 **Suggest Features**: Share your ideas!
- ⭐ **Star & Share**: Help others discover this plugin!
---
## ❓ Got questions?
Contact me on [Discord](https://discord.gg/xpJHXywRbx)
---
**Made with ❤️ for the Muslim Minecraft community**
*JazakAllahu Khairan (May Allah reward you with goodness) for using FaithBreak!* 🤲