Development Assistance Targeting entities with specific data values

Discussion in 'Plugin Help/Development/Requests' started by KevinM, Jun 3, 2015.

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

    KevinM

    I want to code a plugin that erases STATIONARY minecarts with no players in it.
    I was looking in Spigot API and saw that there's a bunch of methods for minecarts and other entities, but I don't know how to implement them.
     
  2. Online

    timtower Administrator Administrator Moderator

    Moved to Bukkit alternatives
     
  3. Offline

    mine-care

    @KevinM So minecart is an entity,
    Loop through all the entities on the world you want to remove minecarts, (See World javadocs to find the method) in the loop, check if the current entity is a Minecart and if it is check if a player is a pasenger on it, if it is not then remove it :- ) Simple!
    If you reach a dead end let us know! We will be here to help.
     
Thread Status:
Not open for further replies.

Share This Page