PvP Line

Discussion in 'Archived: Plugin Requests' started by Jangilify, Aug 16, 2013.

  1. Offline

    Jangilify

    Plugin category: Fixes

    Suggested name: PvPLine

    What I want: Basically what i want is to have a line instead of jumping down off a building, And i want you to not be able to go back inside the line(Non-pvp zone) until you are out of combat. Heres an example:
    [​IMG]
    So now basically lets say i step out of the line and get hit i wont be able to go back into the line until i'm out of combat and also if i hit someone vice versa.

    Ideas for commands: Maybe intergrate world edit to set the line or something like that, any command will work just need someway to set the line

    Ideas for permissions: pvpline.bypass(Bypass the cooldown)

    When I'd like it by: Any time.
     
  2. Offline

    Den_Store

    2 worldguard regions 1 with pvp on, 1 with pvp off
     
  3. Offline

    timtower Administrator Administrator Moderator

    Jangilify Made a plugin like this already, is in Polish now but you can get an English version if you want
     
  4. Offline

    Jangilify


    Wheres the plugin?
     
  5. Offline

    timtower Administrator Administrator Moderator

    That said I assume that you want the plugin? Will change the language for you
     
  6. Offline

    Jangilify


    Yea, Thanks dude.
     
  7. Offline

    timtower Administrator Administrator Moderator

    Will be probably in about 14 hours, enough done for today here
     
  8. Offline

    Jangilify


    It's fine, My server wont be opening for another month. I'v got plenty of time, I appreciate your time spent!
     
    timtower likes this.
  9. Offline

    timtower Administrator Administrator Moderator

    https://www.dropbox.com/s/0tujj47c9envdrw/NoPVPSpawn.jar
    You can change the message color and message in the config, don't touch the "hasarea" thing! The time is configurable to.
    Command: /knock-area, defines the area based on worldedit selection, you need the permission nopvpspawn.use to be able to use the command, projectiles are supported
     
  10. Offline

    Jangilify


    Thank you so much, You don't know how appreciate i am!
     
    timtower likes this.
  11. Offline

    timtower Administrator Administrator Moderator

    If you need any changes just PM me
     
  12. Offline

    Jangilify


    I know you did a lot of work but would be possible to take out the line of code where you fall in the void? I want them just not to be able to enter the area in combat
     
  13. Offline

    timtower Administrator Administrator Moderator

    Will do after my dinner ;) And was meant to be a knockback, didn't worked the way I thought it would do XD, maybe remove the y var
     
  14. Offline

    Jangilify


    Haha, Yea i just want players to be warned and knock backed. Thanks again!
     
  15. Offline

    timtower Administrator Administrator Moderator

    Same download link, hope that it works now
     
  16. Offline

    hkminegod

    tps you to the void :l
     
  17. Offline

    timtower Administrator Administrator Moderator

  18. Offline

    hkminegod

  19. Offline

    timtower Administrator Administrator Moderator

    You sure that you restarted your server? Reload won't work for this, and tp to the void is really weird with this version, I just make sure that the player won't be in the region by placing them on their old location
     
  20. Offline

    hkminegod

    Send the download link again pl0x. I'm sure I reloaded the server and its tping me to the void.
     
  21. Offline

    timtower Administrator Administrator Moderator

  22. Offline

    hkminegod

  23. Offline

    timtower Administrator Administrator Moderator

    Then you should know that reload is bad :p And I thank you for testing, bit hard with no offline accounts supported anymore...
     
  24. Offline

    hkminegod

    When did I say i used /reload instead of a server restart? oh wait sorry my english... reload =/= restart .-.
     
  25. Offline

    timtower Administrator Administrator Moderator

    LOL, same link, just canceled the move event this time, and displayed the message of course
     
  26. Offline

    hkminegod

    Nope. Still teleports me to the void... somewhere near -1, -1
    Upload it to github and let me help!
     
  27. Offline

    timtower Administrator Administrator Moderator

    I hate github, I am not able to use it, this is my code for checking the move:
    Code:java
    1. @EventHandler
    2. public void onPlayerMove(PlayerMoveEvent event){
    3. String name = event.getPlayer().getName();
    4. if(hasRunner(name)){
    5. if(inArea(event.getTo(),area.getP1(),area.getP2(),false)/*area.isInBounds(event.getTo())*/){
    6. //event.getPlayer().sendMessage("You are in the area");
    7. if(hasRunner(name)){
    8. event.getPlayer().sendMessage(ChatColor.valueOf(config.getString("messagecolor"))+config.getString("message"));
    9. event.setCancelled(true);
    10. //Vector vel = event.getPlayer().getVelocity();
    11. //event.getPlayer().teleport(event.getFrom());
    12. //Location newloc = event.getFrom();
    13. //event.getPlayer().teleport(event.getFrom(), TeleportCause.PLUGIN);
    14. //event.getPlayer().setVelocity(vel.multiply(-5));
    15. }
    16. }
    17. }
    18. }
     
  28. Offline

    hkminegod

    Either I downloaded the wrong file or you uploaded the wrong file. My jar doesn't have your code.

    Also, the event.setCancelled(true); is buggy as hell.
     
  29. Offline

    timtower Administrator Administrator Moderator

    Try again, was something with the build path
     
  30. Offline

    hkminegod

    It would be cool if you extended the tag to 20 seconds, and create the knockback again (or set the location right outside of the no-pvp area). Right now the event.setCancelled(true); is buggy, if the old location is in the area, then you get sent back too. (can reproduce by walking in...)
     

Share This Page