Explorar o código

added hiss sound, fixed skyblockearth hook again

mastercake10 %!s(int64=6) %!d(string=hai) anos
pai
achega
7ec6e7b688

+ 1 - 1
pom.xml

@@ -4,7 +4,7 @@
 	<modelVersion>4.0.0</modelVersion>
 	<groupId>xyz.spaceio</groupId>
 	<artifactId>CustomOreGen</artifactId>
-	<version>1.3.4-SNAPSHOT</version>
+	<version>1.3.5-SNAPSHOT</version>
 	<repositories>
 		<!-- Spigot repository -->
 		<repository>

+ 2 - 0
src/xyz/spaceio/customoregen/Events.java

@@ -7,6 +7,7 @@ import org.bukkit.Bukkit;
 import org.bukkit.Location;
 import org.bukkit.Material;
 import org.bukkit.OfflinePlayer;
+import org.bukkit.Sound;
 import org.bukkit.block.Block;
 import org.bukkit.block.BlockFace;
 import org.bukkit.event.EventHandler;
@@ -72,6 +73,7 @@ public class Events implements Listener {
 					Bukkit.getScheduler().runTask(plugin, () -> {
 						b.setType(Material.getMaterial(winning.getName()));
 						b.getState().update(true);
+						b.getWorld().playSound(b.getLocation(), Sound.BLOCK_FIRE_EXTINGUISH, 1f, 10f);
 					});
 				}
 				//b.setData(winning.getDamage(), true);

+ 8 - 0
src/xyz/spaceio/hooks/HookSkyblockEarth.java

@@ -1,6 +1,7 @@
 package xyz.spaceio.hooks;
 
 import java.io.File;
+import java.lang.reflect.Field;
 import java.lang.reflect.InvocationTargetException;
 import java.util.Arrays;
 import java.util.UUID;
@@ -23,6 +24,13 @@ public class HookSkyblockEarth implements SkyblockAPIHook {
 	public HookSkyblockEarth() {
 		mainClass = (me.goodandevil.skyblock.Main) Bukkit.getPluginManager().getPlugin("SkyBlock");
 		api = mainClass.getIslandManager();
+		try {
+			Field f1 = mainClass.getClass().getDeclaredField("generatorManager");
+			f1.setAccessible(true);
+			f1.set(mainClass, null);
+		} catch (Exception e) {
+			e.printStackTrace();
+		}
 	}
 
 	@Override