use of me.botsko.prism.actionlibs.MatchRule in project Prism-Bukkit by prism.
the class EntityParameter method process.
/**
*
*/
@Override
public void process(QueryParameters query, String alias, String input, CommandSender sender) {
MatchRule match = MatchRule.INCLUDE;
if (input.startsWith("!")) {
match = MatchRule.EXCLUDE;
}
final String[] entityNames = input.split(",");
if (entityNames.length > 0) {
for (final String entityName : entityNames) {
query.addEntity(entityName.replace("!", ""), match);
}
}
}
use of me.botsko.prism.actionlibs.MatchRule in project Prism-Bukkit by prism.
the class PlayerParameter method process.
/**
*
*/
@Override
public void process(QueryParameters query, String alias, String input, CommandSender sender) {
MatchRule match = MatchRule.INCLUDE;
if (input.startsWith("!")) {
match = MatchRule.EXCLUDE;
input = input.replace("!", "");
} else if (input.startsWith("~")) {
match = MatchRule.PARTIAL;
input = input.replace("~", "");
}
final String[] playerNames = input.split(",");
if (playerNames.length > 0) {
for (String playerName : playerNames) {
query.addPlayerName(playerName, match);
}
}
}
Aggregations