Add server broadcast event
Description
Add server broadcast event
Target Minecraft Versions: none Requirements: none Related Issues: https://github.com/SkriptLang/Skript/issues/1385 (closing as complete), https://github.com/SkriptLang/Skript/issues/4185 (non-closing)
Apart from built-in advertisements like Serverpro which will trigger this event, there’s no other way that this event will be triggered within the Skript environment as EffBroadcast does not use Server#broadcast(java.lang.String,java.lang.String), as shown here.
Apart from built-in advertisements like Serverpro which will trigger this event, there’s no other way that this event will be triggered within the Skript environment as EffBroadcast does not use Server#broadcast(java.lang.String,java.lang.String), as shown here.
I wonder why Skript doesn't use https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Server.html#broadcastMessage(java.lang.String) here?
Apart from built-in advertisements like Serverpro which will trigger this event, there’s no other way that this event will be triggered within the Skript environment as EffBroadcast does not use Server#broadcast(java.lang.String,java.lang.String), as shown here.
I wonder why Skript doesn't use https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Server.html#broadcastMessage(java.lang.String) here?
Likely because EffBroadcast also supports sending broadcasts to a specific world, which means special handling would be required to use broadcastMessage (and at the time it was added there was probably no incentive to do so, as sending the messages to each sender individually achieved the same effect)
Apart from built-in advertisements like Serverpro which will trigger this event, there’s no other way that this event will be triggered within the Skript environment as EffBroadcast does not use Server#broadcast(java.lang.String,java.lang.String), as shown here.
I wonder why Skript doesn't use https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Server.html#broadcastMessage(java.lang.String) here?
Likely because EffBroadcast also supports sending broadcasts to a specific world, which means special handling would be required to use broadcastMessage (and at the time it was added there was probably no incentive to do so, as sending the messages to each sender individually achieved the same effect)
EffBroadcast could call the event manually. it would have to strip the formatting for the event, but thats probably fine.
EffBroadcast could use Server#broadcast as it supports components now.
EffBroadcast could use Server#broadcast as it supports components now.
That doesn't work for specific worlds, though, which would mean we'd still need to trigger the event manually. Maybe we'd be better off just calling the event manually in any case?
Inactive