mirror of
https://github.com/2006-Scape/2006Scape.git
synced 2026-12-06 03:07:18 +00:00
- Remove synchronous website integration execution from the GameEngine 600ms tick loop - Decouple website credentials and toggles from ConfigLoader, secrets.json, and Constants.WEBSITE_INTEGRATION - Introduce modular "website" configuration group with independent toggles for players_online and registered_accounts - Consolidate background tasks onto a single daemon ScheduledExecutorService with graceful lifecycle management via ServerStartupEvent and ServerShutdownEvent - Optimize character directory counting with Java NIO streaming to prevent heap allocations - Add UTF-8 URL encoding, User-Agent headers, safe stream handling, and network exception throttling
17 lines
514 B
Kotlin
17 lines
514 B
Kotlin
package plugin.integration.website
|
|
|
|
import com.rs2.event.EventContext
|
|
import com.rs2.event.EventSubscriber
|
|
import com.rs2.event.SubscribesTo
|
|
import com.rs2.event.impl.ServerStartupEvent
|
|
import com.rs2.game.players.Player
|
|
|
|
@SubscribesTo(ServerStartupEvent::class)
|
|
class WebsiteStartupSubscriber : EventSubscriber<ServerStartupEvent> {
|
|
|
|
override fun subscribe(context: EventContext, player: Player?, event: ServerStartupEvent) {
|
|
PlayersOnlineWebsite.start()
|
|
RegisteredAccsWebsite.start()
|
|
}
|
|
}
|