Filled Clear dropped items

Discussion in 'Plugin Requests' started by iwitrag, Jul 11, 2015.

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



    I'm in need of this simple plugin.
    This plugin should just delete all dropped items from given coordinates (2 corners).

    /deleteitems x1 y1 z1 x2 y2 z2


    So, basically, this plugin will get coordinates (6 arguments), then loop all chunks between those 2 corners, load chunk, remove items from chunk and try to unload chunk.
    Result is - area without dropped items.

    When I need it:
    ASAP please
  2. I can make this
    iwitrag likes this.
  3. Offline


    or you can instal ClearLag...
  4. That removes all items. He wants to remove items in a specific area
  5. Offline


    And as far as I know clearlag doesn't remove items in non-loaded chunks.
  6. Offline


    You can do a customClear with ClearLag ;)

    @iwitrag of course it does, I've been 3 years with ClearLag, as far as I know, you can.

    EDIT by Timtower: merged posts
    Last edited by a moderator: Jul 11, 2015
  7. @iwitrag
    It's done :D
    Commands: deletItems (aliases: ditems, di)
    Usage of the command: /deleteItems x1 y1 z1 x2 y2 z2
    You can use the ~ symbols the same way you can use it in commandblocks/vanilla commands: ~ represents the current coordinate of the player/commandblock. For example: ~5 is the current coordinate + 5. ~-5 is the current coordinate - 5.
    It loads all chunks that are inside the area of those 2 locations and it shows you how many items were deleted and how many chunks there are.

    Last edited: Jul 11, 2015
    iwitrag likes this.
  8. Offline


    Wow, you are really quick!
    I forgot to say, that I need the ability to run this from console too - because I will implement it to scheduled tasks.
    May I ask you to add console support please? :)

    I get this error message

    I don't understand how command inputs work, but I have used Skript to execute this command.

    command /test:
    set {_x1} to x-coord of {corner1}
    set {_y1} to y-coord of {corner1}
    set {_z1} to z-coord of {corner1}
    set {_x2} to x-coord of {corner2}
    set {_y2} to y-coord of {corner2}
    set {_z2} to z-coord of {corner2}
    execute command "/deleteitems %{_x1}% %{_y1}% %{_z1}% %{_x2}% %{_y2}% %{_z2}%" by event-player

    I have tried direct input
    /deleteitems -1688 0 -1688 -1999 255 -1999

    It doesn't work - 0 chunks - maybe because second coordinates are lower than first? Simple check on beginning should fix that

    So I would really appreciate those changes:
    1. make it possible to run command from console
    2. fix indirect input error
    3. correctly get two corners depending on user input
    Last edited: Jul 11, 2015
  9. Your error: I assume it's because the coordinate has a . in it. I fix this
    1. That would require a world name
    2. That has something to do with your script, it works fine on my server
    3. I'm working on that
    iwitrag likes this.
  10. Offline


    Fast coder
  11. Offline


    1. That's not a problem for me. If it's possible, it would be great to add console support :)
    2. Well I think its because the dot . as you said
    3. Okay, thanks so much :)
  12. 1. Done. When using the console the command is this: /DeleteItems world x1 y1 z1 x2 y2 z2
    2. Already fixed
    3. Already fixed too.
    Download link is the same (I <3 dropbox :p)

    EDIT: Check /version ClearItems if it's 1.0 download it again and reload the server
    Last edited: Jul 11, 2015
    iwitrag likes this.
  13. Offline


    Amazing work
    I have tried it.

    1. Running from console works, but it does not alert if you do not input any world - have you used default 'World' ?
    2. Okay, now dots are working correctly, thanks!
    3. Cannot try if it works

    ERROR: It says No items were found. anytime when I execute deleteitems command.
    For example - I drop diamond at 0 10 0
    And execute
    /deleteitems -5 0 -5 5 255 5 as player

    = No items were found
  14. iwitrag likes this.
  15. Offline


    I'm so sorry but it still doesn't work as intended

    Items dropped and ready to be deleted...

    /deleteitems World -1999.61 255 -1999.54 -1688.52 0 -1688.46
    [ClearItems] Searching for items between -1688,0,-1688 and -1999,255,-1999 (-310*256*-310) .
    [ClearItems] No items were found.

    Now lets change height

    /deleteitems World -1999.61 0 -1999.54 -1688.52 255 -1688.46
    [ClearItems] Searching for items between -1999,0,-1999 and -1688,255,-1688 (312*256*312) ...
    [ClearItems] Successfully removed 55 items in 400 chunks.

    Now it found items - and look at blocks count too - -310*256*-310 and 312*256*312
    I think there is only small issue somewhere :)

    Hope that will help you to fix it and create 100% working plugin.

    Thx a lot for your hard work
  16. I just tried it with a small area and it worked. You must have switched the coordinates somehow (I hope ^^).
    Btw: I updated it so the x*y*z displays only positive numbers and the bug that you can't remove items in a 1*y*1 area doesn't work is fixed.
    iwitrag likes this.
  17. Offline


    Well I'm not sure then why it doesn't work for me.


    You can see console and in-game window after executing /test command, which was just alias to execute console command /deleteitems World -1999.61 255 -1999.54 -1688.52 0 -1688.46

    Gold nugget on the floor was not removed.
  18. I think it is all fixed *-* Instead of looping from location 1 to location 2, I looped from the smaller coordinates to the higher coordinates. It should finally work now
    iwitrag likes this.
  19. Offline


    Nope, it still doesnt work for me :D

    deleteitems World -50 255 -50 50 0 50 - DOES NOT WORK
    deleteitems World -50 0 -50 50 255 50 - IT WORKS
  20. I found out why it wasn't working for you. Where I searched for the items, I have looped from the smaller to the higher coordinates, but when I looped through the chunks, I didn't do that. Now it will hopefully work for you
    iwitrag likes this.
  21. Offline


    You did an amazing work here, now it works and I cannot find any error or something!
    Now, it's (I hope) 100% working plugin, thanks a lot for it sir!

    Marking as filled !
  22. Oops I forgot this .. Fixed now ^^
  23. Offline


    Oh, I have found out that sometimes it just doesn't delete items. Not sure why, I'm using it for creating items after minigame ends, and sometimes there are items on the floor... as I said, not sure why, it works correctly when testing, but when players plays there, it doesnt
Thread Status:
Not open for further replies.

Share This Page