1
mirror of https://github.com/StarWishsama/Slimefun4.git synced 2024-09-19 19:25:48 +00:00
This commit is contained in:
TheBusyBiscuit 2020-12-31 17:38:51 +01:00
parent aa98bd0ba2
commit f2dd3a0125
2 changed files with 10 additions and 3 deletions

View File

@ -40,6 +40,7 @@
* Fixed #2636 (hotfix)
* Fixed #2647
* Fixed #2664
* Fixed #2655
## Release Candidate 18 (03 Dec 2020)

View File

@ -6,6 +6,7 @@ import javax.annotation.Nonnull;
import javax.annotation.ParametersAreNonnullByDefault;
import org.bukkit.Material;
import org.bukkit.Sound;
import org.bukkit.block.Block;
import org.bukkit.block.BlockFace;
import org.bukkit.block.Skull;
@ -86,9 +87,14 @@ public class DebugFishListener implements Listener {
@ParametersAreNonnullByDefault
private void onRightClick(Player p, Block b, BlockFace face) {
if (p.isSneaking()) {
Block block = b.getRelative(face);
block.setType(Material.PLAYER_HEAD);
SkullBlock.setFromHash(block, HeadTexture.MISSING_TEXTURE.getTexture());
// Fixes #2655 - Delaying the placement to prevent a new event from being fired
SlimefunPlugin.runSync(() -> {
Block block = b.getRelative(face);
block.setType(Material.PLAYER_HEAD);
SkullBlock.setFromHash(block, HeadTexture.MISSING_TEXTURE.getTexture());
p.playSound(block.getLocation(), Sound.BLOCK_BAMBOO_PLACE, 1, 1);
}, 2L);
} else if (BlockStorage.hasBlockInfo(b)) {
try {
sendInfo(p, b);