File tree Expand file tree Collapse file tree
src/main/java/com/liuyue/beep_Velocity Expand file tree Collapse file tree Original file line number Diff line number Diff 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}
You can’t perform that action at this time.
0 commit comments