내 플러그인의 일부로 명확한 채팅 명령이 있고 비어있는 메시지 끝에는 텍스트를 표시하는 옵션이 있습니다. 내 문제는 PlaceHolderAPI가 제대로 작동하지 않는다는 것입니다.PlaceHolderAPI가 작동하지 않습니다.
명령 코드 :
if (label.equalsIgnoreCase("clearchat") || label.equalsIgnoreCase("mcc")) {
if (p.hasPermission("mystic.chat.admin.clearchat")) {
for (int i = 0; i < getConfig().getInt("clearChat.blankLines"); i++) {
Bukkit.broadcastMessage(" ");
}
for (String s : getConfig().getStringList("clearChat.endMessage")) {
s = PlaceholderAPI.setPlaceholders(p, s);
// This is here to check if the PlaceHolderAPI even knows there is place holders in it
p.sendMessage(String.valueOf(PlaceholderAPI.containsPlaceholders(s)));
Bukkit.broadcastMessage(ChatColor.translateAlternateColorCodes('&', s));
}
return true;
} else {
p.sendMessage(ChatColor.RED + "You are lacking the required permission node!");
return true;
}
}
구성 파일 섹션 : 내가 명령 "/ 고객 센터"또는 "/ clearchat"를 실행하면
clearChat:
blankLines: 256
endMessage:
- '&bChat was cleared by %player_name%'
는 항상 false를 말한다 (어떤 자리를 인정하지 않는) 장소 소유자 중 누구도 교체되지 않습니다.
API가 빌드 경로에 올바르게 포함되어 있고 명령 단어가 완벽하게 변환되지 않습니다.
는 느낌 ... 메신저 바보 같은 실수를, 또는 메신저이에게 완전한 길을 잘못하고있는 것처럼
[답변 방법] (http://stackoverflow.com/help/how-to-answer)은 upvoted 될 답변을 쓸 수 있도록 도와줍니다. – zhon
사용자가 API 내에서 모든 장소 소유자를 사용할 수 있기를 원합니다. % name % –