Circular PvP and safezones?

Discussion in 'Archived: Plugin Requests' started by MCTutorialist, Oct 19, 2013.

  1. Offline

    MCTutorialist

    Hey guys, I was on <Removed advertising - Necrodoom> and I saw that they had blue carpet and red carpet to define the pvp regions :confused:

    [​IMG]

    Anyone know of any plugins like this?

    if there isnt, can anyone make a plugin like this? :) <3
     
  2. Offline

    jprules

    hey i have a tip
    use : worldguard
    with worldguard you can make regions and make their pvp ore not
    you do it like this: Install worldedit and worldguard (worldedit is needed)
    make with a wooden axe a selection and type /rg define <regionname>
    then type /rg flag <regionname> pvp deny/allow
    i hope it helps you ( :

    ow sry i fergot when you make your selection then type //expand vert and then /rg define

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

    MCTutorialist

    Yeah but... how can I make it in lets say a circular area? lets say I made a place with //hcyl <block> <radius>
    how can I make that cyl area a region, not a square...
     
  4. Offline

    Yebol


    Unfortunately you can't, you'd have to individually select lines of the circle and turn them into regions and disable pvp. EpicZones did allow you to do this but it hasn't been updated since 1.4.6.
     
  5. Offline

    jprules

    well as far as i know you only can make a region selection with straight lines so you just download
    worldedit : http://dev.bukkit.org/bukkit-plugins/worldedit/
    worldguard : http://dev.bukkit.org/bukkit-plugins/worldguard/
    once you dragd the .jar files in your plugins folder go into your server.
    than pick a wooden axe out of your inventory and make a region selection
    p01 : right click
    p02 : left click
    then type //expand vert
    then type /rg define <regionname>
    as last type /rg flag <regionname> pvp deny/allow
     
  6. That does not necessarily mean it does not work though.
     
  7. Offline

    Zarkopafilis

    I think you can make spheral selections with WorldEdit and then protect them with WorldGuard having red wool as an effect , but it could be a custom plugin too...
     
  8. Nope
     
  9. Offline

    MCTutorialist

    well... if it is a custom plugin, can any1 make it? :p
     
  10. Just use freaking worldgaurd. You would have been done already if u just used it...
     
  11. Offline

    MCTutorialist

    well, it will be a pain in the ass to set it up, on my server we have cirular areas as you see in the pic -.-
     
  12. Offline

    nrs23

    MCTutorialist What on earth r u pll talking about, it one of the simplest things to do in the world
    Code:java
    1. public void PlayerMove(PlayerMoveEvent e)
    2. {
    3. Location spawn = e.getPlayer().getWorld().getSpawnLocation();
    4. List<Entity> ent = e.getPlayer().getWorld().getEntities();
    5. for(Entity entity : ent)
    6. {
    7.  
    8. if(entity.getLocation().distance(spawn) <= 10D){
    9.  
    10. if(entity instanceof Player)
    11. {
    12.  
    13. Player p = (Player) entity;
    14. //do something to the player here


    This code here check if a player is within 10 blocks of spawn, if they r then it does somthing to them
     
  13. Offline

    AndyMcB1

    Add a check to determine if they move a block. More memory efficient.
     
  14. Offline

    nrs23

    @AndyMcB1 How would You do that, i never really bothered with memory usage. seeings as i only coded for my own server network. and memory was never an issue there each server had 8gbs dedicated to it
     

  15. Ok I am done trying to help you. If you are going to be THAT GOD DAMN lazy, then I shall no longer help you. Good luck
     
  16. Offline

    SnapyT

    Da_Pepsi_Monster why are you so mad on all the people? he said circles, then he wants circles. not your dumb answers of using worldedit or worldguard. they just dont have that feature! by the way, its not all the others that is lazy, its your suggestions.

    good luck with life!
    Herman - SnapyT
     
    AndyMcB1 likes this.
  17. Offline

    MCTutorialist

    Thank you snapy! :3
     
  18. Offline

    Axe2760

    Uhm.... why is everyone saying you can't make circles with world guard?? //sel poly

    nrs23 Why are you iterating over entities in a player move event? Imagine it on a hundred player server, or when the player is by xp orbs. Also, player move event isn't just moving, but also rotating (change in pitch/yaw). On a medium sized server you'd be iterating over like 500 entities every single tick, not a good idea.
     
    timtower likes this.
  19. Offline

    jprules

    SNAPY AND WHAT IS YOUR BEST IDEA
    i mean there is right now no other plugin where you can do what he wants
    what he maybe can de WITH WORLDEDIT
    is maken straight lines in the shape of a round
     
  20. Offline

    SnapyT

    MCTutorialist no problem :3

    if you go on some factions pvp servers, yoy can see that they have claimed a circled spawn.

    i have been trying to find out how to do this for a long time.

    the yoy was meant to be "you" by the way :3

    and how exactly does this "//sel poly" work with making a circle region?
     
    MCTutorialist likes this.
  21. Offline

    Axe2760


    I expected you to read the documentation first... but what it sounds like. It creates a polygonal selection by selecting x amount of corners.
     
    MCTutorialist likes this.
  22. Offline

    AndyMcB1

    Get the player inital location, store it in a HashMap. Then on PlayerMoveEvent check if the BLOCK location is different, and then run the normal code.

    This way each time they move but are still in the same block it i only running 1 if statement as opposed to two. That being said, when they do move a block it's running 3 if's.
    If you have 1 player, then sure - not much difference. However it's good practice to think like this because if you have lots of players (not really suitable in this scenario)
     
    MCTutorialist and Axe2760 like this.
  23. Offline

    MCTutorialist

    SnapyT

    After some looking into WorldEdit and WorldGuard, we can make circular regions by: //sel cyl or //sel ellipsoid

    but... I dont know how to turn it into a region, it gives an error when I do /rg define <name>

    Hope this helped :)
     
  24. Offline

    SnapyT

    MCTutorialist

    can you paste a secreenshot of your console? (the error)

    it should be just like normal.
     
  25. Offline

    MCTutorialist

    In WorldGuard we cant make cylindrical regions only cuboid or poly regions, thats what the problem is, I'm going to try and recommend that they add cylindrical regions to WorldGuard
     
  26. Offline

    SnapyT

    great idea!
     
  27. Offline

    njb_said

    I co-run that server and it is simply worldguard //sel poly, left click to set starting position and right click to set all the others (adds one each time)
     
    BillyGalbreath likes this.
  28. Offline

    MCTutorialist

    oh... thanks :") my bad
     

Share This Page