Filled 1WayForceField

Discussion in 'Plugin Requests' started by FireFlies, May 7, 2017.

Thread Status:
Not open for further replies.
  1. Offline


    Minecraft version: 1.8.8

    Plugin name: 1WayForceField

    What I want: I need a plugin that would allow players to physically walk out of a world guard region, but not walk back in (they can get back in by doing /spawn for example).

    This would need to be as non-laggy as possible, and non-glitchable (players can't force their way in it by using enderpearls or breaking blocks for example).

    No commands.

    No permissions.

    Thank you so much in advance!

    Kind regards,

  2. Offline


    I can do this. I'm going to add one command, though, just in case you decide you don't want this plugin to apply to every WorldGuard plugin on your server. It'll let you select specific areas to have this one-way force field.
  3. Offline


    @htmlman1 Oh yes, it would need to work on only 1 world guard region in 1 world! Sorry for not specifying, it completely flew over my head.
    I think it would be nice if I can just specify the region to have it work on.
    Last edited: May 7, 2017
  4. Offline


    Sure, no problem!


    @FireFlies Finished.

    Like I said, I added one command - /oneway - which is just used to manage the regions controlled by this plugin. The command has two abilities, which should be pretty satisfactory:

    /oneway add <region> - Makes region <region> a one-way deal.
    /oneway remove <region> - Restores full movement to region <region>.
    This actually works for multiple regions, just in case you ever decide you need more. Just add and remove them as needed. Players will only be able to walk out - not in - of the regions specified, unless they're opped, in which case they'll still have free reign.

    Well, that's all for explanation. If you have any problems, contact me ASAP so I can fix them! Hope this works for you.
    Last edited: May 7, 2017
    FireFlies likes this.
  5. Offline


    @FireFlies Just in case the edit of the original post didn't notify you (since it doesn't ever seem to), here's a double post...but with the intention of letting you know the plugin is finished.
    FireFlies likes this.
  6. Offline


    Ah! Yeah I didn't get any notifications! I will test this right away and give feedback.

    @htmlman1 alright so, it seems that there are 3 problems.

    1. If I set the forcefield to a region, players can't teleport at all inside the region.

    This is my setup:

    I have 2 worlds: worldA and worldB
    In worldB there are 2 regions: arena and spawn (spawn is inside arena).
    I set OneWay to the spawn region, so they can get out of spawn and into the arena, but they can't get back in spawn unless they do /spawn.
    Right now, if a player is in worldA and wishes to go to worldB (with a warp), it doesn't work. They don't teleport at all. I also tried forcing them to teleport but they just stay in worldA. There are no errors in the console.

    All in all: Players can't get into the region with OneWay enabled using teleportation (/spawn, /warp, /tp etc..) I just want players to not be able to physically get into the region (walking).

    2. If a player touches the invisible wall from the outside, it tells world guard that they're in the forbidden region.

    It's hard to explain without showing.
    Basically, in the spawn region I have set where if you walk out you get a kit, and if you walk back in it clears your inventory.
    So with OneWay enabled, if someone walks out then tries to go back in spawn, it will think they went back in spawn and back out for a brief moment: clearing their inventory and giving them a fresh kit.

    I need it to completely negate people from getting into the spawn region, if you see what I mean.

    3. Players get "stuck" in the wall.

    So, if a player walks straight into the invisible wall, he gets stuck in it until he walks out, I really can't have that since there will be pvp and players will be pushed into the wall.

    The wall needs to act like an actual wall of blocks, so you don't get stuck.

    You can check out this plugin: it generates a red glass wall for the player if he gets close to the spawn like so:

    The spawnshield plugin is very buggy and players can easily glitch through the wall..

    But I would prefer to avoid using a physical wall since it might be using more resource usage than needed, but I might be wrong and it is to me the most logical way to do it.

    Other than that, I think it's fine! :)
    Last edited: May 9, 2017
  7. Offline



    Well damn, my bad! Didn't expect there to be so many errors.

    I'll update the plugin to make a wall out of glass (or any other configurable block), instead of just using the standard "invisible" wall - this will keep players from being registered as entering the forbidden region, and will make it much harder to glitch through them. It shouldn't affect resource usage much. As for the teleportation issues, they also relate to a mistake I made in the program's code, which cancels all kinds of teleportation inside the region - not just enderpearls.

    Again, sorry for the inconvenience.
  8. Offline


    Sounds good! And please don't make the wall appear if the player isn't near it, so it's invisible until you get near it like in the GIF I sent above.

    Thanks a lot! And no problem for the issues.
  9. Offline


    Any updates? :)
  10. Offline


    Almost done, sorry. Busy week for me, but I promise I haven't abandoned this plugin. I've already made the plugin generate a wall for players trying to reenter restricted regions - now I'm just making it a bit more selective about which area of said wall it generates.
  11. Offline


    Alrighty no problem! Just keep me updated ;)
  12. Offline


    Okay, here we go! Sorry for the delay. Commands are the same as before, but the plugin's functionality is completely different - I guarantee no one's getting stuck in invisible barriers anymore, and command teleportation will work now. Apologies about the bugs with the last build.

    The plugin now generates a small mini-wall of blocks that follows players and blocks them from entering (lag-free, non-destructive to terrain), and will knock them out of the region if they somehow get past this wall. Here's the download:

    I'm pretty sure this should work, but if there are any issues and I get proven wrong, please tell me!
  13. Offline



    Alright so I just installed it and there doesn't seem to be any generated blocks! A player can still get into the invisible barrier and get a fresh kit since he goes in spawn for a brief moment. The knockback part works, but it would be very annoying for players that keep getting hit into it and getting knocked back every time.

    Do you think you could generate an actual wall of blocks like lime stained glass, if a player gets near it? This would avoid players from both going inside the region and getting knocked back.

    Thanks for everything! It's almost perfect.
  14. Offline


    Weird - on my test server, this is what happens when I get close to a marked region:

    What happens for you? Do you see any blocks at all?
  15. Offline


    No there aren't any blocks at all :/ Are you sure the link is updated to the latest version of the plugin?
  16. Offline

    timtower Administrator Administrator Moderator

  17. Offline


  18. Offline


  19. Offline


  20. Offline


    Alright so there are no blocks, but players can't get into the region anymore like they used to so that's an improvement. Also if you could remove the knockback effect that would be nice since it pops up in the anti cheat :p
  21. Offline


    No blocks? Still? That's really weird, since they'd have to be present there in some way if your players aren't able to move into the region anymore. Maybe they're just not rendering. I might just change the plugin's generated blocks to reflect that, then - instead of using stained glass, I'll use the invisible barrier block so it won't make a difference whether your players can see them or not.

    And sure, I'll remove the knockback effect :)
    Last edited: May 21, 2017
  22. Offline


    Are you sure there is no way to render the glass? I really need it to be colored glass!
  23. Offline


    I'll take a look at the file you sent me and see if I can make things work.
  24. Offline


    Alright thank you very much!
Thread Status:
Not open for further replies.

Share This Page