org.bukkit.entity.ZombieVillager Java Examples
The following examples show how to use
org.bukkit.entity.ZombieVillager.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: MagicalZombiePills.java From Slimefun4 with GNU General Public License v3.0 | 6 votes |
@Override public EntityInteractHandler getItemHandler() { return (p, entity, item, offhand) -> { if (entity.getType() == EntityType.ZOMBIE_VILLAGER) { ItemUtils.consumeItem(item, false); p.playSound(p.getLocation(), Sound.ENTITY_ZOMBIE_VILLAGER_CONVERTED, 1, 1); ZombieVillager zombieVillager = (ZombieVillager) entity; zombieVillager.setConversionTime(1); if (SlimefunPlugin.getMinecraftVersion().isAtLeast(MinecraftVersion.MINECRAFT_1_15)) { zombieVillager.setConversionPlayer(p); } } }; }
Example #2
Source File: ZombieVillagerData.java From Skript with GNU General Public License v3.0 | 5 votes |
@SuppressWarnings("null") @Override protected boolean init(final @Nullable Class<? extends ZombieVillager> c, final @Nullable ZombieVillager e) { if (e == null) return true; profession = e.getVillagerProfession(); return true; }
Example #3
Source File: ZombieVillagerData.java From Skript with GNU General Public License v3.0 | 4 votes |
@SuppressWarnings("null") @Override public void set(final ZombieVillager e) { profession = e.getVillagerProfession(); }
Example #4
Source File: ZombieVillagerData.java From Skript with GNU General Public License v3.0 | 4 votes |
@Override protected boolean match(final ZombieVillager e) { return e.getVillagerProfession() == profession; }
Example #5
Source File: ZombieVillagerData.java From Skript with GNU General Public License v3.0 | 4 votes |
@Override public Class<? extends ZombieVillager> getType() { return ZombieVillager.class; }