10 using T = std::decay_t<
decltype(arg)>;
12 if constexpr (std::is_same_v<T, PlayerDeath>) {
13 playSound(
"death",
"gui/assets/sounds/minecraft-villager-death.mp3");
14 }
else if constexpr (std::is_same_v<T, IncantationStart>) {
15 playSound(
"incantation",
"gui/assets/sounds/minecraft-villager.mp3");
16 }
else if constexpr (std::is_same_v<T, IncantationEnd>) {
19 "gui/assets/sounds/minecraft-villager-trade.mp3");
21 playSound(
"incantation_fail",
"gui/assets/sounds/minecraft-hit.mp3");
23 }
else if constexpr (std::is_same_v<T, PlayerLevel>) {
24 playSound(
"levelup",
"gui/assets/sounds/minecraft-levelup.mp3");
25 }
else if constexpr (std::is_same_v<T, PlayerBroadcast>) {
26 playSound(
"broadcast",
"gui/assets/sounds/discord.mp3");
27 }
else if constexpr (std::is_same_v<T, PlayerNew>) {
28 playSound(
"newplayer",
"gui/assets/sounds/discord-join.mp3");
std::variant< MapSize, TileContent, TeamName, PlayerNew, PlayerPosition, PlayerLevel, PlayerInventory, PlayerExpulsion, PlayerBroadcast, IncantationStart, IncantationEnd, PlayerFork, PlayerResourceDrop, PlayerResourceTake, PlayerDeath, EggNew, EggHatch, EggDeath, TimeUnit, TimeUnitChange, GameEnd, ServerMessage, UnknownCommand, BadParameters, ServerUptime, ServerSpawnedEgg, WinDuration > Event
Represents an event received from the server. Is a variant of all possible events,...