Adding Events to your HytaleMetrics allows for tracking key actions for each plugins.
Examples of actions include money, team, tutorial.
- The Command syntax required for custom events:
/hytalemetrics customevent {player/uuid} {key} {key1="value1"}
- Setting Steve's quest_progress to include a quest_name and reward:
/hytalemetrics customevent Steve quest_progress quest_name="Welcome Tutorial"
- Deleting quest_progress from Steve:
/hytalemetrics customevent Steve quest_progress delete="true"
- Setting Johns's economy to include include current money assets:
/hytalemetrics customevent Steve economy in_hand="250
/hytalemetrics customevent Steve economy in_bank="250
- Players can have multiple keys, examples above "quest_progress" and "economy" will display as two cards.
- If you run a command for a player that already has that key, the values will be updated to your new values.
- Wrap values within quotes such as quest_name="Welcome Tutorial".
- You can delete a key at anytime by using delete="true"
import net.hytalemetrics.api.MetricsAPI; import java.util.HashMap; import java.util.Map; import java.util.UUID; // Send a custom event UUID playerUuid = player.getUniqueId(); String eventKey = "quest_completed"; MapcustomData = new HashMap<>(); customData.put("quest_name", "Dragon Slayer"); customData.put("reward", "1000"); customData.put("difficulty", "hard"); MetricsAPI.sendCustomEvent(playerUuid, eventKey, customData);