Skip to content

Commit

Permalink
Renamed PluginCollector to PluginDataCollector
Browse files Browse the repository at this point in the history
  • Loading branch information
OakLaptop committed Oct 15, 2024
1 parent a980da4 commit ce840ce
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
import java.util.Collection;
import java.util.List;

public class CommonPluginCollector implements PluginCollector {
public class CommonPluginCollector implements PluginDataCollector {

@Override
public List<PluginData> collectPlugins(Collection<JavaPlugin> unknownPlugins) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
import java.util.*;
import java.util.logging.Level;

public class ModrinthCollector implements PluginCollector {
public class ModrinthCollector implements PluginDataCollector {

@Override
public List<PluginData> collectPlugins(Collection<JavaPlugin> unknownPlugins) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import java.util.*;
import java.util.stream.Collectors;

public interface PluginCollector {
public interface PluginDataCollector {

List<PluginData> collectPlugins(Collection<JavaPlugin> unknownPlugins);

Expand All @@ -26,14 +26,14 @@ static List<PluginData> collectUnknownPlugins() {
}

List<PluginData> foundPluginDataList = new ArrayList<>();
List<PluginCollector> collectors = List.of(
List<PluginDataCollector> collectors = List.of(
new CommonPluginCollector(),
new PluginYamlCollector(),
new ModrinthCollector(),
new SpigotCollector()
);

for (PluginCollector collector : collectors) {
for (PluginDataCollector collector : collectors) {
List<PluginData> pluginDataList = collector.collectPlugins(unknownPlugins.values());

for (PluginData pluginData : pluginDataList) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import java.util.Collection;
import java.util.List;

public class PluginYamlCollector implements PluginCollector {
public class PluginYamlCollector implements PluginDataCollector {

@Override
public List<PluginData> collectPlugins(Collection<JavaPlugin> unknownPlugins) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import java.util.List;
import java.util.logging.Level;

public class SpigotCollector implements PluginCollector {
public class SpigotCollector implements PluginDataCollector {

@Override
public List<PluginData> collectPlugins(Collection<JavaPlugin> unknownPlugins) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import org.bukkit.plugin.Plugin;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.lushplugins.pluginupdater.collector.PluginCollector;
import org.lushplugins.pluginupdater.collector.PluginDataCollector;
import org.lushplugins.pluginupdater.updater.UpdateHandler;

import java.util.*;
Expand Down Expand Up @@ -80,7 +80,7 @@ public void reloadConfig() {
});
}

List<PluginData> collectedPluginData = PluginCollector.collectUnknownPlugins();
List<PluginData> collectedPluginData = PluginDataCollector.collectUnknownPlugins();
for (PluginData pluginData : collectedPluginData) {
addPlugin(pluginData);
}
Expand Down

0 comments on commit ce840ce

Please sign in to comment.