mirror of
https://github.com/libraryaddict/LibsDisguises.git
synced 2024-09-12 01:48:07 +02:00
Don't let people disguise as air blocks
This commit is contained in:
parent
ae874392ab
commit
1ba39f8920
@ -1,5 +1,6 @@
|
||||
package me.libraryaddict.disguise.disguisetypes.watchers;
|
||||
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
import me.libraryaddict.disguise.disguisetypes.Disguise;
|
||||
@ -26,6 +27,9 @@ public class FallingBlockWatcher extends FlagWatcher {
|
||||
|
||||
public void setBlock(ItemStack block) {
|
||||
this.block = block;
|
||||
if (block.getType() == null || block.getType() == Material.AIR) {
|
||||
block.setType(Material.STONE);
|
||||
}
|
||||
if (getDisguise().getEntity() != null && getDisguise().getWatcher() == this) {
|
||||
DisguiseUtilities.refreshTrackers(getDisguise());
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user