Add ability to highlight rooms
This commit is contained in:
@@ -81,6 +81,17 @@ public interface RaidsConfig extends Config
|
||||
|
||||
@ConfigItem(
|
||||
position = 4,
|
||||
keyName = "whitelistedRooms",
|
||||
name = "Whitelisted rooms",
|
||||
description = "Display whitelisted rooms in green on the overlay. Separate with comma (full name)"
|
||||
)
|
||||
default String whitelistedRooms()
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
@ConfigItem(
|
||||
position = 5,
|
||||
keyName = "blacklistedRooms",
|
||||
name = "Blacklisted rooms",
|
||||
description = "Display blacklisted rooms in red on the overlay. Separate with comma (full name)"
|
||||
@@ -91,7 +102,7 @@ public interface RaidsConfig extends Config
|
||||
}
|
||||
|
||||
@ConfigItem(
|
||||
position = 5,
|
||||
position = 6,
|
||||
keyName = "enableLayoutWhitelist",
|
||||
name = "Enable layout whitelist",
|
||||
description = "Enable the layout whitelist"
|
||||
@@ -102,7 +113,7 @@ public interface RaidsConfig extends Config
|
||||
}
|
||||
|
||||
@ConfigItem(
|
||||
position = 6,
|
||||
position = 7,
|
||||
keyName = "whitelistedLayouts",
|
||||
name = "Whitelisted layouts",
|
||||
description = "Warn when layout doesn't match a whitelisted one. Add layouts like CFSCPPCSCF separated with comma"
|
||||
|
||||
@@ -101,7 +101,11 @@ public class RaidsOverlay extends Overlay
|
||||
switch (room.getType())
|
||||
{
|
||||
case COMBAT:
|
||||
if (plugin.getBlacklist().contains(room.getBoss().getName().toLowerCase()))
|
||||
if (plugin.getRoomWhitelist().contains(room.getBoss().getName().toLowerCase()))
|
||||
{
|
||||
color = Color.GREEN;
|
||||
}
|
||||
else if (plugin.getRoomBlacklist().contains(room.getBoss().getName().toLowerCase()))
|
||||
{
|
||||
color = Color.RED;
|
||||
}
|
||||
@@ -112,7 +116,11 @@ public class RaidsOverlay extends Overlay
|
||||
break;
|
||||
|
||||
case PUZZLE:
|
||||
if (plugin.getBlacklist().contains(room.getPuzzle().getName().toLowerCase()))
|
||||
if (plugin.getRoomWhitelist().contains(room.getPuzzle().getName().toLowerCase()))
|
||||
{
|
||||
color = Color.GREEN;
|
||||
}
|
||||
else if (plugin.getRoomBlacklist().contains(room.getPuzzle().getName().toLowerCase()))
|
||||
{
|
||||
color = Color.RED;
|
||||
}
|
||||
|
||||
@@ -99,7 +99,10 @@ public class RaidsPlugin extends Plugin
|
||||
private Raid raid;
|
||||
|
||||
@Getter
|
||||
private ArrayList<String> blacklist = new ArrayList<>();
|
||||
private ArrayList<String> roomWhitelist = new ArrayList<>();
|
||||
|
||||
@Getter
|
||||
private ArrayList<String> roomBlacklist = new ArrayList<>();
|
||||
|
||||
@Getter
|
||||
private ArrayList<String> layoutWhitelist = new ArrayList<>();
|
||||
@@ -161,9 +164,14 @@ public class RaidsPlugin extends Plugin
|
||||
updateInfoBoxState();
|
||||
}
|
||||
|
||||
if (event.getKey().equals("whitelistedRooms"))
|
||||
{
|
||||
updateList(roomWhitelist, config.whitelistedRooms());
|
||||
}
|
||||
|
||||
if (event.getKey().equals("blacklistedRooms"))
|
||||
{
|
||||
updateList(blacklist, config.blacklistedRooms());
|
||||
updateList(roomBlacklist, config.blacklistedRooms());
|
||||
}
|
||||
|
||||
if (event.getKey().equals("whitelistedLayouts"))
|
||||
@@ -295,7 +303,8 @@ public class RaidsPlugin extends Plugin
|
||||
|
||||
private void updateLists()
|
||||
{
|
||||
updateList(blacklist, config.blacklistedRooms());
|
||||
updateList(roomWhitelist, config.blacklistedRooms());
|
||||
updateList(roomBlacklist, config.blacklistedRooms());
|
||||
updateList(layoutWhitelist, config.whitelistedLayouts());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user