aikar / aikar/AdvancementCommand

Replacement Alias doesn't work

オープン
#4 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
Java
スター
13
フォーク
4
PR マージ指標
30日以内にマージされた PR はありません

説明

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.

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。