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:
parent
ba8fbe83e0
commit
e8c015790f
|
|
@ -1,7 +1,7 @@
|
||||||
package com.alttd.ctf.game_class.creation;
|
package com.alttd.ctf.game_class.creation;
|
||||||
|
|
||||||
import com.alttd.ctf.game_class.GameClass;
|
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 com.alttd.ctf.team.TeamColor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import net.kyori.adventure.text.minimessage.MiniMessage;
|
import net.kyori.adventure.text.minimessage.MiniMessage;
|
||||||
|
|
@ -21,8 +21,8 @@ public class TrapperCreator {
|
||||||
|
|
||||||
@Contract("_ -> new")
|
@Contract("_ -> new")
|
||||||
public static @NotNull GameClass createTrapper(@NotNull TeamColor teamColor) {
|
public static @NotNull GameClass createTrapper(@NotNull TeamColor teamColor) {
|
||||||
return new Tank(getArmor(), getTools(teamColor), getDisplayItem(teamColor),
|
return new Trapper(getArmor(), getTools(teamColor), getDisplayItem(teamColor),
|
||||||
20, 7, 4);
|
20, 5, 4);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Contract(value = " -> new", pure = true)
|
@Contract(value = " -> new", pure = true)
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ import org.jetbrains.annotations.NotNull;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public class Trapper extends GameClass {
|
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) {
|
double health, int throwTickSpeed, int damage) {
|
||||||
super(armor, tools, displayItem, health, throwTickSpeed, damage);
|
super(armor, tools, displayItem, health, throwTickSpeed, damage);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user