mirror of
https://github.com/StarWishsama/Slimefun4.git
synced 2024-09-19 19:25:48 +00:00
Fixes #2655
This commit is contained in:
parent
aa98bd0ba2
commit
f2dd3a0125
@ -40,6 +40,7 @@
|
||||
* Fixed #2636 (hotfix)
|
||||
* Fixed #2647
|
||||
* Fixed #2664
|
||||
* Fixed #2655
|
||||
|
||||
## Release Candidate 18 (03 Dec 2020)
|
||||
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user