9

I have users repeatedly using ender pearls to get on the roof of the nether (128 blocks+) and build up there. I want to avoid this. Currently, the only way I could think of is blacklisting ender pearls in the nether, but if possible, I want to keep the pearls and prevent it otherwise.

What I have checked already:

  • Full-height nether: I could not find a generator that would do that.
  • Worldguard regions: I was not able to create a really large region, nevermind and endless one. I could do this only for a certain area (around the nether spawn), but I would prefer to have a solution that covers the whole nether
  • Worldborder: I submitted a feature request for Worldborder since it currently only supports x/z coordinates, not y.
  • Plugins: I could not find any plugins that are half way up to date doing this.

Any other ideas? Running latest version of Spigot.

  • 1
    I made you a plugin, I hope it is what you are looking for! – user112881 May 22 '15 at 11:05
  • 1
    Why do you want to do that? Knowing why might help you give an answer. – o0'. May 22 '15 at 14:43
14

I made you a plugin! (It teleports them to the nether spawn if they go above that height) https://www.mediafire.com/?0cux9xl73ty3f1c Make sure the spawn isn't in any lava, as it does not account for that.

Source code:

public class main extends JavaPlugin implements Listener  
{
    public static Bukkit plugin;
    public void onEnable()
    {
        Bukkit.getServer().getPluginManager().registerEvents(this, this);

        Bukkit.getConsoleSender().sendMessage(ChatColor.DARK_RED + "Enabled!");
    }

    public void onDisable()
    {
        getLogger();
        Bukkit.getConsoleSender().sendMessage(ChatColor.DARK_RED + "Disabled!");
    }

    @EventHandler
    public void onPlayerMove(PlayerMoveEvent event) 
    {
        Player p = event.getPlayer();
        {
            if (event.getPlayer().getLocation().getWorld().getName().endsWith("_nether"))
            {
                if (event.getPlayer().getLocation().getY() > 127)
                {
                    World nether = Bukkit.getWorld("world_nether");
                    p.teleport(nether.getSpawnLocation());  
                }
            }
        }
    }
}
  • 7
    If possible, consider posting the source code for the plugin instead of a link to the .jar. – Lilienthal May 22 '15 at 14:56
  • 4
    Updated it with source code. – user112881 May 22 '15 at 19:13
  • 1
    What's the point of calling getLogger() without using the return value? – user253751 May 23 '15 at 10:50
  • Also, shouldn't it be World nether = event.getPlayer().getLocation().getWorld() or similar? Otherwise you might teleport them from a multiworld nether to the default nether. – user253751 May 23 '15 at 10:51
  • 1
    About using getLogger() without returning anything, whenever I make a plugin I use a template that I made which includes getLogger(), because usually I do need to return something. And to @immibis (Btw, are you the real immibis? Love your stuff on computercraft :P) I just wrote that out quickly, you could do that to account for a multiworld nether but by the tone and wording of the nether (He never says nethers) I believe that it was only one netherworld. – user112881 May 23 '15 at 11:35
11

There's a relatively simple command block solution to this, which works in vanilla.

First, set up a scoreboard objective to detect players in the Nether

/scoreboard objectives add onNetherCeiling dummy

Create a clock (I suggest using a fill clock) in your spawnchunks (so that it is always loaded), hidden in a box of Bedrock, and add the following three command blocks, to be run in this order:

/scoreboard players set @a onNetherCeiling 0
/scoreboard players set @a[m=0,y=127,dy=128] onNetherCeiling 1 {Dimension:-1}
/effect @a[score_onNetherCeiling_min=1] 20 1 2 false

The first two commands will assign a score of 1 to every player in survival mode (m=0), in dimension -1 (the Nether), with a y coordinate between 127 and 255.

The last command will hit the evildoers with 1 second of Wither II. You can do whatever you want here instead, just use @a[score_onNetherCeiling_min=1] as your target and it works. If you prefer smiting them for their insolence, try

/execute @a[score_onNetherCeiling_min=1] ~ ~ ~ summon LightningBolt ~ ~ ~

There is a slight chance that this won't work with Bukkit/Spigot though, due to the way Bukkit treats the alternate dimensions. Assuming that does not affect NBT data (and I don't see any reason for that), you can place the command blocks on top of the Nether ceiling instead, but you will have to make sure the chunk they are in stays loaded.

  • Sound interesting. Always loaded means as long as someone is in the Netherlands, right? – uncovery May 22 '15 at 8:48
  • Yes. However, if everyone is in the overworld, it will not work. – angussidney May 22 '15 at 9:37
  • @AngusAtkinson If everyone is in the overworld, there's no need for it to work though. – MrLemon May 22 '15 at 9:45
  • @uncovery If nobody is in the Nether, there is no need to check for players then, so it doesn't necessarily need to run there. Make sure that the clock is running if someone is though. A fill clock might need a "kickstart". – MrLemon May 22 '15 at 9:49
  • 1
    I am actually making you a plugin right now! :D – user112881 May 22 '15 at 10:42
0

Rather than changing a lot of blocks, consider this:

enter image description here

To complete the teleport exploit I believe you need to have a 1 block between you and the nether roof, so if you make it so there is none of that, they can't teleport.

So you can either make it so there are no 1 block gaps (design 2), or you can make it completely solid (design 1).

  • 4
    I wonder what this refers to. – Dronz May 22 '15 at 23:57
  • He means that the nether roof should have more than 1 block minimum thickness to prevent teleporting with ender pearls. – uncovery May 23 '15 at 6:36
-1

You could use a Worldedit to fill up the space above for all the allowed space in the nether with bedrock, so when they teleport up, they suffocate and learn that doing that is not allowed.

That would take a long time to do, that's like 50 billion blocks. Using a rig with 128GB ram dedicated to the server, twin/triple/quad 2080TI cards, the best cpu on the market it would still crash trying to place that many blocks. Even doing 50 million blocks at a time would take you a long time to place that many. There's tons of plugins that prevent building above the nether ceiling and give ceiling void damage. For instance, I use this on my server: https://dev.bukkit.org/projects/no-above-nether?gameCategorySlug=bukkit-plugins&projectID=263893

shareedit

-2

You could use a Worldedit to fill up the space above for all the allowed space in the nether with bedrock, so when they teleport up, they suffocate and learn that doing that is not allowed.

  • 1
    Our nether is by now several tens of thousands of blocks in any direction from spawn. I do not think filling billions of blocks of air with Worldedit is the right way to go. – uncovery May 22 '15 at 9:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.