Skip to content
This repository has been archived by the owner on Apr 24, 2024. It is now read-only.

Commit

Permalink
Slightly changed LogFilter.
Browse files Browse the repository at this point in the history
Former-commit-id: 7ff9f6f
  • Loading branch information
PolskiStevek committed Mar 7, 2020
1 parent efc5b54 commit 2ecf2fc
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
5 changes: 4 additions & 1 deletion src/main/java/me/ishift/epicguard/api/LogFilter.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,13 @@
public class LogFilter extends AbstractFilter {
private List<String> filteredMessages;

public LogFilter() {
}

/**
* @param filteredMessages List of messages which should be hidden.
*/
public LogFilter(List<String> filteredMessages) {
public void setFilteredMessages(List<String> filteredMessages) {
this.filteredMessages = filteredMessages;
}

Expand Down
7 changes: 5 additions & 2 deletions src/main/java/me/ishift/epicguard/bukkit/GuardBukkit.java
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,11 @@ public void onEnable() {
this.getCommand("epicguard").setExecutor(new GuardCommand());
this.getCommand("epicguard").setTabCompleter(new GuardTabCompleter());

final LogFilter filter = new LogFilter(Config.filterValues);
filter.registerFilter();
if (Config.filterEnabled) {
final LogFilter filter = new LogFilter();
filter.setFilteredMessages(Config.filterValues);
filter.registerFilter();
}

Updater.checkForUpdates();
Bukkit.getOnlinePlayers().forEach(UserManager::addUser);
Expand Down
1 change: 1 addition & 0 deletions src/main/resources/plugin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
name: EpicGuard
version: '${project.version}'
main: me.ishift.epicguard.bukkit.GuardBukkit
load: STARTUP
softdepend: [ProtocolLib, EssentialsGeoIP]

# Other information about plugin section.
Expand Down

0 comments on commit 2ecf2fc

Please sign in to comment.