docs: 更新代码示例
This commit is contained in:
@@ -179,11 +179,10 @@ public class BallListener {
|
||||
if (!"GlobalChat".equals(event.getChannel())) {
|
||||
return;
|
||||
}
|
||||
BallMessage ballMessage = event.getMessage();
|
||||
String action = ballMessage.getAction();
|
||||
String action = event.getAction();
|
||||
switch (action) {
|
||||
case "onPlayerChat": {
|
||||
JsonObject object = ballMessage.getContentAsJsonObject();
|
||||
JsonObject object = event.getContentAsJsonObject();
|
||||
String name = object.get("name").getAsString();
|
||||
String message = object.get("message").getAsString();
|
||||
String world = object.get("world").getAsString();
|
||||
|
Reference in New Issue
Block a user