Remove plugins.gradle and factor into common extension

This commit is contained in:
Gary Tierney
2017-09-16 18:49:06 +01:00
parent d323bcd69c
commit 36282cf81e
104 changed files with 608 additions and 408 deletions
+20
View File
@@ -0,0 +1,20 @@
import org.apollo.game.model.entity.Player
/**
* Checks whether the amount of arguments provided is correct, sending the player the specified
* message if not.
*/
fun valid_arg_length(args: Array<String>, length: IntRange, player: Player, message: String): Boolean {
val valid = length.contains(args.size)
if (!valid) {
player.sendMessage(message)
}
return valid
}
/**
* Checks whether the amount of arguments provided is correct, sending the player the specified
* message if not.
*/
fun valid_arg_length(args: Array<String>, length: Int, player: Player, message: String)
= valid_arg_length(args, IntRange(length, length), player, message)