File tree Expand file tree Collapse file tree 2 files changed +7
-13
lines changed
protocolize-world/src/main/java/de/exceptionflug/protocolize/world Expand file tree Collapse file tree 2 files changed +7
-13
lines changed Original file line number Diff line number Diff line change @@ -677,20 +677,13 @@ public enum Sound {
677677 public static Sound getSound (final String sound , final int protocolVersion ) {
678678 for (final Sound s : values ()) {
679679 final String soundName = s .getSoundName (protocolVersion );
680- if (soundName == null )
681- continue ;
682- if (soundName .equals (sound )) {
683- for (final SoundMapping mapping : s .mappings ) {
684- if (mapping .getProtocolVersionRangeStart () <= protocolVersion && mapping .getProtocolVersionRangeEnd () >= protocolVersion ) {
685- return s ;
686- }
687- }
688- }
680+ if (soundName != null && soundName .equals (sound ))
681+ return s ;
689682 }
690683 return null ;
691684 }
692685
693- public String getSoundName (final int protocolVersion ) {
686+ public String getSoundName (final int protocolVersion ) {
694687 for (final SoundMapping mapping : mappings ) {
695688 if (mapping .getProtocolVersionRangeStart () <= protocolVersion && mapping .getProtocolVersionRangeEnd () >= protocolVersion ) {
696689 return mapping .getSoundName ();
Original file line number Diff line number Diff line change @@ -49,14 +49,15 @@ public Sound getSoundObject() {
4949 return soundObject ;
5050 }
5151
52- public void setSound (final Sound sound ) {
53- soundObject = sound ;
54- }
5552
5653 public void setSound (final String sound ) {
5754 this .sound = sound ;
5855 }
5956
57+ public void setSound (final Sound soundObject ) {
58+ this .soundObject = soundObject ;
59+ }
60+
6061 public SoundCategory getCategory () {
6162 return category ;
6263 }
You can’t perform that action at this time.
0 commit comments