mirror of
https://github.com/libraryaddict/LibsDisguises.git
synced 2024-12-15 15:28:36 +01: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;
|
package me.libraryaddict.disguise.disguisetypes.watchers;
|
||||||
|
|
||||||
|
import org.bukkit.Material;
|
||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
|
|
||||||
import me.libraryaddict.disguise.disguisetypes.Disguise;
|
import me.libraryaddict.disguise.disguisetypes.Disguise;
|
||||||
@ -26,6 +27,9 @@ public class FallingBlockWatcher extends FlagWatcher {
|
|||||||
|
|
||||||
public void setBlock(ItemStack block) {
|
public void setBlock(ItemStack block) {
|
||||||
this.block = block;
|
this.block = block;
|
||||||
|
if (block.getType() == null || block.getType() == Material.AIR) {
|
||||||
|
block.setType(Material.STONE);
|
||||||
|
}
|
||||||
if (getDisguise().getEntity() != null && getDisguise().getWatcher() == this) {
|
if (getDisguise().getEntity() != null && getDisguise().getWatcher() == this) {
|
||||||
DisguiseUtilities.refreshTrackers(getDisguise());
|
DisguiseUtilities.refreshTrackers(getDisguise());
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user