Fix Trapper using Tank constructor.

Replaced the use of Tank with Trapper in the TrapperCreator class and adjusted associated parameters. Modified Trapper's constructor to be public, ensuring proper accessibility for instantiation.
This commit is contained in:
Teriuihi 2025-03-01 00:05:45 +01:00
parent ba8fbe83e0
commit e8c015790f
2 changed files with 4 additions and 4 deletions

View File

@ -1,7 +1,7 @@
package com.alttd.ctf.game_class.creation;
import com.alttd.ctf.game_class.GameClass;
import com.alttd.ctf.game_class.implementations.Tank;
import com.alttd.ctf.game_class.implementations.Trapper;
import com.alttd.ctf.team.TeamColor;
import lombok.extern.slf4j.Slf4j;
import net.kyori.adventure.text.minimessage.MiniMessage;
@ -21,8 +21,8 @@ public class TrapperCreator {
@Contract("_ -> new")
public static @NotNull GameClass createTrapper(@NotNull TeamColor teamColor) {
return new Tank(getArmor(), getTools(teamColor), getDisplayItem(teamColor),
20, 7, 4);
return new Trapper(getArmor(), getTools(teamColor), getDisplayItem(teamColor),
20, 5, 4);
}
@Contract(value = " -> new", pure = true)

View File

@ -8,7 +8,7 @@ import org.jetbrains.annotations.NotNull;
import java.util.List;
public class Trapper extends GameClass {
protected Trapper(@NotNull List<Material> armor, @NotNull List<ItemStack> tools, @NotNull ItemStack displayItem,
public Trapper(@NotNull List<Material> armor, @NotNull List<ItemStack> tools, @NotNull ItemStack displayItem,
double health, int throwTickSpeed, int damage) {
super(armor, tools, displayItem, health, throwTickSpeed, damage);
}