This commit is contained in:
Luca 2021-11-23 14:54:56 +01:00
parent fb7c67b4ce
commit 6a88523d78
4 changed files with 11 additions and 7 deletions

View File

@ -15,6 +15,7 @@ import rip.tilly.bedwars.BedWars;
import rip.tilly.bedwars.game.arena.Arena;
import rip.tilly.bedwars.game.arena.CopiedArena;
import rip.tilly.bedwars.generators.Generator;
import rip.tilly.bedwars.generators.GeneratorTier;
import rip.tilly.bedwars.utils.CC;
import rip.tilly.bedwars.utils.TimeUtils;
@ -49,6 +50,9 @@ public class Game {
private List<Generator> activatedGenerators = new ArrayList<>();
private GeneratorTier diamondGeneratorTier = GeneratorTier.ONE;
private GeneratorTier emeraldGeneratorTier = GeneratorTier.ONE;
public Game(Arena arena, GameType gameType, GameTeam... teams) {
this.arena = arena;
this.gameType = gameType;

View File

@ -4,9 +4,6 @@ import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.RequiredArgsConstructor;
import lombok.Setter;
import org.bukkit.Bukkit;
import rip.tilly.bedwars.generators.GeneratorTier;
import rip.tilly.bedwars.utils.CC;
import rip.tilly.bedwars.utils.CustomLocation;
import java.util.ArrayList;
@ -45,9 +42,6 @@ public class Arena {
private List<CustomLocation> diamondGenerators = new ArrayList<>();
private List<CustomLocation> emeraldGenerators = new ArrayList<>();
private GeneratorTier diamondGeneratorTier = GeneratorTier.ONE;
private GeneratorTier emeraldGeneratorTier = GeneratorTier.ONE;
private boolean enabled;
public CopiedArena getAvailableArena() {

View File

@ -1,5 +1,7 @@
package rip.tilly.bedwars.generators;
import java.util.Arrays;
public enum GeneratorTier {
ONE,
@ -24,4 +26,8 @@ public enum GeneratorTier {
return "I";
}
public static GeneratorTier getByName(String name) {
return Arrays.stream(values()).filter(type -> type.name().equalsIgnoreCase(name)).findFirst().orElse(null);
}
}

View File

@ -24,7 +24,7 @@ public class PartyChatListener implements Listener {
if (party == null && !settings.isPartyChatEnabled()) {
return;
}
String chatMessage = event.getMessage();
if (party != null) {
if (settings.isPartyChatEnabled()) {