|
1 | | -//package com.coloryr.allmusic.client.others; |
2 | | -// |
3 | | -//import com.coloryr.allmusic.client.core.AllMusicCore; |
4 | | -//import de.maxhenkel.voicechat.api.ForgeVoicechatPlugin; |
5 | | -//import de.maxhenkel.voicechat.api.VoicechatPlugin; |
6 | | -//import de.maxhenkel.voicechat.api.events.ClientReceiveSoundEvent; |
7 | | -//import de.maxhenkel.voicechat.api.events.EventRegistration; |
8 | | -// |
9 | | -//@ForgeVoicechatPlugin |
10 | | -//public class VoiceChat implements VoicechatPlugin { |
11 | | -// @Override |
12 | | -// public String getPluginId() { |
13 | | -// return "allmusic"; |
14 | | -// } |
15 | | -// |
16 | | -// @Override |
17 | | -// public void registerEvents(EventRegistration registration) { |
18 | | -// registration.registerEvent(ClientReceiveSoundEvent.EntitySound.class, this::play); |
19 | | -// registration.registerEvent(ClientReceiveSoundEvent.LocationalSound.class, this::play); |
20 | | -// registration.registerEvent(ClientReceiveSoundEvent.StaticSound.class, this::play); |
21 | | -// } |
22 | | -// |
23 | | -// public void play(ClientReceiveSoundEvent.EntitySound event) { |
24 | | -// AllMusicCore.chat(); |
25 | | -// } |
26 | | -// |
27 | | -// public void play(ClientReceiveSoundEvent.LocationalSound event) { |
28 | | -// AllMusicCore.chat(); |
29 | | -// } |
30 | | -// |
31 | | -// public void play(ClientReceiveSoundEvent.StaticSound event) { |
32 | | -// AllMusicCore.chat(); |
33 | | -// } |
34 | | -//} |
| 1 | +package com.coloryr.allmusic.client.others; |
| 2 | + |
| 3 | +import com.coloryr.allmusic.client.core.AllMusicCore; |
| 4 | +import de.maxhenkel.voicechat.api.ForgeVoicechatPlugin; |
| 5 | +import de.maxhenkel.voicechat.api.VoicechatPlugin; |
| 6 | +import de.maxhenkel.voicechat.api.events.ClientReceiveSoundEvent; |
| 7 | +import de.maxhenkel.voicechat.api.events.EventRegistration; |
| 8 | + |
| 9 | +@ForgeVoicechatPlugin |
| 10 | +public class VoiceChat implements VoicechatPlugin { |
| 11 | + @Override |
| 12 | + public String getPluginId() { |
| 13 | + return "allmusic"; |
| 14 | + } |
| 15 | + |
| 16 | + @Override |
| 17 | + public void registerEvents(EventRegistration registration) { |
| 18 | + registration.registerEvent(ClientReceiveSoundEvent.EntitySound.class, this::play); |
| 19 | + registration.registerEvent(ClientReceiveSoundEvent.LocationalSound.class, this::play); |
| 20 | + registration.registerEvent(ClientReceiveSoundEvent.StaticSound.class, this::play); |
| 21 | + } |
| 22 | + |
| 23 | + public void play(ClientReceiveSoundEvent.EntitySound event) { |
| 24 | + AllMusicCore.chat(); |
| 25 | + } |
| 26 | + |
| 27 | + public void play(ClientReceiveSoundEvent.LocationalSound event) { |
| 28 | + AllMusicCore.chat(); |
| 29 | + } |
| 30 | + |
| 31 | + public void play(ClientReceiveSoundEvent.StaticSound event) { |
| 32 | + AllMusicCore.chat(); |
| 33 | + } |
| 34 | +} |
0 commit comments