Advertisement
jayhillx

onPlayerDeath 01

Jun 11th, 2021
266
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.91 KB | None | 0 0
  1. if (event.getSource().equals(ModDamageSource.causeBoundPlayer(player))) {
  2. BoundPlayersList.removeUsername(bound.getUUID());
  3. serverPlayerEntity.removePotionEffect(LifeBindingPotion.LIFE_DAMAGING_EFFECT.get());
  4. } else {
  5. if (player.getServer().getPlayerList().getPlayerByUUID(bound.getUUID()) == null) {
  6. BoundPlayersList.setUsername(bound.getUUID(), bound.getName());
  7. }
  8.  
  9. /** Adds potion effect to bound player. */
  10. serverPlayerEntity.addPotionEffect(new EffectInstance(LifeBindingPotion.LIFE_DAMAGING_EFFECT.get(), 150));
  11. /** Removes potion from player who had died/triggered the event. */
  12. player.removePotionEffect(LifeBindingPotion.LIFE_DAMAGING_EFFECT.get());
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement