Plugin category: Mechanics Suggested name: CartDespawn What I want: You know how you can do /summon Minecart x y z ? I want to be able to despawn carts using a command as well! I want to be able to have a command block be activated and the minecart at the coordinates x y z will disappear/despawn. Ideas for commands: /despawncart x y z Ideas for permissions: No permissions, command only used in command blocks, OP required to use command blocks. When I'd like it by: Next saturday. Thanks!
@chefcarl2004 this can be accomplished quite simply. I (should) have it done sooner. http://dev.bukkit.org/bukkit-plugins/cartdespawn/
It's not working... @BizarrePlatinum I'm using this for a 1.7.9 server. That's why! Would it be too much to ask for it to be "downgraded" to 1.7.9?
@timtower It didn't say anything in the log, so i just took a video and recorded what happens when i try typing it in chat and when it's put into a command block. It gives no response. I got someone to try and test it for me, he did the video. You can't see it but i think he typed it in then tried it in a command block
@chefcarl2004 That could be, not sure about it, that the developer is catching if the commandsender is a player before doing stuff, that would stop it from working on commandblocks.
@BizarrePlatinum Couple of things worthy of note: Firstly, this section is for Bukkit plugins - in other words, no 1.8 plugins. So it's safe to assume that a requester is using a 1.7 server, or is posting in the wrong section. Secondly, when parsing the x, y, and z coordinates, you simply print that something went wrong to the console. Also since you will end up returning true if that happens, then the user will not get any message at all if they enter something that isn't a number. It would probably be better to send a message to the sender telling them they didn't enter a number - and maybe to the console too, since the intended use is command blocks. Thirdly, for the sake of efficiency, there's not really a need to loop through the whole world's entities. You only really need concern yourself with the ones in the chunk that the coordinates lie in - Location has a useful method for this. Finally, it might be worth stopping the loop after you've found the entity that you're looking for.
@AdamQpzm thanks very much for this information, I have taken them into consideration, and have applied them to the "new old" version. @chefcarl2004 I have added the downgraded version to the original BukkitDev page (file may need to be verified). It should work, however I am not currently in possession of a jar needed to run a 1.7 server, so I can not be 100% sure.
@BizarrePlatinum It has the same effect. Nothing happens. I'll see if i can try redownloading it or changing my .jar that i am using. I'll keep trying to problem solve.
@timtower I will continue on this, it had honestly slipped my mind. I however have no idea what the problem is. @chefcarl2004 when you run the command, is there any kind of error in the console? I am a bit limited to what I can do, as I do not have a way of testing it myself (do not own a 1.7 jar that can be used for a server).
@BizarrePlatinum I am trying it again and will check console. Please hold. @BizarrePlatinum I just tried it again, there was no error in console, it's as if nothing happened.
@chefcarl2004 I took a look at my code and noticed that the method that removes that carts' structure was a bit odd looking. I moved things around to fix that, and have uploaded the files. The files will need to be approved, hopefully that won't take too long.
@BizarrePlatinum Just checked it again, it's there. I'll post the results in a minute or so, testing right now. EDIT: The results are in, it still didn't work, but it printed an error in console: "Too few arguments were specified." What i put in the command block was exactly this: /despawncart -1290 30 831 Should i specify a world? Is that what's missing?
@chefcarl2004 that's odd. I am going to add a world argument as I see that as a possible future conflict. I have moved the if that tests for the arguments around, I have uploaded the file to the bukkit dev page.
@BizarrePlatinum What is the command supposed to look like? (Just making sure) EDIT: I tried the following command: /despawncart testworld -1290 30 831 And i got this error: Code: 09.06 19:09:34 [Server] INFO Could not find object at location Location{world=CraftWorld{name=testworld},x=-1290.0,y=30.0,z=831.0,pitch=0.0,yaw=0.0} At least it's something... if i put the world tag after the coordinates, it gave me a simple "An error has occured whilst trying to send command." The world i am testing it in is called testworld, so it shouldn't be a problem. Any suggestions? EDIT: @BizarrePlatinum I got it working, somewhat. It removes the cart from the world about 40% of the time, so i have it set up to despawn the cart three times (attempt to at least) which would pretty much guarantee its removal.
Perhaps it's time to stop fulfilling requests in this section, as every request here should be for 1.7 or lower