Removed redundant Registerable interface
This commit is contained in:
@@ -1,7 +1,6 @@
|
|||||||
package com.willfp.eco.util.command;
|
package com.willfp.eco.util.command;
|
||||||
|
|
||||||
import com.willfp.eco.util.internal.PluginDependent;
|
import com.willfp.eco.util.internal.PluginDependent;
|
||||||
import com.willfp.eco.util.interfaces.Registerable;
|
|
||||||
import com.willfp.eco.util.plugin.AbstractEcoPlugin;
|
import com.willfp.eco.util.plugin.AbstractEcoPlugin;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
@@ -15,7 +14,7 @@ import org.jetbrains.annotations.Nullable;
|
|||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public abstract class AbstractCommand extends PluginDependent implements CommandExecutor, Registerable {
|
public abstract class AbstractCommand extends PluginDependent implements CommandExecutor {
|
||||||
/**
|
/**
|
||||||
* The name of the command
|
* The name of the command
|
||||||
* <p>
|
* <p>
|
||||||
@@ -130,7 +129,6 @@ public abstract class AbstractCommand extends PluginDependent implements Command
|
|||||||
* <p>
|
* <p>
|
||||||
* Requires the command name to exist, defined in plugin.yml.
|
* Requires the command name to exist, defined in plugin.yml.
|
||||||
*/
|
*/
|
||||||
@Override
|
|
||||||
public final void register() {
|
public final void register() {
|
||||||
PluginCommand command = Bukkit.getPluginCommand(name);
|
PluginCommand command = Bukkit.getPluginCommand(name);
|
||||||
assert command != null;
|
assert command != null;
|
||||||
|
|||||||
@@ -1,8 +0,0 @@
|
|||||||
package com.willfp.eco.util.interfaces;
|
|
||||||
|
|
||||||
public interface Registerable {
|
|
||||||
/**
|
|
||||||
* Register an object with its respective registry.
|
|
||||||
*/
|
|
||||||
void register();
|
|
||||||
}
|
|
||||||
@@ -1,6 +1,5 @@
|
|||||||
package com.willfp.eco.util.recipe.recipes;
|
package com.willfp.eco.util.recipe.recipes;
|
||||||
|
|
||||||
import com.willfp.eco.util.interfaces.Registerable;
|
|
||||||
import com.willfp.eco.util.internal.PluginDependent;
|
import com.willfp.eco.util.internal.PluginDependent;
|
||||||
import com.willfp.eco.util.plugin.AbstractEcoPlugin;
|
import com.willfp.eco.util.plugin.AbstractEcoPlugin;
|
||||||
import com.willfp.eco.util.recipe.Recipes;
|
import com.willfp.eco.util.recipe.Recipes;
|
||||||
@@ -14,7 +13,7 @@ import org.jetbrains.annotations.NotNull;
|
|||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
|
||||||
public final class EcoShapedRecipe extends PluginDependent implements Registerable {
|
public final class EcoShapedRecipe extends PluginDependent {
|
||||||
/**
|
/**
|
||||||
* Recipe parts.
|
* Recipe parts.
|
||||||
*/
|
*/
|
||||||
@@ -91,7 +90,6 @@ public final class EcoShapedRecipe extends PluginDependent implements Registerab
|
|||||||
/**
|
/**
|
||||||
* Register the recipe.
|
* Register the recipe.
|
||||||
*/
|
*/
|
||||||
@Override
|
|
||||||
public void register() {
|
public void register() {
|
||||||
Recipes.register(this);
|
Recipes.register(this);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user