mirror of
https://github.com/StarWishsama/Slimefun4.git
synced 2024-09-20 03:35:51 +00:00
Fixes #2655
This commit is contained in:
parent
aa98bd0ba2
commit
f2dd3a0125
@ -40,6 +40,7 @@
|
|||||||
* Fixed #2636 (hotfix)
|
* Fixed #2636 (hotfix)
|
||||||
* Fixed #2647
|
* Fixed #2647
|
||||||
* Fixed #2664
|
* Fixed #2664
|
||||||
|
* Fixed #2655
|
||||||
|
|
||||||
## Release Candidate 18 (03 Dec 2020)
|
## Release Candidate 18 (03 Dec 2020)
|
||||||
|
|
||||||
|
@ -6,6 +6,7 @@ import javax.annotation.Nonnull;
|
|||||||
import javax.annotation.ParametersAreNonnullByDefault;
|
import javax.annotation.ParametersAreNonnullByDefault;
|
||||||
|
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
|
import org.bukkit.Sound;
|
||||||
import org.bukkit.block.Block;
|
import org.bukkit.block.Block;
|
||||||
import org.bukkit.block.BlockFace;
|
import org.bukkit.block.BlockFace;
|
||||||
import org.bukkit.block.Skull;
|
import org.bukkit.block.Skull;
|
||||||
@ -86,9 +87,14 @@ public class DebugFishListener implements Listener {
|
|||||||
@ParametersAreNonnullByDefault
|
@ParametersAreNonnullByDefault
|
||||||
private void onRightClick(Player p, Block b, BlockFace face) {
|
private void onRightClick(Player p, Block b, BlockFace face) {
|
||||||
if (p.isSneaking()) {
|
if (p.isSneaking()) {
|
||||||
Block block = b.getRelative(face);
|
// Fixes #2655 - Delaying the placement to prevent a new event from being fired
|
||||||
block.setType(Material.PLAYER_HEAD);
|
SlimefunPlugin.runSync(() -> {
|
||||||
SkullBlock.setFromHash(block, HeadTexture.MISSING_TEXTURE.getTexture());
|
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)) {
|
} else if (BlockStorage.hasBlockInfo(b)) {
|
||||||
try {
|
try {
|
||||||
sendInfo(p, b);
|
sendInfo(p, b);
|
||||||
|
Loading…
Reference in New Issue
Block a user