9
0
mirror of https://github.com/Xiao-MoMi/craft-engine.git synced 2025-12-31 04:46:37 +00:00

refactor(pack): 修改逻辑

This commit is contained in:
jhqwqmc
2025-04-19 16:56:42 +08:00
parent 4a0f5ee9cb
commit 1d04508624
5 changed files with 16 additions and 4 deletions

View File

@@ -36,7 +36,13 @@ public class SendResourcePackCommand extends BukkitCommandFeature<CommandSender>
if (bukkitServerPlayer == null) continue;
BukkitCraftEngine.instance().packManager().sendResourcePack(bukkitServerPlayer);
}
handleFeedback(context, MessageConstants.COMMAND_SEND_RESOURCE_PACK_SUCCESS, Component.text(players.size()));
int size = players.size();
if (size == 1) {
String name = players.iterator().next().getName();
handleFeedback(context, MessageConstants.COMMAND_SEND_RESOURCE_PACK_SUCCESS_SINGLE, Component.text(name));
} else {
handleFeedback(context, MessageConstants.COMMAND_SEND_RESOURCE_PACK_SUCCESS_MULTIPLE, Component.text(size));
}
});
}