Ir para conteúdo

Cancelar Drop de Monstro se morrer por dano de queda.


Comonier

Posts Recomendados

LEMBRETE: Só queria lembrar para os coleguinhas que eu não entendo bulhufas de programação então, quando vem um cara e fala: "- É ridículo só fazer isso ou aquilo", porque para eles é ridiculamente fácil não significa que eu vou entender o que é para ser feito, eu quero um código skript ou plugin pronto, se não, eu não estaria aqui humildemente pedindo. Outro dia eu fui pedir algo em privado para um amigo entre vocês e ele me respondia assim: é só fazer a base, é fácil cara, acho que não entendeu que eu não entendo nada, zero, preciso do script todo do inicio ao fim. Depois de um tempo ele vem me perguntar "E aê conseguiu?" - Não dei nem resposta. Quer ajudar? ótimo Não tem paciência? Não perca seu tempo dando respostas do gênero.
Antes que alguém comente que eu já estou chegando aqui sem ser humilde ou na agressividade, eu não estou, apenas estou pedindo humildemente para aqueles seres humanos que gostam de responder um tópico de ajuda de alguém que está pedindo ajuda humildemente porque não sabe programar, não se deem ao trabalho de postar qualquer coisa que não seja a intenção de ajudar. Tem muitos que fazem isso. Aceito sugestões de plugins que já existam, se forem exatamente sobre o pedido, e não tenham um monte de outras coisas extras.


PEDIDO: Gostaria de saber se é possível fazer um plugin para evitar que os monstros DROPEM LOOT, se morrerem por dano de queda.
A razão é que no meu servidor os jogadores estão abusando da quantidade de spawners em suas farms,
então nascem 20 aranhas que caem e soltam o loot que está flutuando até que o carrinho passe para coletar,
carrinho está cheio então leva tempo para coletar tudo porque tem mais loot do que se encaixa dentro dele.
Tudo isso faz o TPS do servidor cair drasticamente. Não tenho money para pagar uma VPS cara, então tenho que adaptar o servidor aos abusers.
Andei dando uma pesquisada e obtive algumas informações para ajudar.

EntityDamageEvent e verificar se o EntityDamageEvent # getCause é DamageCause.FALL e cancelar o evento do drop de loot se for esse o caso

Liberar o drop se as condições do EntityDamageEvent forem:
-  Jogador o atingir (com qualquer item na mão ou mão vazia ou atirando com arco ou besta ou poção)
- Dano de magma_block  (
HOT_FLOOR)
- Dano de cactus (CONTACT)
- Dano de wither_rose (CONTACT)
- Dano de fogo (FIRE) | (FIRE_TICK)

Acho que as outras podem ser ignoradas mas se quiserem fazer algo bonitinho ta ae eu pesquisei na net. Para ajudar.

EntityDamageEvent.DamageCause CONTACT | Damage caused when an entity contacts a block such as a Cactus.
EntityDamageEvent.DamageCause ENTITY_ATTACK | Damage caused when an entity attacks another entity.
EntityDamageEvent.DamageCause ENTITY_SWEEP_ATTACK | Damage caused when an entity attacks another entity in a sweep attack.
EntityDamageEvent.DamageCause PROJECTILE | Damage caused when attacked by a projectile.
EntityDamageEvent.DamageCause SUFFOCATION | Damage caused by being put in a block
EntityDamageEvent.DamageCause FALL | Damage caused when an entity falls a distance greater than 3 blocks
EntityDamageEvent.DamageCause FIRE | Damage caused by direct exposure to fire
EntityDamageEvent.DamageCause FIRE_TICK | Damage caused due to burns caused by fire
EntityDamageEvent.DamageCause MELTING | Damage caused due to a snowman melting
EntityDamageEvent.DamageCause LAVA | Damage caused by direct exposure to lava
EntityDamageEvent.DamageCause DROWNING | Damage caused by running out of air while in water
EntityDamageEvent.DamageCause BLOCK_EXPLOSION | Damage caused by being in the area when a block explodes.
EntityDamageEvent.DamageCause ENTITY_EXPLOSION | Damage caused by being in the area when an entity, such as a Creeper, explodes.
EntityDamageEvent.DamageCause VOID | Damage caused by falling into the void
EntityDamageEvent.DamageCause LIGHTNING | Damage caused by being struck by lightning
EntityDamageEvent.DamageCause SUICIDE | Damage caused by committing suicide using the command "/kill"
EntityDamageEvent.DamageCause STARVATION | Damage caused by starving due to having an empty hunger bar
EntityDamageEvent.DamageCause POISON | Damage caused due to an ongoing poison effect
EntityDamageEvent.DamageCause MAGIC | Damage caused by being hit by a damage potion or spell
EntityDamageEvent.DamageCause WITHER | Damage caused by Wither potion effect
EntityDamageEvent.DamageCause FALLING_BLOCK | Damage caused by being hit by a falling block which deals damage
EntityDamageEvent.DamageCause THORNS | Damage caused in retaliation to another attack by the Thorns enchantment.
EntityDamageEvent.DamageCause DRAGON_BREATH | Damage caused by a dragon breathing fire.
EntityDamageEvent.DamageCause CUSTOM | Custom damage. Damage: variable
EntityDamageEvent.DamageCause FLY_INTO_WALL | Damage caused when an entity runs into a wall.
EntityDamageEvent.DamageCause HOT_FLOOR | Damage caused when an entity steps on Material.MAGMA_BLOCK. | Damage: 1
EntityDamageEvent.DamageCause CRAMMING| Damage caused when an entity is colliding with too many entities due to the maxEntityCramming game rule.
EntityDamageEvent.DamageCause DRYOUT | Damage caused when an entity that should be in water is not.

 

 

 

 

Editado por Comonier
Link para o comentário
Compartilhar em outros sites

Consegui com 1 carinha la do fórum da spigot, nem sabia que tinha fórum de plugin e skripts lá que legal, obrigado, se quiser pode fechar.
pode fechar se quiser, ta funcionando certinho aqui exatamente o que eu queria \o/ como marca como resolvido ?

Link para o comentário
Compartilhar em outros sites

Visitante
Este tópico está impedido de receber novos posts.
×
×
  • Criar Novo...