diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/banlist/BanListConfig.java b/runelite-client/src/main/java/net/runelite/client/plugins/banlist/BanListConfig.java index 7069df9a7b..76fd2f6ba1 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/banlist/BanListConfig.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/banlist/BanListConfig.java @@ -11,8 +11,8 @@ public interface BanListConfig extends Config @ConfigItem( keyName = "bannedPlayers", - name = "Banned Players List", - description = "manual entry ", + name = "Manual Scammer List", + description = "Players you add to this list will be shown when you join a clan.", position = 0 ) @@ -31,8 +31,8 @@ public interface BanListConfig extends Config @ConfigItem( position = 1, keyName = "enableWDR", - name = "use WDR list", - description = "Incorporate WDR ban list" + name = "Enable WDR Scammer List", + description = "Incorporate WDR Scammer list" ) default boolean enableWDR() { @@ -42,8 +42,8 @@ public interface BanListConfig extends Config @ConfigItem( position = 2, keyName = "enableRuneWatch", - name = "use RuneWatch list", - description = "Incorporate RuneWatch Ban list" + name = "Enable RuneWatch Scammer List", + description = "Incorporate RuneWatch Scammer list" ) default boolean enableRuneWatch() { diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/banlist/BanListPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/banlist/BanListPlugin.java index 290464a5f0..c86c67dc20 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/banlist/BanListPlugin.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/banlist/BanListPlugin.java @@ -1,5 +1,7 @@ /* - * Copyright (c) 2019 xperiaclash + * Copyright (c) 2019, xperiaclash + * Copyright (c) 2019, ganom + * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -82,9 +84,6 @@ public class BanListPlugin extends Plugin @Override protected void startUp() throws Exception { - wdrArrayList = new ArrayList<>(); - runeWatchArrayList = new ArrayList<>(); - manualBans = new ArrayList<>(); manualBans.addAll(Text.fromCSV(config.getBannedPlayers())); fetchFromWebsites(); } @@ -92,9 +91,9 @@ public class BanListPlugin extends Plugin @Override protected void shutDown() throws Exception { - wdrArrayList = null; - runeWatchArrayList = null; - manualBans = null; + wdrArrayList.clear(); + runeWatchArrayList.clear(); + manualBans.clear(); } @Subscribe @@ -107,11 +106,17 @@ public class BanListPlugin extends Plugin @Subscribe public void onConfigChanged(ConfigChanged event) { - for (String manual : Text.fromCSV(config.getBannedPlayers())) + if (event.getGroup().equals("banlist")) { - if (!manualBans.contains(manual)) + if (event.getKey().equals("bannedPlayers")) { - manualBans.add(Text.standardize(manual)); + for (String manual : Text.fromCSV(config.getBannedPlayers())) + { + if (!manualBans.contains(manual)) + { + manualBans.add(Text.standardize(manual)); + } + } } } } @@ -153,7 +158,7 @@ public class BanListPlugin extends Plugin // on wdr list final String message = new ChatMessageBuilder() .append(ChatColorType.HIGHLIGHT) - .append("Warning! " + playerName + " is on WDR ban List") + .append("Warning! " + playerName + " is on WDRs' scammer list") .build(); chatMessageManager.queue( @@ -167,7 +172,7 @@ public class BanListPlugin extends Plugin // on runewatch list final String message = new ChatMessageBuilder() .append(ChatColorType.HIGHLIGHT) - .append("Warning! " + playerName + " is on Runewatch ban List") + .append("Warning! " + playerName + " is on Runewatchs' scammer list") .build(); chatMessageManager.queue( @@ -181,7 +186,7 @@ public class BanListPlugin extends Plugin // on manual list final String message = new ChatMessageBuilder() .append(ChatColorType.HIGHLIGHT) - .append("Warning! " + playerName + " is on Your Manual ban List") + .append("Warning! " + playerName + " is on your Manual scammer list") .build(); chatMessageManager.queue(