Search in sources :

Example 16 with FakeEntity

use of net.dzikoysk.funnyguilds.nms.api.entity.FakeEntity in project FunnyGuilds by FunnyGuilds.

the class GuildEntityHelper method despawnGuildHeart.

public static void despawnGuildHeart(Guild guild, Player... players) {
    try {
        FakeEntity guildHeartEntity = ENTITY_MAP.get(guild);
        if (guildHeartEntity == null) {
            return;
        }
        FunnyGuilds.getInstance().getNmsAccessor().getEntityAccessor().despawnFakeEntityFor(guildHeartEntity, players);
    } catch (Exception exception) {
        FunnyGuilds.getPluginLogger().error("Could not despawn guild heart", exception);
    }
}
Also used : FakeEntity(net.dzikoysk.funnyguilds.nms.api.entity.FakeEntity)

Aggregations

FakeEntity (net.dzikoysk.funnyguilds.nms.api.entity.FakeEntity)16 Player (org.bukkit.entity.Player)3 Map (java.util.Map)2 FunnyGuilds (net.dzikoysk.funnyguilds.FunnyGuilds)2 Guild (net.dzikoysk.funnyguilds.guild.Guild)2 PacketPlayOutSpawnEntity (net.minecraft.network.protocol.game.PacketPlayOutSpawnEntity)2 PacketPlayOutSpawnEntityLiving (net.minecraft.network.protocol.game.PacketPlayOutSpawnEntityLiving)2 EntityLiving (net.minecraft.world.entity.EntityLiving)2 TimeUnit (java.util.concurrent.TimeUnit)1 ValidationException (net.dzikoysk.funnycommands.resources.ValidationException)1 DefaultConcurrencyRequest (net.dzikoysk.funnyguilds.concurrency.util.DefaultConcurrencyRequest)1 MessageConfiguration (net.dzikoysk.funnyguilds.config.MessageConfiguration)1 PluginConfiguration (net.dzikoysk.funnyguilds.config.PluginConfiguration)1 GuildHeartAttackEvent (net.dzikoysk.funnyguilds.event.guild.GuildHeartAttackEvent)1 InfoCommand (net.dzikoysk.funnyguilds.feature.command.user.InfoCommand)1 SecuritySystem (net.dzikoysk.funnyguilds.feature.security.SecuritySystem)1 GuildEntityHelper (net.dzikoysk.funnyguilds.nms.GuildEntityHelper)1 ChatUtils (net.dzikoysk.funnyguilds.shared.bukkit.ChatUtils)1 User (net.dzikoysk.funnyguilds.user.User)1 Entity (net.minecraft.server.v1_10_R1.Entity)1