fix(hamster-ball-bridge): 修复频道未忽略前缀的问题

This commit is contained in:
2024-03-02 18:07:11 +08:00
parent 048fe1ed61
commit f716ca7d9b
3 changed files with 9 additions and 9 deletions

View File

@@ -2,5 +2,5 @@ org.gradle.jvmargs=-Xmx2G
spigot_api_version=1.20.2-R0.1-SNAPSHOT spigot_api_version=1.20.2-R0.1-SNAPSHOT
bungeecord_api_version=1.20-R0.1-SNAPSHOT bungeecord_api_version=1.20-R0.1-SNAPSHOT
hamster_core_version=1.2.2 hamster_core_version=1.2.2
hamster_ball_version=1.5.1 hamster_ball_version=1.5.3
placeholder_api_version=2.11.2 placeholder_api_version=2.11.2

View File

@@ -46,7 +46,7 @@ public abstract class ServiceMessageAPI {
* @param action 执行动作 * @param action 执行动作
*/ */
public static void sendServiceMessage(String tag, String action) { public static void sendServiceMessage(String tag, String action) {
BallAPI.getInstance().sendBallMessage(tag, action, false); BallAPI.getInstance().sendRawBallMessage(tag, action);
} }
/** /**
@@ -57,7 +57,7 @@ public abstract class ServiceMessageAPI {
* @param content 附加参数 * @param content 附加参数
*/ */
public static void sendServiceMessage(String tag, String action, String content) { public static void sendServiceMessage(String tag, String action, String content) {
BallAPI.getInstance().sendBallMessage(tag, action, content, false); BallAPI.getInstance().sendRawBallMessage(tag, action, content);
} }
/** /**
@@ -70,7 +70,7 @@ public abstract class ServiceMessageAPI {
* @see String#format(String, Object...) * @see String#format(String, Object...)
*/ */
public static void sendServiceMessage(String tag, String action, String content, Object... args) { public static void sendServiceMessage(String tag, String action, String content, Object... args) {
BallAPI.getInstance().sendBallMessage(tag, action, String.format(content, args), false); BallAPI.getInstance().sendRawBallMessage(tag, action, new JsonPrimitive(String.format(content, args)));
} }
/** /**

View File

@@ -42,7 +42,7 @@ public abstract class ServiceMessageAPI {
* @param action 执行动作 * @param action 执行动作
*/ */
public static void sendServiceMessage(String tag, String action) { public static void sendServiceMessage(String tag, String action) {
BallAPI.getInstance().sendBallMessage(tag, action); BallAPI.getInstance().sendRawBallMessage(tag, action);
} }
/** /**
@@ -53,7 +53,7 @@ public abstract class ServiceMessageAPI {
* @param content 附加参数 * @param content 附加参数
*/ */
public static void sendServiceMessage(String tag, String action, String content) { public static void sendServiceMessage(String tag, String action, String content) {
BallAPI.getInstance().sendBallMessage(tag, action, content); BallAPI.getInstance().sendRawBallMessage(tag, action, content);
} }
/** /**
@@ -66,7 +66,7 @@ public abstract class ServiceMessageAPI {
* @see String#format(String, Object...) * @see String#format(String, Object...)
*/ */
public static void sendServiceMessage(String tag, String action, String content, Object... args) { public static void sendServiceMessage(String tag, String action, String content, Object... args) {
BallAPI.getInstance().sendBallMessage(tag, action, new JsonPrimitive(String.format(content, args))); BallAPI.getInstance().sendRawBallMessage(tag, action, new JsonPrimitive(String.format(content, args)));
} }
/** /**
@@ -77,7 +77,7 @@ public abstract class ServiceMessageAPI {
* @param content 附加参数 * @param content 附加参数
*/ */
public static void sendServiceMessage(String tag, String action, JsonElement content) { public static void sendServiceMessage(String tag, String action, JsonElement content) {
BallAPI.getInstance().sendBallMessage(tag, new BallMessage(action, content), false); BallAPI.getInstance().sendBallMessage(tag, new BallMessage(action, content), false, false);
} }
/** /**
@@ -94,7 +94,7 @@ public abstract class ServiceMessageAPI {
info.getAction(), info.getAction(),
info.getContent() info.getContent()
); );
BallAPI.getInstance().sendBallMessage(info.getTag(), message, block); BallAPI.getInstance().sendBallMessage(info.getTag(), message, false, block);
} }
/** /**