n ter deatheffect como default

This commit is contained in:
nearfe 2024-06-16 03:49:21 -03:00
parent 207b276279
commit b92f2c2871
2 changed files with 40 additions and 1 deletions

View File

@ -0,0 +1,37 @@
package land.battle.practice.effects.impl;
import land.battle.practice.effects.DeathEffect;
import net.minecraft.server.v1_8_R3.EntityLightning;
import net.minecraft.server.v1_8_R3.Packet;
import net.minecraft.server.v1_8_R3.PacketPlayOutSpawnEntityWeather;
import org.bukkit.Material;
import org.bukkit.craftbukkit.v1_8_R3.entity.CraftPlayer;
import org.bukkit.entity.Player;
/**
* @author BattleLand Team
* @since 5/23/2021
*/
public class NoneDeathEffect implements DeathEffect {
@Override
public String getName() {
return "None";
}
@Override
public String getPermission() {
return "";
}
@Override
public Material getIcon() {
return Material.REDSTONE;
}
@Override
public void applyEffect(Player player, Player killer) {
}
}

View File

@ -4,6 +4,7 @@ import land.battle.practice.effects.DeathEffect;
import land.battle.practice.effects.impl.BloodDeathEffect; import land.battle.practice.effects.impl.BloodDeathEffect;
import land.battle.practice.effects.impl.ExplosionDeathEffect; import land.battle.practice.effects.impl.ExplosionDeathEffect;
import land.battle.practice.effects.impl.LightningDeathEffect; import land.battle.practice.effects.impl.LightningDeathEffect;
import land.battle.practice.effects.impl.NoneDeathEffect;
import land.battle.practice.message.KillMessage; import land.battle.practice.message.KillMessage;
import land.battle.practice.message.impl.DefaultDeathMessage; import land.battle.practice.message.impl.DefaultDeathMessage;
import land.battle.practice.message.impl.GamerKillMessages; import land.battle.practice.message.impl.GamerKillMessages;
@ -26,9 +27,10 @@ public class FunManager {
private final List<KillMessage> messageList = new ArrayList<>(); private final List<KillMessage> messageList = new ArrayList<>();
private final KillMessage defKillMessage = new DefaultDeathMessage(); private final KillMessage defKillMessage = new DefaultDeathMessage();
private final DeathEffect defDeathEffect = new LightningDeathEffect(); private final DeathEffect defDeathEffect = new NoneDeathEffect();
public void setup() { public void setup() {
this.effectList.add(new NoneDeathEffect());
this.effectList.add(new LightningDeathEffect()); this.effectList.add(new LightningDeathEffect());
this.effectList.add(new ExplosionDeathEffect()); this.effectList.add(new ExplosionDeathEffect());
this.effectList.add(new BloodDeathEffect()); this.effectList.add(new BloodDeathEffect());