aikar / aikar/AdvancementCommand

Replacement Alias doesn't work

Đang mở
#4 1 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Java
Star
13
Fork
4
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

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.

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.