Pegasus Posted June 4, 2018 Posted June 4, 2018 https://osbot.org/api/org/osbot/rs07/api/ui/World.html How to use World class not Worlds class? MethodProvider doesn't provide World class and World class constructor is Deprecated. How do I use the methods in World class? 1
Team Cape Posted June 4, 2018 Posted June 4, 2018 2 hours ago, Pegasus said: https://osbot.org/api/org/osbot/rs07/api/ui/World.html How to use World class not Worlds class? MethodProvider doesn't provide World class and World class constructor is Deprecated. How do I use the methods in World class? why?
Pegasus Posted June 4, 2018 Author Posted June 4, 2018 (edited) 2 minutes ago, Team Cape said: why? What? https://osbot.org/forum/topic/140985-how-to-detect-current-world-is-pvp-world/ Edited June 4, 2018 by Pegasus
Explv Posted June 4, 2018 Posted June 4, 2018 1 hour ago, Pegasus said: What? https://osbot.org/forum/topic/140985-how-to-detect-current-world-is-pvp-world/ It's deprecated, you shouldn't use it, and it doesn't make any sense to create a World instance yourself. To determine if a world is PVP it just checks the activity String that you provide. Like mentioned in the other post you should use the widgets from the world switcher, or find a different solution.
Alek Posted June 7, 2018 Posted June 7, 2018 TL: We have an actual World hook which that class used to represent. When the world switcher came out I only wanted to maintain one form of world hopping, not both the login screen and world switcher. I decided to not use the world hook and only use the world switcher, as this seems more preferable. There were also issues with scripters not understanding that the world accessor was only available when you were completely logged out - which lead to a lot of confusion because all the other API methods were available only when logged in. Since then I moved to have the script only execute when you are completely logged in, which makes this impossible anyways. TLDR: I use that class internally, it could just be re-written as a private inner class that API users can't access.