feat: 添加新 API

This commit is contained in:
2023-12-27 20:47:16 +08:00
parent ec6d5dec65
commit e80c983c51
2 changed files with 22 additions and 10 deletions

View File

@@ -148,6 +148,11 @@ public class DisplayMessage {
return copy;
}
@NotNull
public DisplayMessage replace(@NotNull String key, String value) {
return replace(TextReplacementConfig.builder().matchLiteral(key).replacement(value).build());
}
@NotNull
public JsonObject toJson() {
JsonObject object = new JsonObject();