- Thread Author
- #1
The OSRSEvent and RS3Event enums are the two most branched parts of our API and I really don't like that. I want to consolidate the OSRSEvent and RS3Event enums into a single RSEvents class. The downside to this is it would no longer be an enum, which means that getting instances of RSEvent to disable/enable would require you to pass in the event name. I can make it easier for you to get the event name by providing a mapping in the javadocs.
Your code would probably change from
To a single statement of
Any thoughts or suggestions on it?
Your code would probably change from
Code:
if(Environment.isRS3()){
RS3Event.LOBBY_HANDLER.disable();
}else{
OSRSEvent.LOBBY_HANDLER.disable();
}
Code:
RSEvents.get("Lobby Handler").disable();
Any thoughts or suggestions on it?