Revert lowercase
SteamWarCI Build successful
Details
SteamWarCI Build successful
Details
Fix SchematicType not used for checking available schematics Fix leader not present to enable public only schem selection
Dieser Commit ist enthalten in:
Ursprung
c0665b1868
Commit
3ee7411591
|
@ -21,7 +21,10 @@ package de.steamwar.fightsystem;
|
|||
|
||||
import de.steamwar.fightsystem.utils.Region;
|
||||
import de.steamwar.fightsystem.winconditions.Winconditions;
|
||||
import de.steamwar.sql.*;
|
||||
import de.steamwar.sql.Event;
|
||||
import de.steamwar.sql.EventFight;
|
||||
import de.steamwar.sql.SteamwarUser;
|
||||
import de.steamwar.sql.Team;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
|
@ -178,8 +181,8 @@ public class Config {
|
|||
int schemsizeY = config.getInt("Schematic.Size.y");
|
||||
int schemsizeZ = config.getInt("Schematic.Size.z");
|
||||
RanksEnabled = !config.getStringList("Ranks").isEmpty();
|
||||
SchematicType = de.steamwar.sql.SchematicType.fromDB(Objects.requireNonNull(config.getString("Schematic.Type", "normal").toLowerCase()));
|
||||
SubTypes = config.getStringList("Schematic.SubTypes").stream().map(String::toLowerCase).map(de.steamwar.sql.SchematicType::fromDB).collect(Collectors.toList());
|
||||
SchematicType = de.steamwar.sql.SchematicType.fromDB(Objects.requireNonNull(config.getString("Schematic.Type", "normal")));
|
||||
SubTypes = config.getStringList("Schematic.SubTypes").stream().map(de.steamwar.sql.SchematicType::fromDB).collect(Collectors.toList());
|
||||
IgnorePublicOnly = config.getBoolean("Schematic.IgnorePublicOnly", false);
|
||||
boolean rotate = config.getBoolean("Schematic.Rotate", true);
|
||||
PasteAligned = config.getBoolean("Schematic.PasteAligned", false);
|
||||
|
|
|
@ -190,18 +190,18 @@ public class GUI {
|
|||
}
|
||||
|
||||
if (type.checkType() != null && type.checkType() != type && !SchematicNode.getAllAccessibleSchematicsOfType(SteamwarUser.get(p.getUniqueId()).getId(), type.checkType().toDB()).isEmpty()) {
|
||||
inv.setItem(row * 9 + 4, Material.ANVIL, msg.parse("SCHEM_UNCHECKED", p, Config.GameName), (ClickType click) -> {
|
||||
inv.setItem(row * 9 + 4, Material.ANVIL, msg.parse("SCHEM_UNCHECKED", p, type.name()), (ClickType click) -> {
|
||||
p.closeInventory();
|
||||
schemDialog(p, type, false, true);
|
||||
});
|
||||
}
|
||||
|
||||
if (SchematicNode.getAllAccessibleSchematicsOfType(SteamwarUser.get(p.getUniqueId()).getId(), Config.SchematicType.toDB()).isEmpty() && !Config.test()) {
|
||||
inv.setItem(row * 9, SWItem.getDye(8), (byte)8, msg.parse("SCHEM_NO_PRIVATE", p, Config.GameName), (ClickType click)->{});
|
||||
if (SchematicNode.getAllAccessibleSchematicsOfType(SteamwarUser.get(p.getUniqueId()).getId(), type.toDB()).isEmpty() && !Config.test()) {
|
||||
inv.setItem(row * 9, SWItem.getDye(8), (byte)8, msg.parse("SCHEM_NO_PRIVATE", p, type.name()), (ClickType click)->{});
|
||||
return;
|
||||
}
|
||||
|
||||
inv.setItem(row * 9, SWItem.getMaterial("CAULDRON_ITEM"), msg.parse("SCHEM_PRIVATE", p, Config.GameName), (ClickType click) -> {
|
||||
inv.setItem(row * 9, SWItem.getMaterial("CAULDRON_ITEM"), msg.parse("SCHEM_PRIVATE", p, type.name()), (ClickType click) -> {
|
||||
p.closeInventory();
|
||||
schemDialog(p, type, false, false);
|
||||
});
|
||||
|
|
|
@ -146,6 +146,9 @@ public class Fight {
|
|||
if (Config.IgnorePublicOnly || ArenaMode.RankedEvent.contains(Config.mode)) {
|
||||
return false;
|
||||
}
|
||||
if (redTeam.getLeader() == null || blueTeam.getLeader() == null) {
|
||||
return false;
|
||||
}
|
||||
return redTeam.isPublicsOnly() || blueTeam.isPublicsOnly();
|
||||
}
|
||||
}
|
||||
|
|
Laden…
In neuem Issue referenzieren