OneWayNether
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); } }
Hi great plugin wondering if this will work for 1.7.10 if not can you please make it so it does thanks a lot for making this!!!
i wanna use this for the skyblock nether world on my server, would this work with bukkit/spigot 1.8.1??? :/
@Jili_The_Spaceboy If can't get back from Nether
Thats the point of this plugin.. lol.
If can't get back from Nether, It means if admins set that when die, your item will drop, it mean you will LOST ALL of your items. Bad Idea.
This is very Useful. It's a Simple way to get rid of the Constant Portals appearing around Spawn from players Leaving the Nether. I like this Simple idea better than a Personal Nether Portal idea!
Oh wow, thanks!
This actually looks better, especially with the custom message thing. I will test this soon.
(I am the one who requested it by the way)
@Penguinchao
No. He asked for OneWay portals ;)
Would the player be able to return through the portal from which he came?