[MECH] VehicleZap v1.1.0 - Remove abandoned vehicles [1000]

Discussion in 'Inactive/Unsupported Plugins' started by kroimon, Apr 27, 2011.

  1. Offline

    kroimon

    VehicleZap - Remove abandoned vehicles
    Version: 1.2.0
    Last tested CraftBukkit build: 1000

    [Download JAR file]
    Source code on GitHub

    Description:
    This plugin removes abandoned vehicles (boats and minecarts) from the world after configurable times.
    By default, it checks for abandoned vehicles every 30 seconds and removes boats that had no passengers for more than 2 minutes. A lightning will strike at the location of the vehicle.
    After the first run, you can configure most functions in the VehicleZap/config.yml file:
    Code:
    checkInterval: 30
    boats:
        enable: true
        maxLifetime: 120
        strikeLightning: true
        returnToOwner: false
    minecarts:
        enable: false
        maxLifetime: 120
        strikeLightning: true
        returnToOwner: false
    
    All times are in seconds. Warning: Lightnings might be dangerous ;-)

    Planned features:
    • Possibility to return vehicles to predefined chests
    • Multiworld support (enable on certain worlds only)
    • A command to kill all vehicles in a world
    • Tell me what you want and I'll look what I can do for you!
    Changelog:

    • Version 1.2.0 (8 Downloads during beta)
      • Limit minecarts to passenger ones only, leaving storage and powered minecarts alone.
      • Manage vehicles already in the world on plugin load.
      • Multi-world support: You can select which worlds this plugin should operate on by setting a list of world names for boat.worlds and minecarts.worlds. Stripped down example:

        Code:
        boats:
               enable: true
               worlds: [world, otherworld, nether]
           minecarts:
               enable: true
               worlds: [otherworld]
           
    • Version 1.1.0 (3,320 Downloads)
      • Added the possibility to return removed vehicles to their creator
    • Version 1.0.0 (30 Downloads)
      • Initial release
     
  2. Offline

    MOROZILnic

    Cool) I think, its better to return them to their owner.
     
  3. Offline

    rockxz2135

    this is exactly what i need so minecarts dont get caught up at the end of my server tour ride thnx
     
  4. Offline

    kroimon

    Yeah but it's kinda guesswork to find out who the "owner" of a vehicle is... I'll look into that if I find the time...

    Had some unexpected minutes this evening, so I implemented the returnToOwner setting :)

    @MOROZILnic: Version 1.1.0 is what you need ;-)

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 14, 2016
  5. A feature for return to a specific chest would be great aswell.
     
  6. Offline

    kroimon

    How would you specify such a chest?
    And would there be one chest for the whole world? Or one per player? Or should the removal process choose out of a list of chests based on distance? Or? Or?

    Originally I wanted to keep this plugin commandless and most easy to configure...
     
  7. I'm thinking some kind of origin tracking like the thing you do with players only with a chest instead. If taken from a chest and used in say 30 seconds, that's the origin, else the player is the origin. This could also work as a fallback for if the player logs out and you wouldn't want to destroy the cart/boat.

    Think boat/minecart dispenser in a harbour or at a station.

    I get that you wan't it to be simple and the default's could still be just as you specified. But optional options is rarely a bad thing :)
     
  8. Offline

    kroimon

    That's not that easy, because you simply can't track single items and where they came from. The code to find the owner of a freshly spawned vehicle is a hack already (I'm just searching for the player with the closest distance), as there is currently no standard way to find out who created it. Therefore it's also nearly impossible to find out where the player spawning it got the vehicle item from.

    So the only way I could imagine would be one or more player/admin defined chests (maybe by looking at a chest and writing a specific command) that are then chosen by closest distance to the current vehicle position on destroyal.
    Or do you or anyone else have a better idea? :)
     
  9. Sounds fair enough. Looking at a chest and doing something like "/vz return cart" to set the chest you are watching as the return for carts. Would actually be kinda good now that i think about it. If you set two, take the closest one? That way you can have carts be stacked up on both ends of a track.

    Check if the chest is full and set default action if it is?
     
  10. Offline

    xsolar66

    A question - I use minecarts as "launchers" for the minecart track. (door launcher setup)

    However I would also like to clean up any unused minecarts just sitting on the track..

    Is it possible to select only the minecarts sitting on the tracks but not the ones waiting to be used as a launcher? I honestly don't know how it'd be possible to distinguish the two, but it's an idea nonetheless
     
  11. I'd say that's gonna be tricky since they are both on the track. Why don't you just use a double-power rail station instead? (But then i'm not the creator or coder ;)
     
  12. Offline

    kroimon

    Yeah, that's damn tricky to impossible to implement... I think you should migrate to the power-rails, too, they are awesome! :)

    But I just realized that I have to exclude powered and storage minecarts from the removal as they are never "used" for passenger transportation... Maybe I could add the removal of EMPTY storage minecarts later, but that's another topic...

    And I'm definitely going to add the chests for vehicle return...
     
  13.  
  14. Offline

    xsolar66

    ahh i have to remove all my hard work and lauchers :p

    still, change is inevitable :p
     
  15. Offline

    Jan Tojnar

    Will it be something like chest with sign on it? First line [MINECARTS] (or [BOATS] or [VEHICLES]), second could be optional distance.
     
  16. Offline

    kroimon

    Hmm, I'm not yet completely sure how to do it, but I think I'll use simple commands, as they are not limited to four lines à 15 characters. That doesn't mean I won't add signs later, and neither does it prevent you from creating as many signs as you like next to the chests :)

    Do you mean the maximal distance to collect vehicles from?
     
  17. Offline

    tickleman

    Hello. cool plugin.

    The minecarts that already existed before I installed your plugin are still alive !
    Any command to kill all minecarts and/or boats would be great.
    Thanks a lot.
     
  18. Offline

    darrenstraight

    Hey,

    Great little plugin, works well for boats but have waited and waited and tried various setting but i cant get it to remove minecarts at all :( tried all that and getting in and out of it and leaving it for ages but no luck!

    No error reports in logs.

    Thanks,
    Darren

    Edit: possibly ignore this post! *waiting*
    Edit 2: Nope still not working! :'(
     
  19. Offline

    kroimon

    Yepp, I will add something similar for the next version.

    It currently can't remove vehicles created before the plugin was loaded, this is planned for the next release.
    Any other minecarts (currently also storage and powered minecarts, which isn't useful and will be removed) should be handled properly...
     
  20. Offline

    darrenstraight

    Hi kroimon,

    Yeah i read that comment, above, but its not that it's minecarts that are being placed after the plugin has been loaded. The only difference i notice is that minecarts standing sill seem to sway back and forth a little when still. As if they were being hit by wind. Though that may just be normal in minecraft and im only noticing it becuase im literally placing new minecarts on the track and staring at them...

    Thanks,
    Darren
     
  21. Offline

    Jan Tojnar

    I didn't realize that you can't place signs on chests via glitch which can be used for placing torches. Maybe you can add sign placed above chest (adjacent to wall).
    Why do you need 16 chars? I think it should be as simple as it can be (/vzap [distance] and then touch the chest).

    Yes.
     
  22. Offline

    Jabbic

    I am having the same problem as Darren. minecarts will not go away!
     
  23. Offline

    gilgatex

    This would be exactly what I was looking for, except I want to use it via a command, not a config file.
     
  24. Multi world support?
    Unused minecarts annoy me on Creative but are fine on PVP.
     
  25. Offline

    kroimon

    Added to the todo list...

    Sorry that I currently don't have so much time developing this thingy :-/
     
    AS1LV3RN1NJA likes this.
  26. Offline

    EpicATrain

    Can You Update To The Latest Version Good Sir?
     
  27. Offline

    keithlawless

    I've noticed that this plug-in considers Storage Minecarts to be abandoned, assuming it's because they never carry passengers. Getting smote by lightning and losing a cart of ore is a bummer. Any chance that this plugin could be limited to plain minecarts?
     
  28. Offline

    kroimon

    Yeah sorry, was aware of that one, but had no time to fix it yet :-/
    I'll try to find some spare time this evening...

    Could you please test version 1.2.0-beta1?
    • Limit minecarts to passenger ones only, leaving storage and powered minecarts alone.
    • Manage vehicles already in the world on plugin load.
    • Multi-world support: You can select which worlds this plugin should operate on by setting a list of world names for boat.worlds and minecarts.worlds. Stripped down example:

      Code:
      boats:
          enable: true
          worlds: [world, otherworld, nether]
      minecarts:
          enable: true
          worlds: [otherworld]
      

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 14, 2016
  29. Offline

    keithlawless

    Protection for storage carts and powered carts works fine. Thanks for the quick update!
     
  30. Offline

    ratty

    I've been using 1.2.0-beta1 for 5 days now without problems, I'd say make it official.
     

Share This Page