Alerts and events
Live alerts
Section titled “Live alerts”When a linked player goes live, StreamGate broadcasts alerts.go-live to the whole server:
alerts: go-live: "&a{player} is live on {platform}: {url}" cooldown-minutes: 30 permission: "" # only players with this permission see alerts; empty = everyoneThe cooldown stops repeated alerts when a stream drops and comes back.
Events
Section titled “Events”Other plugins can react to stream activity. Add StreamGate as a depend or softdepend and listen
to its events like any Bukkit event:
@EventHandlerfun onRaid(event: StreamRaidEvent) { val target = event.player ?: return target.world.spawnParticle(Particle.FIREWORK, target.location, 80) Bukkit.broadcast(Component.text("${event.raider} raided ${target.name} with ${event.viewers} viewers!"))}| Event | Fired when | Notes |
|---|---|---|
StreamLiveEvent |
A linked channel goes live | event.url points to the stream |
StreamOfflineEvent |
The stream ends | |
StreamFollowEvent |
Someone follows | Not on Kick |
StreamSubscribeEvent |
New subscription or gift | event.tier, event.gifted |
StreamRaidEvent |
Another channel raids | event.viewers |
StreamChatEvent |
Chat message arrives | Cancel it to keep it out of the chat bridge |
All events are fired on the main thread. event.player is null if the streamer is offline.
See Developers for the shared event conventions.