This repository has been archived by the owner on Dec 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Переосмыслен подход к работе менеджера
- Loading branch information
Showing
14 changed files
with
285 additions
and
151 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
#Sample of config | ||
|
||
#freez - добавлять ли на проверку/скачивание если object присутствует. | ||
|
||
# Секция ядра | ||
[core] | ||
# Выбери один из вариантов: vanila, spigot, bucket, paper, purpur | ||
provider = "paper" | ||
# Версия сервера (например, "1.14.4" или специальный код) | ||
version = "1.14.4" | ||
# Замораживать ли объекты при наличии в системе | ||
freeze = false | ||
force_update = false | ||
|
||
# Update - не требуется при загрузке, он нужен только когда freez = true, чтобы обновить на туже версию, либо принудительно обновить на самую последнюю, даже когда обновления нет. | ||
# Секция плагинов | ||
[plugins] | ||
# Пример 1 - строчка | ||
vc1 = {version = "ail5iPUK", chanel = "stable", freez = true, update = false} | ||
|
||
# Пример 2 - строчка | ||
cooler1 = {source = "Spigot", version = "ail5iPUK", chanel = "Beta", freez = false, update = false} | ||
|
||
# Пример 3 - строчка | ||
best_plugin_without_any_param1 = {} | ||
|
||
# Пример 1 - секция | ||
[plugins.simple_voice_chat2] | ||
version = "ail5iPUK" | ||
chanel = "Stable" | ||
freez = false | ||
update = false | ||
|
||
# Пример 2 - секция | ||
[plugins.cooler2] | ||
source = "Spigot" | ||
version = "ail5iPUK" | ||
chanel = "Beta" | ||
freez = false | ||
update = true | ||
|
||
# Пример 3 - секция | ||
[plugins.best_plugin_without_any_param2] | ||
#Дефолт: | ||
#source = Modrith | ||
#version = "Latest" | ||
#chanel = "Stable" | ||
#freez = false | ||
#update = false | ||
|
||
# Секция дополнений | ||
[additions] | ||
configPluguinsFrom = "[email protected]:TOwInOK/test.git" | ||
key = "SUPEREKLy" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,54 @@ | ||
#Example of config file | ||
|
||
[version] | ||
#which version you want? [Vanil;a, Buckit, Spigot, Paper, Purpur] | ||
core = "Vanilla" | ||
#First: any version if they have. | ||
#Second: lock version. (stop update) | ||
version = ["1.8.9", false] | ||
#Example: version = ["1.20.1", false] | ||
#We are loading version 1.20.1 with the tag FFFw2f | ||
#Because the flag is "false", we no longer update this version to newer versions of same verion. | ||
#Sample of config | ||
|
||
#freez - добавлять ли на проверку/скачивание если object присутствует. | ||
|
||
# Секция ядра | ||
[core] | ||
# Выбери один из вариантов: vanila, spigot, bucket, paper, purpur | ||
provider = "Paper" | ||
# Версия сервера (например, "1.14.4" или специальный код) | ||
version = "1.14.4" | ||
# Замораживать ли объекты при наличии в системе | ||
freeze = false | ||
force_update = false | ||
|
||
# Update - не требуется при загрузке, он нужен только когда freez = true, чтобы обновить на туже версию, либо принудительно обновить на самую последнюю, даже когда обновления нет. | ||
# Секция плагинов | ||
[plugins] | ||
#load plugins from Modrinth | ||
modrinth = [ | ||
"Chunky", | ||
"Simple Voice Chat", | ||
] | ||
#load plugins from SpigotMC | ||
spigot = [] | ||
#load plugins from PaperMC | ||
paper = [] | ||
|
||
#list for lock of update | plugins | ||
frozen = [] | ||
# Пример 1 - строчка | ||
vc1 = {version = "ail5iPUK", chanel = "stable", freez = true, update = false} | ||
|
||
# Пример 2 - строчка | ||
cooler1 = {source = "Spigot", version = "ail5iPUK", chanel = "Beta", freez = false, update = false} | ||
|
||
# Пример 3 - строчка | ||
best_plugin_without_any_param1 = {} | ||
|
||
# Пример 1 - секция | ||
[plugins.simple_voice_chat2] | ||
version = "ail5iPUK" | ||
chanel = "Stable" | ||
freez = false | ||
update = false | ||
|
||
# Пример 2 - секция | ||
[plugins.cooler2] | ||
source = "Spigot" | ||
version = "ail5iPUK" | ||
chanel = "Beta" | ||
freez = false | ||
update = true | ||
|
||
# Пример 3 - секция | ||
[plugins.best_plugin_without_any_param2] | ||
#Дефолт: | ||
#source = Modrith | ||
#version = "Latest" | ||
#chanel = "Stable" | ||
#freez = false | ||
#update = false | ||
|
||
# Секция дополнений | ||
[additions] | ||
configPluguinsFrom = "[email protected]:TOwInOK/test.git" | ||
key = "SUPEREKLy" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
use serde::{Deserialize, Serialize}; | ||
#[derive(Deserialize, Serialize, Debug)] | ||
pub struct Additions { | ||
// git link | ||
#[serde(rename = "configPluguinsFrom")] | ||
config_plugins_from: String, | ||
// git key | ||
key: String, | ||
} | ||
|
||
impl Default for Additions { | ||
fn default() -> Self { | ||
Self { config_plugins_from: Default::default(), key: Default::default() } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
use crate::config::Versions; | ||
use serde::{Deserialize, Serialize}; | ||
#[derive(Deserialize, Serialize, Debug)] | ||
pub struct Core { | ||
// Ядро | ||
#[serde(default)] | ||
provider: Provider, | ||
// Версия ядра | ||
#[serde(default)] | ||
version: Versions, | ||
// Приостановить обновление | ||
#[serde(default)] | ||
freeze: bool, | ||
// Нужно обновить | ||
#[serde(default)] | ||
force_update: bool, | ||
} | ||
|
||
impl Default for Core { | ||
fn default() -> Self { | ||
Self { provider: Default::default(), version: Default::default(), freeze: Default::default(), force_update: Default::default() } | ||
} | ||
} | ||
|
||
#[derive(Deserialize, Serialize, Debug)] | ||
enum Provider { | ||
Vanilla, | ||
Bucket, | ||
Spigot, | ||
Paper, | ||
Purpur, | ||
Fabric, | ||
Forge, | ||
NeoForge, | ||
} | ||
|
||
impl Default for Provider { | ||
fn default() -> Self { | ||
Self::Vanilla | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.