Kaynağa Gözat

fix sound enum error on 1.8

MasterCake 2 yıl önce
ebeveyn
işleme
96c125633f

+ 5 - 0
src/main/java/xyz/spaceio/customoregen/Events.java

@@ -59,6 +59,11 @@ public class Events implements Listener {
 		} catch( ClassNotFoundException e ) {
 			useLevelledClass = false;
 		}
+		
+		if(enableSoundEffect) {
+			// disabling sound effects when enum value not present
+			enableSoundEffect = Arrays.asList(Sound.values()).stream().map(Sound::name).anyMatch(s -> s.equals("BLOCK_FIRE_EXTINGUISH"));
+		}
 	}
 
 	@SuppressWarnings("deprecation")