mirror of
https://github.com/TotalFreedomMC/TF-LibsDisguises.git
synced 2024-11-11 01:17:16 +00:00
Fix axololtl disguises being pickable by players
This commit is contained in:
parent
e6a6ac749e
commit
a1226abb81
1 changed files with 8 additions and 0 deletions
|
@ -18,6 +18,7 @@ import me.libraryaddict.disguise.events.DisguiseInteractEvent;
|
||||||
import me.libraryaddict.disguise.utilities.DisguiseUtilities;
|
import me.libraryaddict.disguise.utilities.DisguiseUtilities;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
|
import org.bukkit.entity.Axolotl;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.inventory.EquipmentSlot;
|
import org.bukkit.inventory.EquipmentSlot;
|
||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
|
@ -104,6 +105,13 @@ public class PacketListenerClientInteract extends PacketAdapter {
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (disguise.getType()) {
|
switch (disguise.getType()) {
|
||||||
|
case AXOLOTL:
|
||||||
|
// They can't be picked up by a bucket sir if they are fake
|
||||||
|
if (!(disguise.getEntity() instanceof Axolotl)) {
|
||||||
|
DisguiseUtilities.refreshTrackers((TargetedDisguise) disguise);
|
||||||
|
observer.updateInventory(); // Remove their fake bucket
|
||||||
|
}
|
||||||
|
break;
|
||||||
case CAT:
|
case CAT:
|
||||||
case WOLF:
|
case WOLF:
|
||||||
case SHEEP:
|
case SHEEP:
|
||||||
|
|
Loading…
Reference in a new issue