Lists related event in keyValue list.

https://github.com/BentoBoxWorld/bentobox/issues/352

Rather than overriding the existing getEventName() method for Events, I
decided to keep it as a key-value reference.
This commit is contained in:
tastybento 2018-12-08 23:20:57 -08:00
parent 76a65c392f
commit 71de55b3bd

View File

@ -57,6 +57,7 @@ public class PlayerLevel {
IslandLevelCalculatedEvent ilce = new IslandLevelCalculatedEvent(targetPlayer, island, calc.getResult());
addon.getServer().getPluginManager().callEvent(ilce);
Map<String, Object> keyValues = new HashMap<>();
keyValues.put("eventName", "IslandLevelCalculatedEvent");
keyValues.put("targetPlayer", targetPlayer);
keyValues.put("islandUUID", island.getUniqueId());
keyValues.put("level", calc.getResult().getLevel());