Mineuniverse
Log in Register
Plugins

OneWayNether

Deny people from using the nether portal to the normal world.
by _ForgeUser6668601
Download Claim this project
1,108 downloads
0 likes
Updated Jun 30, 2026
0 hypes
Admin Tools Anti-Griefing Tools Mechanics Teleportation

Description

This plugin denies people from using the Portal in the nether to prevent griefers walking into other people's bases.

Forum

http://forums.bukkit.org/threads/one-way-nether.164270/

Config

You can change the message, people recieving when entering the portal in the config.

locale:
  deny: You are not allowed to go back from the nether!

Permission

The permission node to bypass this is

onewaynether.bypass

Source

import org.bukkit.World.Environment;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.HandlerList;
import org.bukkit.event.Listener;
import org.bukkit.event.player.PlayerPortalEvent;
import org.bukkit.plugin.java.JavaPlugin;

public class OneWayNether extends JavaPlugin implements Listener {
	public static final String LOCALE_DENY = "locale.deny";

	public void onEnable() {
		this.getServer().getPluginManager().registerEvents(this, this);

		this.getConfig().addDefault(LOCALE_DENY,
				"You are not allowed to go back from the nether!");
		this.getConfig().options().copyDefaults(true);
		this.saveConfig();
	}

	public void onDisable() {
		HandlerList.unregisterAll((Listener) this);
	}

	@EventHandler
	public void onPlayerPortal(PlayerPortalEvent event) {
		Player p = event.getPlayer();
		if (p.hasPermission("onewaynether.bypass") || p.isOp())
			return;
		if (!event.getFrom().getWorld().getEnvironment()
				.equals(Environment.NETHER))
			return;
		if (!event.getTo().getWorld().getEnvironment()
				.equals(Environment.NORMAL))
			return;
		p.sendMessage(this.getConfig().getString(LOCALE_DENY));
		this.getLogger()
				.info(p.getName()
						+ " tried to get from the nether to the normal world but was denied.");
		event.setCancelled(true);
	}

}
OneWayNether v1.0
MC 1.6.2
Release 2013-08-01 Get

More from _ForgeUser6668601

EffectLib
534,798

You Might Also Like

AdBolt Advertising Network
Make money from your Minecraft server by running ads!
9,992
Mineload
Mineload
9,978
BeastTP
BeastTP v1.0 - Teleportation Made Easy! -[Permissions][1317]
9,966
RegionManager
generate regions with just one command!
9,950
TimeKeeper
Keep the Server-Playtime per Day
9,948
SimpleAdmin
simple way to ban/kick unwanted players from your server
9,945