Fixed spelling inconsistency
This commit is contained in:
@@ -187,7 +187,7 @@ public interface Eco {
|
||||
* @return The CommandBase implementation
|
||||
*/
|
||||
@NotNull
|
||||
CommandBase createSubCommand(@NotNull CommandBase parentDelegate,
|
||||
CommandBase createSubcommand(@NotNull CommandBase parentDelegate,
|
||||
@NotNull EcoPlugin plugin,
|
||||
@NotNull String name,
|
||||
@NotNull String permission,
|
||||
|
||||
@@ -111,7 +111,7 @@ public interface CommandBase {
|
||||
|
||||
/**
|
||||
* Throws an exception containing a langYml key.
|
||||
* <p>The {@link CommandBase#onExecute(CommandSender, List) onExecute } in PluginCommand and SubCommand
|
||||
* <p>The {@link CommandBase#onExecute(CommandSender, List) onExecute } in PluginCommand and Subcommand
|
||||
* automatically handles sending the message to the sender.</p>
|
||||
* <br>
|
||||
* Works with any CommandBase implementation:
|
||||
@@ -130,7 +130,7 @@ public interface CommandBase {
|
||||
|
||||
/**
|
||||
* Throws an exception containing a langYml key if obj is null.
|
||||
* <p>The {@link CommandBase#onExecute(CommandSender, List) onExecute } in PluginCommand and SubCommand
|
||||
* <p>The {@link CommandBase#onExecute(CommandSender, List) onExecute } in PluginCommand and Subcommand
|
||||
* automatically handles sending the message to the sender.</p>
|
||||
* <br>
|
||||
* Works with any CommandBase implementation:
|
||||
@@ -155,7 +155,7 @@ public interface CommandBase {
|
||||
|
||||
/**
|
||||
* Throws an exception containing a langYml key if predicate tests false
|
||||
* <p>The {@link CommandBase#onExecute(CommandSender, List) onExecute } in PluginCommand and SubCommand
|
||||
* <p>The {@link CommandBase#onExecute(CommandSender, List) onExecute } in PluginCommand and Subcommand
|
||||
* automatically handles sending the message to the sender.</p>
|
||||
* <br>
|
||||
* Works with any CommandBase implementation:
|
||||
@@ -179,7 +179,7 @@ public interface CommandBase {
|
||||
|
||||
/**
|
||||
* Throws an exception containing a langYml key if condition is false.
|
||||
* <p>The {@link CommandBase#onExecute(CommandSender, List) onExecute } in PluginCommand and SubCommand
|
||||
* <p>The {@link CommandBase#onExecute(CommandSender, List) onExecute } in PluginCommand and Subcommand
|
||||
* automatically handles sending the message to the sender.</p>
|
||||
* <br>
|
||||
* Works with any CommandBase implementation:
|
||||
@@ -203,7 +203,7 @@ public interface CommandBase {
|
||||
|
||||
/**
|
||||
* Throws an exception containing a langYml key if Bukkit.getPlayer(playerName) is null.
|
||||
* <p>The {@link CommandBase#onExecute(CommandSender, List) onExecute } in PluginCommand and SubCommand
|
||||
* <p>The {@link CommandBase#onExecute(CommandSender, List) onExecute } in PluginCommand and Subcommand
|
||||
* automatically handles sending the message to the sender.</p>
|
||||
* <br>
|
||||
* Works with any CommandBase implementation:
|
||||
@@ -227,7 +227,7 @@ public interface CommandBase {
|
||||
|
||||
/**
|
||||
* Throws an exception containing a langYml key if Bukkit.getPlayer(playerName) is null.
|
||||
* <p>The {@link CommandBase#onExecute(CommandSender, List) onExecute } in PluginCommand and SubCommand
|
||||
* <p>The {@link CommandBase#onExecute(CommandSender, List) onExecute } in PluginCommand and Subcommand
|
||||
* automatically handles sending the message to the sender.</p>
|
||||
* <br>
|
||||
* Works with any CommandBase implementation:
|
||||
@@ -253,7 +253,7 @@ public interface CommandBase {
|
||||
|
||||
/**
|
||||
* Throws an exception containing a langYml key if player doesn't have permission.
|
||||
* <p>The {@link CommandBase#onExecute(CommandSender, List) onExecute } in PluginCommand and SubCommand
|
||||
* <p>The {@link CommandBase#onExecute(CommandSender, List) onExecute } in PluginCommand and Subcommand
|
||||
* automatically handles sending the message to the sender.</p>
|
||||
* <br>
|
||||
* Works with any CommandBase implementation:
|
||||
|
||||
@@ -28,7 +28,7 @@ public abstract class Subcommand implements CommandBase {
|
||||
@NotNull final String name,
|
||||
@NotNull final String permission,
|
||||
final boolean playersOnly) {
|
||||
this.delegate = Eco.get().createSubCommand(this, plugin, name, permission, playersOnly);
|
||||
this.delegate = Eco.get().createSubcommand(this, plugin, name, permission, playersOnly);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -148,7 +148,7 @@ fun CommandBase.addSubcommand(
|
||||
|
||||
/**
|
||||
* Throws an exception containing a langYml key if obj is null.
|
||||
* <p>The {@link CommandBase#onExecute(CommandSender, List) onExecute } in PluginCommand and SubCommand
|
||||
* <p>The {@link CommandBase#onExecute(CommandSender, List) onExecute } in PluginCommand and Subcommand
|
||||
* automatically handles sending the message to the sender.</p>
|
||||
* <br>
|
||||
* @param key key of notification message in langYml
|
||||
@@ -161,7 +161,7 @@ fun <T> T?.notifyNull(key: String): T {
|
||||
|
||||
/**
|
||||
* Throws an exception containing a langYml key if predicate tests false
|
||||
* <p>The {@link CommandBase#onExecute(CommandSender, List) onExecute } in PluginCommand and SubCommand
|
||||
* <p>The {@link CommandBase#onExecute(CommandSender, List) onExecute } in PluginCommand and Subcommand
|
||||
* automatically handles sending the message to the sender.</p>
|
||||
* <br>
|
||||
* @param predicate predicate to test
|
||||
@@ -176,7 +176,7 @@ fun <T> T.notifyFalse(predicate: Predicate<T>, key: String): T {
|
||||
|
||||
/**
|
||||
* Throws an exception containing a langYml key if condition is false.
|
||||
* <p>The {@link CommandBase#onExecute(CommandSender, List) onExecute } in PluginCommand and SubCommand
|
||||
* <p>The {@link CommandBase#onExecute(CommandSender, List) onExecute } in PluginCommand and Subcommand
|
||||
* automatically handles sending the message to the sender.</p>
|
||||
* <br>
|
||||
* @param key value in the langYml
|
||||
@@ -189,7 +189,7 @@ fun Boolean.notifyFalse(key: String): Boolean {
|
||||
|
||||
/**
|
||||
* Throws an exception containing a langYml key if Bukkit.getPlayer(playerName) is null.
|
||||
* <p>The {@link CommandBase#onExecute(CommandSender, List) onExecute } in PluginCommand and SubCommand
|
||||
* <p>The {@link CommandBase#onExecute(CommandSender, List) onExecute } in PluginCommand and Subcommand
|
||||
* automatically handles sending the message to the sender.</p>
|
||||
* <br>
|
||||
* @param key value in the langYml
|
||||
@@ -202,7 +202,7 @@ fun String?.notifyPlayerRequired(key: String): Player {
|
||||
|
||||
/**
|
||||
* Throws an exception containing a langYml key if Bukkit.getPlayer(playerName) is null.
|
||||
* <p>The {@link CommandBase#onExecute(CommandSender, List) onExecute } in PluginCommand and SubCommand
|
||||
* <p>The {@link CommandBase#onExecute(CommandSender, List) onExecute } in PluginCommand and Subcommand
|
||||
* automatically handles sending the message to the sender.</p>
|
||||
* <br>
|
||||
* @param key value in the langYml
|
||||
@@ -222,7 +222,7 @@ fun String?.notifyOfflinePlayerRequired(key: String): OfflinePlayer {
|
||||
|
||||
/**
|
||||
* Throws an exception containing a langYml key if player doesn't have permission.
|
||||
* <p>The {@link CommandBase#onExecute(CommandSender, List) onExecute } in PluginCommand and SubCommand
|
||||
* <p>The {@link CommandBase#onExecute(CommandSender, List) onExecute } in PluginCommand and Subcommand
|
||||
* automatically handles sending the message to the sender.</p>
|
||||
* <br>
|
||||
* @param permission the permission
|
||||
|
||||
@@ -12,7 +12,7 @@ class EcoPluginCommand(
|
||||
name: String,
|
||||
permission: String,
|
||||
playersOnly: Boolean
|
||||
) : EcoHandledCommand(parentDelegate, plugin, name, permission, playersOnly),
|
||||
) : HandledCommand(parentDelegate, plugin, name, permission, playersOnly),
|
||||
PluginCommandBase {
|
||||
override fun register() {
|
||||
val command = Bukkit.getPluginCommand(name)
|
||||
@@ -46,10 +46,10 @@ class EcoPluginCommand(
|
||||
}
|
||||
}
|
||||
|
||||
class EcoSubCommand(
|
||||
class EcoSubcommand(
|
||||
parentDelegate: CommandBase,
|
||||
plugin: EcoPlugin,
|
||||
name: String,
|
||||
permission: String,
|
||||
playersOnly: Boolean
|
||||
) : EcoHandledCommand(parentDelegate, plugin, name, permission, playersOnly)
|
||||
) : HandledCommand(parentDelegate, plugin, name, permission, playersOnly)
|
||||
|
||||
@@ -18,7 +18,7 @@ import org.bukkit.util.StringUtil
|
||||
* Handled commands have a method to pass in raw input from bukkit commands
|
||||
* in order to execute the command-specific code.
|
||||
*/
|
||||
abstract class EcoHandledCommand(
|
||||
abstract class HandledCommand(
|
||||
private val parentDelegate: CommandBase,
|
||||
private val plugin: EcoPlugin,
|
||||
private val name: String,
|
||||
@@ -92,13 +92,13 @@ abstract class EcoHandledCommand(
|
||||
}
|
||||
|
||||
if (args.isNotEmpty()) {
|
||||
for (subCommand in subcommands) {
|
||||
if (subCommand.name.equals(args[0], true)) {
|
||||
if (!canExecute(sender, subCommand, plugin)) {
|
||||
for (subcommand in subcommands) {
|
||||
if (subcommand.name.equals(args[0], true)) {
|
||||
if (!canExecute(sender, subcommand, plugin)) {
|
||||
return
|
||||
}
|
||||
|
||||
subCommand.handleExecution(sender, args.subList(1, args.size))
|
||||
subcommand.handleExecution(sender, args.subList(1, args.size))
|
||||
return
|
||||
}
|
||||
}
|
||||
@@ -16,7 +16,7 @@ import com.willfp.eco.core.items.Items
|
||||
import com.willfp.eco.core.math.MathContext
|
||||
import com.willfp.eco.internal.EcoPropsParser
|
||||
import com.willfp.eco.internal.command.EcoPluginCommand
|
||||
import com.willfp.eco.internal.command.EcoSubCommand
|
||||
import com.willfp.eco.internal.command.EcoSubcommand
|
||||
import com.willfp.eco.internal.config.*
|
||||
import com.willfp.eco.internal.drops.EcoDropQueue
|
||||
import com.willfp.eco.internal.drops.EcoFastCollatedDropQueue
|
||||
@@ -181,13 +181,13 @@ class EcoImpl : EcoSpigotPlugin(), Eco {
|
||||
playersOnly
|
||||
)
|
||||
|
||||
override fun createSubCommand(
|
||||
override fun createSubcommand(
|
||||
parentDelegate: CommandBase,
|
||||
plugin: EcoPlugin,
|
||||
name: String,
|
||||
permission: String,
|
||||
playersOnly: Boolean
|
||||
) = EcoSubCommand(
|
||||
) = EcoSubcommand(
|
||||
parentDelegate,
|
||||
plugin,
|
||||
name,
|
||||
|
||||
Reference in New Issue
Block a user