Sponge
Sponge copied to clipboard
Upon successful `ChangeWorldWeatherEvent` call, the event object shows no indication of if a player initiated the event (ex: /toggledownfall).
I am currently running
-
SpongeForge version: 1.12.2-2838-7.1.9
-
SpongeVanilla version: N/A
-
Java version: 1.8.0_211
-
Operating System: Windows & Linux
-
Plugins/Mods:
Minecraft, Minecraft Coder Pack, Forge Mod Loader, Minecraft Forge, SpongeAPI, Sponge, Biomes O' Plenty, Pixel Extras, Pixelmon, SpongeForge
Issue Description
Upon successful ChangeWorldWeatherEvent
call, the event object shows no indication of if a player initiated the event (ex: /toggledownfall).
@Listener
public void onWeatherChange(ChangeWorldWeatherEvent event){
// NOTE: baseInst is an instance of my plugin class!
baseInst.logger.info("ROOT: " + event.getCause().root().toString());
Iterator<Object> iter = event.getCause().iterator();
Object node = null;
while (iter.hasNext()) {
node = iter.next();
baseInst.logger.info(node.toString());
baseInst.logger.info("*****");
}
The above code prints:
ROOT: WorldServer{Name=world, DimensionId=0, DimensionType=minecraft:overworld}
and the same one WorldServer obj.
I am currently trying to build a workaround using the SendCommandEvent
event, but this is having some issues. Not top priority, but getting more information with this event would be great. Thanks!