Перейти к содержимому
Mineforgian

NewbieGuardplus

Temporary PvP protection for new players

Загрузки
13
Подписчики
0
Обновлён
26 июня 2026 г.
Лицензия
Apache-2.0

Опубликован 21 июня 2026 г.

new

🛡️ NewbieGuard

Temporary PvP protection for new players, built for Folia.

Folia · Java 21+ · Adventure boss bar


New players get a head start: a configurable protection window the moment they first join, with a live boss bar counting down the time left. The countdown pauses while they're offline, and protection drops automatically the moment they throw the first punch.

Built specifically for Folia — it uses the region and entity schedulers throughout and never touches the legacy BukkitScheduler.


✨ Features

  • 🧍 First-join protection — new players are shielded for a configurable duration (default 60 minutes).
  • 📊 Live boss bar — counts down every second and shifts colour as time runs low: 🟢 green → 🟡 yellow → 🔴 red.
  • ⏸️ Offline-safe — the timer only ticks while the player is online; time offline is never deducted.
  • 🚫 PvP shield — incoming attacks on a protected player are cancelled, and the attacker gets a short, spam-protected notice.
  • ⚔️ Fair play — if a protected player strikes someone first, their own protection is removed (configurable).
  • 🔑 Staff bypassnewbie.bypass lets staff hit protected players for testing.
  • 🛠️ Manual control — grant or remove protection at any time with commands.
  • 👥 New players only — returning players are never protected.

💬 Commands

Command Description Permission
/newbie check [player] Show remaining protection time newbie.check (self) · newbie.admin (others)
/newbie grant <player> [minutes] Grant protection to an online player newbie.admin
/newbie remove <player> Remove a player's protection newbie.admin

🔐 Permissions

Permission Description Default
newbie.bypass Attack protected players op
newbie.check Check your own remaining time everyone
newbie.admin Grant / remove protection, check others op

⚙️ Configuration

protection-duration-minutes: 60
remove-on-attack: true
bypass-permission: "newbie.bypass"

bossbar:
  green-threshold-minutes: 10
  yellow-threshold-minutes: 5

messages:
  protection-start: "&aYou are protected from PvP for {duration} minutes"
  protection-expired: "&eYour PvP protection has expired"
  protection-removed-attack: "&cYou attacked another player — your protection has been removed"
  blocked-attack: "&cThis player is still under new-player protection and cannot be attacked"
  bossbar-format: "New Player PvP Protection — Time left {time}"

💡 The boss bar supports {time}, {minutes} and {seconds} placeholders. Chat messages support legacy & colour codes.


📦 Requirements

Server Folia
Java 21 or newer

📝 Notes

  • Protection is stored in each player's persistent data, so it survives restarts and rejoins.
  • Players who joined before the plugin was installed are not protected — use /newbie grant to protect them manually.

Lightweight, no dependencies, and Folia-native.

Ченджлог

1.0.3Релиз26.1, 26.1.1, 26.1.2 · 26 июня 2026 г.

NewbieGuard 1.0.3

Two new player-friendly features, plus better compatibility with grave plugins.

✨ What's new

📱 Mobile-aware countdown (action bar)

Bedrock / Geyser players now see the protection countdown on an action bar instead of a boss bar — boss bars are unreliable on mobile clients and could even disconnect them on join. Java players keep the regular boss bar.

Control it with the new display-mode option:

# auto      = boss bar for Java, action bar for mobile (Bedrock/Geyser)
# bossbar   = always boss bar
# actionbar = always action bar
display-mode: auto

Mobile players are detected through the Floodgate API when it's installed (no hard dependency — detection just falls back to the Floodgate UUID pattern if it isn't).

💀 Keep items on death for protected players

New players who die while still under protection now keep their items and experience — no drops, no level loss. Great for stopping fresh players from rage-quitting after an early death.

keep-inventory-on-death: true

Runs at the lowest event priority so it plays nicely with grave / death-storage plugins like DeadChest (the keep-inventory state is set before they decide whether to make a grave).

🔧 Compatibility

  • Folia 26.1.2 (Java 25)
  • Optional soft integration with Floodgate
1.0.2Релиз26.1, 26.1.1, 26.1.2 · 24 июня 2026 г.

[1.0.2] - 2026-06-24

Added

  • Command-block system for protected new players (command-block) — blocks configured commands while a player is still under newbie PvP protection.
    • CommandListener handles PlayerCommandPreprocessEvent (priority HIGH).
    • Command-boundary matching: warp blocks /warp and /warp <args> but not /warpaccept.
    • Supports sub-commands, e.g. tpa accept blocks only /tpa accept.
    • Players with the newbie.bypass permission are exempt.
  • New command-block config section (enabled + default command list: warp, tpa, tpahere, home, rtp, wild).
  • New messages.command-blocked message.

Changed

  • Registered CommandListener in NewbieGuardPlugin.
  • Added commandBlockedMessage() method to ProtectionManager.
1.0.1Релиз26.1, 26.1.1, 26.1.2 · 21 июня 2026 г.

Changelog

All notable changes to NewbieGuard are documented in this file.

[1.0.1] - 2026-06-22

Fixed

  • Fixed mobile (Bedrock/Geyser) players being disconnected immediately on join. The BossBar title used a per-character MiniMessage hex gradient that Geyser could not translate into a Bedrock-compatible packet, kicking mobile players. The title is now rendered with plain legacy colour codes (the bar still shifts green → yellow → red as time runs out).

Added

  • New config option bossbar.show-delay-seconds (default: 3). Delays showing the BossBar after join so Bedrock clients finish connecting before receiving the packet. Set to 0 to show instantly.

Changed

  • All messages and the BossBar time format are now in English (e.g. 59m 30s).

[1.0.0] - 2026-06-21

Added

  • Initial release.
  • New players receive PvP protection for a configurable duration (protection-duration-minutes, default 60).
  • Protection persists across relogs and pauses while the player is offline (remaining time stored in the player's PersistentDataContainer).
  • BossBar countdown that changes colour (green → yellow → red) as time runs out.
  • Optional removal of protection when the protected player attacks someone first (remove-on-attack).
  • Admin command /newbie check|grant|remove and permission newbie.bypass.
  • Folia support.
1.0.0Релиз26.1, 26.1.1, 26.1.2 · 21 июня 2026 г.

Temporary PvP protection for new players built for Folia

Комментарии

Загружаем…