Skip to content

WildCard

Marcin Grzywacz edited this page Jan 31, 2023 · 2 revisions

Description

Available since version 0.8.0

WildCard works only with parameter canBeWildcard in ArgumentType is true

It gives option for player to execute command several times(it only executes method several it doesn't repeat command) for all elements of list given by wildcard function

Example

Given following commands:

package com.lupus.tester.commands

import org.bukkit.World
import org.bukkit.entity.Player
import org.lupus.commands.core.annotations.parameters.WildCard

class TestCMD {
    fun b(ex: Player, @WildCard c: World, b: World): String {
        return "World: ${c.name}\nNormal World: ${b.name}"
    }
}

Output will be:

cmd-wildcard

Current types supported by wildcard

  • OfflinePlayer
  • Player
  • JavaPlugin
  • World
Clone this wiki locally