Jump to content
Frequently Asked Questions
  • Are you not able to open the client? Try following our getting started guide
  • Still not working? Try downloading and running JarFix
  • Help! My bot doesn't do anything! Enable fresh start in client settings and restart the client
  • How to purchase with PayPal/OSRS/Crypto gold? You can purchase vouchers from other users
  • GetGroundItems


    Gorn

    Recommended Posts

    Posted
    GroundItem[] loot = manager.getGroundItems().getGroundItems(lootTile);

    Can you rename this to something like 'getGroundItemsOnTile'?

    I was just banging my head on why getGroundItems doesn't take Tile type, but you can't rename it cause it would break old code right? It's pretty confusing for newcomers

     

    Posted

    That's what I was looking at and didn't realize you have to write it twice like

    getGroundItems().getGroundItems(lootTile)

    Basically there are 2 different functions both named getGroundItems and I didn't realize it right away. Especially confusing when you need to chain them like this.

    • 2 months later...
    Posted
    On 3/3/2020 at 9:24 AM, Gorn said:

    That's what I was looking at and didn't realize you have to write it twice like

    
    getGroundItems().getGroundItems(lootTile)

    Basically there are 2 different functions both named getGroundItems and I didn't realize it right away. Especially confusing when you need to chain them like this.

    That's because we have the api class "GroundItems" and then you have the method to retrieve ground items.

    After looking at it though I do notice that the other api classes don't follow the same trend, since they use filters and such.
    I'm updating it to have the method getItemsOnTile(Tile t) and deprecating the getGroundItems(Tile t)
    Thank you for the report/suggestion!

    Archived

    This topic is now archived and is closed to further replies.

    ×
    ×
    • Create New...

    Important Information

    We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.