forked from SteamWar/SteamWar
Merge branch 'main' into Schematics/1.21
# Conflicts: # VelocityCore/build.gradle.kts
This commit is contained in:
@@ -82,7 +82,8 @@ UTIL_LOAD_ERROR=§cThe schematic could not be loaded
|
||||
UTIL_DOWNLOAD_PUNISHED=§cYou are not allowed to download schematics: §f§l{0}
|
||||
UTIL_DOWNLOAD_NOT_OWN=§cYou may download only your own schematics
|
||||
UTIL_DOWNLOAD_LINK=Your download link:
|
||||
UTIL_TYPE_PUNISHED=§cYou are not allowed to submit schematics: §f§l{0}
|
||||
UTIL_TYPE_PUNISHED=§cYou are not allowed to submit schematics until §e{1}§7: §f§l{0}
|
||||
UTIL_TYPE_PUNISHED_PERMA=§cYou are permanently prohibited from submitting schematics: §f§l{0}
|
||||
UTIL_TYPE_NOT_OWN=§cYou can only submit your own schematics
|
||||
UTIL_TYPE_DIR=§cYou cannot submit folders
|
||||
UTIL_TYPE_NOT_ASSIGNABLE=§cSchematics cannot be changed for this type
|
||||
@@ -90,6 +91,7 @@ UTIL_TYPE_ALREADY=§cThe Schematic already has this type
|
||||
UTIL_TYPE_DONE=§aChange schematic type
|
||||
UTIL_TYPE_FIGHT_ALREADY=§cYou have already submitted this schematic
|
||||
UTIL_TYPE_AFTER_DEADLINE=§cSchematics of this type can no longer be submitted. Deadline was: {0}
|
||||
UTIL_TYPE_TOO_MANY=§cYou have sent in too many Schematics
|
||||
UTIL_TYPE_ERROR=§cThe Schematic is not compliant with the rules
|
||||
UTIL_TYPE_EXTEND=§aThe preparation server is starting
|
||||
UTIL_SUBMIT_TITLE=Extend Schematic
|
||||
|
||||
@@ -69,7 +69,8 @@ UTIL_LOAD_ERROR=§cDie Schematic konnte nicht geladen werden
|
||||
UTIL_DOWNLOAD_PUNISHED=§cDu darf keine Schematics Downloaden: §f§l{0}
|
||||
UTIL_DOWNLOAD_NOT_OWN=§cDu darfst nur deine eigenen Schematics herunterladen
|
||||
UTIL_DOWNLOAD_LINK=Dein Download Link:
|
||||
UTIL_TYPE_PUNISHED=§cDu darf keine Schematics einsenden: §f§l{0}
|
||||
UTIL_TYPE_PUNISHED=§cDu darfst bis zum §e{1} §7keine Schematics einsenden: §f§l{0}
|
||||
UTIL_TYPE_PUNISHED_PERMA=§cDu darfst keine Schematics mehr einsenden: §f§l{0}
|
||||
UTIL_TYPE_NOT_OWN=§cDu kannst nur deine eigenen Schematics einsenden
|
||||
UTIL_TYPE_DIR=§cDu kannst keine Ordner einsenden
|
||||
UTIL_TYPE_NOT_ASSIGNABLE=§cZu diesem Typen können keine Schematics geändert werden
|
||||
@@ -77,6 +78,7 @@ UTIL_TYPE_ALREADY=§cDie Schematic hat schon diesen Typen
|
||||
UTIL_TYPE_DONE=§aSchematictyp geändert
|
||||
UTIL_TYPE_FIGHT_ALREADY=§cDu hast diese Schematic bereits eingesendet
|
||||
UTIL_TYPE_AFTER_DEADLINE=§cVon diesem Typen können keine Schematics mehr eingesendet werden. Einsendeschluss war: {0}
|
||||
UTIL_TYPE_TOO_MANY=§cDu hast zu viele Schematics eingesendet
|
||||
UTIL_TYPE_ERROR=§cDie Schematic ist nicht regelkonform
|
||||
UTIL_TYPE_EXTEND=§aDer Vorbereitungsserver wird gestartet
|
||||
UTIL_SUBMIT_TITLE=Schematic ausfahren
|
||||
|
||||
+15
-5
@@ -401,11 +401,6 @@ public class SchematicCommandUtils {
|
||||
|
||||
public static void changeType(Player player, SchematicNode node, SchematicType type, SchematicCommand.Extend extend) {
|
||||
SteamwarUser user = getUser(player);
|
||||
if (Punishment.isPunished(user,
|
||||
Punishment.PunishmentType.NoSchemSubmitting,
|
||||
punishment -> SchematicSystem.MESSAGE.send("UTIL_TYPE_PUNISHED", player, punishment.getReason()))) {
|
||||
return;
|
||||
}
|
||||
if (node.getOwner() != user.getId()) {
|
||||
SchematicSystem.MESSAGE.send("UTIL_TYPE_NOT_OWN", player);
|
||||
return;
|
||||
@@ -430,11 +425,26 @@ public class SchematicCommandUtils {
|
||||
node.setSchemtype(type);
|
||||
SchematicSystem.MESSAGE.send("UTIL_TYPE_DONE", player);
|
||||
} else if (type.fightType()) {
|
||||
if (Punishment.isPunished(user,
|
||||
Punishment.PunishmentType.NoSchemSubmitting,
|
||||
punishment -> SchematicSystem.MESSAGE.send(punishment.isPerma() ? "UTIL_TYPE_PUNISHED_PERMA" : "UTIL_TYPE_PUNISHED", player, punishment.getReason(), punishment.getEndTime()))) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (node.getSchemtype().check()) {
|
||||
SchematicSystem.MESSAGE.send("UTIL_TYPE_FIGHT_ALREADY", player);
|
||||
return;
|
||||
}
|
||||
|
||||
if (SchematicType.values().stream().filter(SchematicType::check)
|
||||
.map(schematicType -> SchematicNode.getAllSchematicsOfType(user.getId(), schematicType.toDB()))
|
||||
.map(List::size)
|
||||
.reduce(Integer::sum)
|
||||
.orElse(0) >= 3) {
|
||||
SchematicSystem.MESSAGE.send("UTIL_TYPE_TOO_MANY", player);
|
||||
return;
|
||||
}
|
||||
|
||||
CheckSchemType checkSchemType = CheckSchemType.get(type);
|
||||
if (checkSchemType.isAfterDeadline()) {
|
||||
SchematicSystem.MESSAGE.send("UTIL_TYPE_AFTER_DEADLINE", player, checkSchemType.getDeadline());
|
||||
|
||||
Reference in New Issue
Block a user