Skip to content

neuregex/NetherGuard

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

🛡️ NetherGuard v1.0.0

Complete Nether portal protection plugin for Spigot/Paper 1.8.9

Solves the 3 main issues with Nether portals without having to disable them entirely:


Problems It Solves

1. 🪤 Anti-Trap (Portal Traps)

Problem: Players trap others inside portals surrounded by obsidian. The victim can't type in chat or move.

Solution:

  • Automatically detects how long a player has been inside a portal
  • If the time limit is exceeded (configurable, default 8 seconds), teleports them to a safe location
  • Players can press Shift to cancel the teleport and get rescued
  • Saves the player's last safe location for rescue

2. 📦 Anti-Dupe (Item Duplication)

Problem: Exploits that abuse entity desynchronization when crossing portals to duplicate items.

Solution:

  • Blocks non-player entities (dropped items, mobs) from crossing Nether portals
  • Limits the amount of dropped items near portals (automatic cleanup)
  • Monitors suspicious drops near portals

3. 🏠 Anti-Grief (Portals in Protected Areas)

Problem: Players create portals in the Nether (1:8 scale) that generate inside other players' protected bases in the Overworld.

Solution:

  • Checks WorldGuard permissions at the portal destination before teleporting
  • Blocks portal creation in other players' protected zones
  • Essentials fallback: protects a radius around player homes
  • Redirects to safe locations when a destination is blocked

Requirements

  • Server: Spigot, PaperSpigot, TacoSpigot, or PandaSpigot 1.8.9
  • Java: 8 or higher
  • Optional: WorldGuard 6.x, Essentials (improve protected zone detection)

Installation

  1. Compile the plugin or download the pre-built .jar
  2. Place NetherGuard-1.0.0.jar in your server's plugins/ folder
  3. Restart the server
  4. Edit plugins/NetherGuard/config.yml to your liking
  5. Use /ng reload to apply changes

Building

Using Maven:

cd NetherGuard
mvn clean package

The .jar file will be generated at target/NetherGuard-1.0.0.jar

You can also open the project directly in IntelliJ IDEA (File → Open on the root folder) and run Maven → Lifecycle → package from the Maven panel.

Note: If you run into issues with the WorldGuard dependency, you can comment it out in pom.xml. The plugin uses reflection to access WorldGuard, so it compiles and works fine without it.

Commands

Command Description Permission
/ng reload Reload configuration netherguard.admin
/ng status Show module status netherguard.admin
/ng rescue <player> Manually rescue a player from a portal netherguard.admin

Permissions

Permission Description Default
netherguard.admin Access to all commands OP
netherguard.bypass.trap Immune to the anti-trap system OP
netherguard.bypass.grief Can create portals in protected zones OP
netherguard.bypass.all Full bypass OP

Configuration

All settings are documented in config.yml. Key values:

anti-trap:
  max-seconds-in-portal: 8     # Seconds before automatic rescue
  shift-to-cancel: true         # Shift to exit the portal
  rescue-location: SPAWN        # SPAWN, BED, or LAST_SAFE

anti-dupe:
  block-entity-portal: true     # Block entities from crossing portals
  max-entities-near-portal: 10  # Item limit near portals

anti-grief:
  use-worldguard: true          # WorldGuard integration
  use-essentials-homes: true    # Essentials home-based protection
  protection-radius: 50         # Protection radius (blocks)

Project Structure

NetherGuard/
├── pom.xml
├── README.md
└── src/main/
    ├── java/com/netherguard/
    │   ├── NetherGuard.java           # Main plugin class
    │   ├── listeners/
    │   │   ├── AntiTrapListener.java  # Anti-trap module
    │   │   ├── AntiDupeListener.java  # Anti-dupe module
    │   │   └── AntiGriefListener.java # Anti-grief module
    │   ├── tasks/
    │   │   └── PortalTrapChecker.java # Periodic rescue task
    │   └── utils/
    │       ├── MessageUtil.java       # Color code utility
    │       └── RegionHelper.java      # WorldGuard/Essentials integration
    └── resources/
        ├── plugin.yml
        └── config.yml

License

MIT License — feel free to use, modify, and distribute.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages