Skip to content

Commit 5b0c314

Browse files
committed
修改部分代码
1 parent c325538 commit 5b0c314

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

src/main/java/com/liuyue/beep_Velocity/BeepVelocity.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,7 @@ public void execute(Invocation invocation) {
158158

159159
private void playBeep(Player target, Component sender) {
160160
Runnable sendAction = snedSoundPacket(target);
161+
sendAction.run();
161162
if (isBig) {
162163
target.showTitle(Title.title(
163164
Component.translatable("beep.title", sender),
@@ -191,7 +192,7 @@ public List<String> suggest(Invocation invocation) {
191192
}
192193

193194
private static @NonNull Runnable snedSoundPacket(Player target) {
194-
Runnable sendAction = () -> {
195+
return () -> {
195196
User user = PacketEvents.getAPI().getPlayerManager().getUser(target);
196197
WrapperPlayServerEntitySoundEffect packet = new WrapperPlayServerEntitySoundEffect(
197198
Sounds.ENTITY_ARROW_HIT_PLAYER,
@@ -202,7 +203,5 @@ public List<String> suggest(Invocation invocation) {
202203
);
203204
user.sendPacket(packet);
204205
};
205-
sendAction.run();
206-
return sendAction;
207206
}
208207
}

0 commit comments

Comments
 (0)