[COMPLETED] One way Nether

Discussion in 'Archived: Plugin Requests' started by UnlitedOwns, Jul 31, 2013.

  1. Offline

    UnlitedOwns

    Plugin category: Anti-Griefing tools

    Suggested name: OneWayNether

    What I want: I would like the plugin to make Nether portals only work from World to nether, and no way back. So it would only allow you to go in the nether with normal nether portals.

    This would be usefull against people who go through other their portals to grief/steal.

    Ideas for commands: None

    Ideas for permissions: onewaynether.bypass (Can go back, not needed though.. just an idea)

    When I'd like it by: As soon as possible

    Thanks for reading, I have been looking for a plugin like this all over the web.. Didn't find what I was looking for..
     
  2. Offline

    rsod

    Doesn't really seems to be useful and convenient for people. To prevent griefing use GriefPrevention or similar plugin.
     
  3. Offline

    Cybermaxke

    rsod It is usefull for faction servers because players can in other bases through the portals.
     
  4. Offline

    rsod

    well, if that plugin would be done, it should allow player to go through his portal to his base. I would actually like to record in which portal player entered last time and teleport him to that portal whenever he will walk through any portal. Actually I was gonna make that for my server, but I figured that there would be problems with entites walking through portal and I decided leave this idea for better times. Maybe I'll do simplified version soon.
     
  5. Offline

    UnlitedOwns

    rsod Sounds good! Tell me if the plan is a go.
     
  6. Offline

    bradicaljh

    rsod if you don't mind, I'll start working on this soon.
     
  7. Offline

    clienthax

    On it


    http://uppit.com/ll4jqffgt6m1/OneWayNether.jar
    Permission node
    oneWayNether.bypass

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 3, 2016
  8. Offline

    UnlitedOwns

    clienthax Thank you so much! :D

    clienthax Oh and you may post it on dev bukkit if you want, I am sure there are more people out there who would love this.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 3, 2016
  9. Offline

    Slikey

    just finished it too :(

    here is the source

    Code:java
    1. import org.bukkit.World.Environment;
    2. import org.bukkit.entity.Player;
    3. import org.bukkit.event.EventHandler;
    4. import org.bukkit.event.HandlerList;
    5. import org.bukkit.event.Listener;
    6. import org.bukkit.event.player.PlayerPortalEvent;
    7. import org.bukkit.plugin.java.JavaPlugin;
    8.  
    9. public class OneWayNether extends JavaPlugin implements Listener {
    10.  
    11. public void onEnable() {
    12. this.getServer().getPluginManager().registerEvents(this, this);
    13. }
    14.  
    15. public void onDisable() {
    16. HandlerList.unregisterAll((Listener) this);
    17. }
    18.  
    19. @EventHandler
    20. public void onPlayerPortal(PlayerPortalEvent event) {
    21. Player p = event.getPlayer();
    22. if (p.hasPermission("onewaynether.bypass") || p.isOp())
    23. return;
    24. if (!event.getFrom().getWorld().getEnvironment()
    25. .equals(Environment.NETHER))
    26. return;
    27. if (!event.getTo().getWorld().getEnvironment()
    28. .equals(Environment.NORMAL))
    29. return;
    30. event.setCancelled(true);
    31. }
    32.  
    33. }
    34.  
     
  10. Offline

    clienthax

    You have a better way of detecting if its the nether ;)
     
  11. Offline

    Slikey


    I see. You have a very unsafe way to detect wheather it's nether or not. Here is my download link.
    You can configure the message for the player in the config.yml.

    Edit: Keep in mind, that this does not work with PermissionEX.. I will add support on demand
    Edit2: The permission is as wanted: "onewaynether.bypass"

    Now on Bukkit-Dev:
    http://dev.bukkit.org/bukkit-plugins/onewaynether/

    http://up.ht/14mg0SF
     
  12. Offline

    UnlitedOwns

    Updated the forum post. Big thanks to everybody who helped.
     

Share This Page