aikar / aikar/AdvancementCommand

Replacement Alias doesn't work

Abierto
#4 1 comentario 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
Java
Estrellas
13
Forks
4
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

So, I was attempting to use this plugin to give a player some special permissions when they got an advancement.... I set up a command, but when the advancement was achieved, the console spat out that it couldn't find a player named %player

(this is on Spigot 1.14.4, by the way, Java 1.8.0_251)

I looked at your code, and this line: private static final Pattern PLAYER = Pattern.compile("%player\b", Pattern.CASE_INSENSITIVE);

You've got this "\b" in there, I tested it out in a fiddle, and it doesn't seem to match the pattern unless the string has the backspace control character at the end. Of course, if I try to put the backspace control character at the end in the yaml, it won't run.

If you change the pattern to: private static final Pattern PLAYER = Pattern.compile("%player\\b", Pattern.CASE_INSENSITIVE);
then the code will work as I believe you wanted it to. You actually have a pull request already from someone who found and fixed this problem, if you could just merge it I think we'd be good.

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.