Add cities to Discord plugin

Add support for showing in what city is player currently in to Discord
plugin.

Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
This commit is contained in:
PandahRS
2018-07-04 15:53:47 +02:00
committed by Tomas Slusny
parent e7df29f553
commit 5a3ffa4574
3 changed files with 75 additions and 1 deletions

View File

@@ -63,4 +63,15 @@ public interface DiscordConfig extends Config
{
return true;
}
@ConfigItem(
keyName = "showCityActivity",
name = "Show activity at cities",
description = "Configures if your activity at cities should be shown.",
position = 4
)
default boolean showCityActivity()
{
return true;
}
}

View File

@@ -77,7 +77,69 @@ enum DiscordGameEventType
BOSS_SKOTIZO("Skotizo", DiscordAreaType.BOSSES, 6810),
BOSS_SMOKE_DEVIL("Thermonuclear smoke devil", DiscordAreaType.BOSSES, 9363, 9619),
BOSS_VORKATH("Vorkath", DiscordAreaType.BOSSES, 9023),
BOSS_ZULRAH("Zulrah", DiscordAreaType.BOSSES, 9007);
BOSS_ZULRAH("Zulrah", DiscordAreaType.BOSSES, 9007),
// Cities
CITY_AL_KHARID("Al Kharid" , DiscordAreaType.CITIES, 13105, 13106),
CITY_APE_ATOLL("Ape Atoll" , DiscordAreaType.CITIES, 10795, 11051, 10974, 11050),
CITY_ARCEUUS_HOUSE("Arceuus House" , DiscordAreaType.CITIES, 6459, 6715, 6458, 6714),
CITY_ARDOUGNE("Ardougne" , DiscordAreaType.CITIES, 10548, 10547, 10292, 10291, 10036, 10035, 9780, 9779),
CITY_BARBARIAN_VILLAGE("Barbarian Village" , DiscordAreaType.CITIES, 12341),
CITY_BANDIT_CAMP("Bandit Camp" , DiscordAreaType.CITIES, 12591),
CITY_BEDABIN_CAMP("Bedabin Camp" , DiscordAreaType.CITIES, 12590),
CITY_BRIMHAVEN("Brimhaven" , DiscordAreaType.CITIES, 11057, 11058),
CITY_BURGH_DE_ROTT("Burgh de Rott" , DiscordAreaType.CITIES, 13874, 13873, 14130, 14129),
CITY_BURTHOPE("Burthope" , DiscordAreaType.CITIES, 11319, 11575),
CITY_CANIFIS("Canifis" , DiscordAreaType.CITIES, 13878),
CITY_CATHERBY("Catherby" , DiscordAreaType.CITIES, 11317, 11318, 11061),
CITY_CORSAIR_CAVE("Corsair Cove" , DiscordAreaType.CITIES, 10028, 10284),
CITY_DORGESH_KAAN("Dorgesh-Kaan" , DiscordAreaType.CITIES, 10835, 10834),
CITY_DRAYNOR("Draynor" , DiscordAreaType.CITIES, 12338),
CITY_EDGEVILLE("Edgeville" , DiscordAreaType.CITIES, 12342),
CITY_ENTRANA("Entrana" , DiscordAreaType.CITIES, 11060, 11316),
CITY_FALADOR("Falador" , DiscordAreaType.CITIES, 11828, 11572, 11571, 11827, 12084),
CITY_GOBLIN_VILLAGE("Goblin Village" , DiscordAreaType.CITIES, 11830),
CITY_GUTANOTH("Gu'Tanoth" , DiscordAreaType.CITIES, 10031),
CITY_HOSIDIUS_HOUSE("Hosidius House" , DiscordAreaType.CITIES, 6713, 6712, 6455, 6711, 6710, 6965, 6966, 7222, 7223, 6967),
CITY_JATISZO("Jatizso" , DiscordAreaType.CITIES, 9531),
CITY_JIGGIG("Jiggig" , DiscordAreaType.CITIES, 9775),
CITY_KARAMJA("Karamja" , DiscordAreaType.CITIES, 11569, 11568, 11567, 11566, 11313, 11312, 11311),
CITY_KELDAGRIM("Keldagrim" , DiscordAreaType.CITIES, 11423, 11422, 11679, 11678),
CITY_LLETYA("Lletya" , DiscordAreaType.CITIES, 9265),
CITY_LOVAKENGJ_HOUSE("Lovakengj House" , DiscordAreaType.CITIES, 5692, 5948, 5691, 5947, 6203, 6202, 5690, 5946),
CITY_LUMBRIDGE("Lumbridge" , DiscordAreaType.CITIES, 12850),
CITY_LUNAR_ISLE("Lunar Isle" , DiscordAreaType.CITIES, 8253, 8252, 8509, 8508),
CITY_MEIYERDITCH("Meiyerditch" , DiscordAreaType.CITIES, 14132, 14388, 14387, 14386, 14385),
CITY_MISCELLANIA("Miscellania" , DiscordAreaType.CITIES, 10044, 10300),
CITY_MOS_LE_HARMLESS("Mos Le'Harmless" , DiscordAreaType.CITIES, 14638),
CITY_MORTTON("Mort'ton" , DiscordAreaType.CITIES, 13875),
CITY_MOR_UI_REK("Mor UI Rek" , DiscordAreaType.CITIES, 9808, 9807, 10064, 10063),
CITY_NARDAH("Nardah" , DiscordAreaType.CITIES, 13613),
CITY_NEITIZNOT("Neitiznot" , DiscordAreaType.CITIES, 9275),
CITY_PISCATORIS("Piscatoris" , DiscordAreaType.CITIES, 9273),
CITY_POLLNIVNEACH("Pollnivneach" , DiscordAreaType.CITIES, 13358),
CITY_PORT_KHAZARD("Port Khazard" , DiscordAreaType.CITIES, 10545),
CITY_PORT_PHASMATYS("Port Phasmatys" , DiscordAreaType.CITIES, 14646),
CITY_PORT_SARIM("Port Sarim" , DiscordAreaType.CITIES, 12082),
CITY_PISCARILIUS_HOUSE("Piscarilius House" , DiscordAreaType.CITIES, 6971, 7227, 6970, 7226),
CITY_RELLEKKA("Rellekka" , DiscordAreaType.CITIES, 10553),
CITY_RIMMINGTON("Rimmington" , DiscordAreaType.CITIES, 11826, 11570),
CITY_SEERS_VILLAGE("Seers' Village" , DiscordAreaType.CITIES, 10806),
CITY_SHAYZIEN_HOUSE("Shayzien House" , DiscordAreaType.CITIES, 5944, 5943, 6200, 6199, 5688),
CITY_SHILO_VILLAGE("Shilo Village" , DiscordAreaType.CITIES, 11310),
CITY_SOPHANEM("Sophanem" , DiscordAreaType.CITIES, 13099),
CITY_TAI_BWO_WANNAI("Tai Bwo Wannai" , DiscordAreaType.CITIES, 11056, 11055),
CITY_TAVERLEY("Taverley" , DiscordAreaType.CITIES, 11574, 11573),
CITY_TREE_GNOME_STRONGHOLD("Tree Gnome Stronghold" , DiscordAreaType.CITIES, 9782, 9781),
CITY_TREE_GNOME_VILLAGE("Tree Gnome Village" , DiscordAreaType.CITIES, 10033),
CITY_TROLL_STRONGHOLD("Troll Stronghold" , DiscordAreaType.CITIES, 11321),
CITY_TYRAS_CAMP("Tyras Camp" , DiscordAreaType.CITIES, 8753, 8752),
CITY_UZER("Uzer" , DiscordAreaType.CITIES, 13872),
CITY_VARROCK("Varrock" , DiscordAreaType.CITIES, 12596, 12597, 12598, 12852, 12853, 12854, 13108, 13109, 13110),
CITY_WITCHHAVEN("Witchaven" , DiscordAreaType.CITIES, 10803),
CITY_YANILLE("Yanille" , DiscordAreaType.CITIES, 10288, 10032),
CITY_ZANARIS("Zanaris" , DiscordAreaType.CITIES, 9285, 9541, 9540, 9797),
CITY_ZULANDRA("Zul-Andra" , DiscordAreaType.CITIES, 8751);
private static final Map<Integer, DiscordGameEventType> FROM_REGION = new HashMap<>();

View File

@@ -234,6 +234,7 @@ public class DiscordPlugin extends Plugin
switch (event.getDiscordAreaType())
{
case BOSSES: return config.showBossActivity();
case CITIES: return config.showCityActivity();
}
return false;