Fixed poorly named methods
This commit is contained in:
@@ -345,7 +345,7 @@ public abstract class EcoPlugin extends JavaPlugin {
|
|||||||
PlaceholderManager.addIntegration(Eco.getHandler().createPAPIIntegration(this));
|
PlaceholderManager.addIntegration(Eco.getHandler().createPAPIIntegration(this));
|
||||||
}
|
}
|
||||||
|
|
||||||
this.getIntegrationLoaders().forEach((integrationLoader -> {
|
this.loadIntegrationLoaders().forEach((integrationLoader -> {
|
||||||
if (enabledPlugins.contains(integrationLoader.getPluginName())) {
|
if (enabledPlugins.contains(integrationLoader.getPluginName())) {
|
||||||
this.loadedIntegrations.add(integrationLoader.getPluginName());
|
this.loadedIntegrations.add(integrationLoader.getPluginName());
|
||||||
integrationLoader.load();
|
integrationLoader.load();
|
||||||
@@ -356,17 +356,17 @@ public abstract class EcoPlugin extends JavaPlugin {
|
|||||||
|
|
||||||
Prerequisite.update();
|
Prerequisite.update();
|
||||||
|
|
||||||
this.getPacketAdapters().forEach(abstractPacketAdapter -> {
|
this.loadPacketAdapters().forEach(abstractPacketAdapter -> {
|
||||||
if (!abstractPacketAdapter.isPostLoad()) {
|
if (!abstractPacketAdapter.isPostLoad()) {
|
||||||
abstractPacketAdapter.register();
|
abstractPacketAdapter.register();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
updatableClasses.addAll(this.getUpdatableClasses());
|
updatableClasses.addAll(this.loadUpdatableClasses());
|
||||||
|
|
||||||
this.getListeners().forEach(listener -> this.getEventManager().registerListener(listener));
|
this.loadListeners().forEach(listener -> this.getEventManager().registerListener(listener));
|
||||||
|
|
||||||
this.getPluginCommands().forEach(PluginCommand::register);
|
this.loadPluginCommands().forEach(PluginCommand::register);
|
||||||
|
|
||||||
this.getScheduler().runLater(this::afterLoad, 1);
|
this.getScheduler().runLater(this::afterLoad, 1);
|
||||||
|
|
||||||
@@ -429,7 +429,7 @@ public abstract class EcoPlugin extends JavaPlugin {
|
|||||||
Display.registerDisplayModule(this.getDisplayModule());
|
Display.registerDisplayModule(this.getDisplayModule());
|
||||||
}
|
}
|
||||||
|
|
||||||
this.getPacketAdapters().forEach(abstractPacketAdapter -> {
|
this.loadPacketAdapters().forEach(abstractPacketAdapter -> {
|
||||||
if (abstractPacketAdapter.isPostLoad()) {
|
if (abstractPacketAdapter.isPostLoad()) {
|
||||||
abstractPacketAdapter.register();
|
abstractPacketAdapter.register();
|
||||||
}
|
}
|
||||||
@@ -520,7 +520,7 @@ public abstract class EcoPlugin extends JavaPlugin {
|
|||||||
*
|
*
|
||||||
* @return A list of integrations.
|
* @return A list of integrations.
|
||||||
*/
|
*/
|
||||||
public List<IntegrationLoader> getIntegrationLoaders() {
|
protected List<IntegrationLoader> loadIntegrationLoaders() {
|
||||||
return new ArrayList<>();
|
return new ArrayList<>();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -529,7 +529,7 @@ public abstract class EcoPlugin extends JavaPlugin {
|
|||||||
*
|
*
|
||||||
* @return A list of commands.
|
* @return A list of commands.
|
||||||
*/
|
*/
|
||||||
public List<PluginCommand> getPluginCommands() {
|
protected List<PluginCommand> loadPluginCommands() {
|
||||||
return new ArrayList<>();
|
return new ArrayList<>();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -540,7 +540,7 @@ public abstract class EcoPlugin extends JavaPlugin {
|
|||||||
*
|
*
|
||||||
* @return A list of packet adapters.
|
* @return A list of packet adapters.
|
||||||
*/
|
*/
|
||||||
public List<AbstractPacketAdapter> getPacketAdapters() {
|
protected List<AbstractPacketAdapter> loadPacketAdapters() {
|
||||||
return new ArrayList<>();
|
return new ArrayList<>();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -549,14 +549,14 @@ public abstract class EcoPlugin extends JavaPlugin {
|
|||||||
*
|
*
|
||||||
* @return A list of all listeners.
|
* @return A list of all listeners.
|
||||||
*/
|
*/
|
||||||
public abstract List<Listener> getListeners();
|
protected abstract List<Listener> loadListeners();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* All updatable classes.
|
* All updatable classes.
|
||||||
*
|
*
|
||||||
* @return A list of all updatable classes.
|
* @return A list of all updatable classes.
|
||||||
*/
|
*/
|
||||||
public List<Class<?>> getUpdatableClasses() {
|
protected List<Class<?>> loadUpdatableClasses() {
|
||||||
return new ArrayList<>();
|
return new ArrayList<>();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -580,7 +580,7 @@ public abstract class EcoPlugin extends JavaPlugin {
|
|||||||
*
|
*
|
||||||
* @return The version.
|
* @return The version.
|
||||||
*/
|
*/
|
||||||
protected String getMinimumEcoVersion() {
|
public String getMinimumEcoVersion() {
|
||||||
return "6.0.0";
|
return "6.0.0";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -109,7 +109,7 @@ public abstract class EcoSpigotPlugin extends EcoPlugin {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<IntegrationLoader> getIntegrationLoaders() {
|
public List<IntegrationLoader> loadIntegrationLoaders() {
|
||||||
return Arrays.asList(
|
return Arrays.asList(
|
||||||
// AntiGrief
|
// AntiGrief
|
||||||
new IntegrationLoader("WorldGuard", () -> AntigriefManager.register(new AntigriefWorldGuard())),
|
new IntegrationLoader("WorldGuard", () -> AntigriefManager.register(new AntigriefWorldGuard())),
|
||||||
@@ -149,7 +149,7 @@ public abstract class EcoSpigotPlugin extends EcoPlugin {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<AbstractPacketAdapter> getPacketAdapters() {
|
public List<AbstractPacketAdapter> loadPacketAdapters() {
|
||||||
List<AbstractPacketAdapter> adapters = new ArrayList<>(Arrays.asList(
|
List<AbstractPacketAdapter> adapters = new ArrayList<>(Arrays.asList(
|
||||||
new PacketAutoRecipe(this),
|
new PacketAutoRecipe(this),
|
||||||
new PacketChat(this),
|
new PacketChat(this),
|
||||||
@@ -166,7 +166,7 @@ public abstract class EcoSpigotPlugin extends EcoPlugin {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<Listener> getListeners() {
|
public List<Listener> loadListeners() {
|
||||||
return Arrays.asList(
|
return Arrays.asList(
|
||||||
new NaturalExpGainListeners(),
|
new NaturalExpGainListeners(),
|
||||||
new ArmorListener(),
|
new ArmorListener(),
|
||||||
@@ -180,7 +180,7 @@ public abstract class EcoSpigotPlugin extends EcoPlugin {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<Class<?>> getUpdatableClasses() {
|
public List<Class<?>> loadUpdatableClasses() {
|
||||||
return Arrays.asList(
|
return Arrays.asList(
|
||||||
DropManager.class
|
DropManager.class
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user