T2CodeLib api change to 16.7_dev-4

This commit is contained in:
JaTiTV 2024-07-03 03:29:50 +02:00
parent b7b3fbcb03
commit a85fd20f93
2 changed files with 25 additions and 16 deletions

View File

@ -7,7 +7,7 @@
<groupId>net.t2code</groupId>
<artifactId>Alias</artifactId>
<version>1.6_DEV</version>
<version>1.6_DEV-1</version>
<!--version>VERSION_snapshot-0</version-->
<!--version>VERSION_beta-0</version-->
<!--version>VERSION_dev-0</version-->
@ -101,7 +101,7 @@
<groupId>net.t2code</groupId>
<artifactId>T2CodeLib</artifactId>
<version>16.7</version>
<classifier>dev-1</classifier>
<classifier>dev-3</classifier>
<scope>provided</scope>
</dependency>
<dependency>

View File

@ -17,28 +17,31 @@ import java.util.List;
public class Config {
public enum VALUES implements T2CconfigItem{
language("plugin.language", "english", "In this option you can set the language of the plugin."),
updateCheckOnJoin("plugin.updateCheck.onJoin", true,"In this option you can set if players with the permission 't2c.alias.updatemsg' will get an update message on join when an update for the plugin is available."),
updateCheckSeePreReleaseUpdates("plugin.updateCheck.seePreReleaseUpdates", true,"In this option you can set whether you want to receive and display beta and snapshot versions in the update check."),
updateCheckTimeInterval("plugin.updateCheck.timeInterval", 60,"In this option you can set the time interval in minutes in which updates should be checked."),
language("plugin.language", "english", true,"In this option you can set the language of the plugin."),
updateCheckOnJoin("plugin.updateCheck.onJoin", true,true,"In this option you can set if players with the permission 't2c.alias.updatemsg' will get an update message on join when an update for the plugin is available."),
updateCheckSeePreReleaseUpdates("plugin.updateCheck.seePreReleaseUpdates", true,true,"In this option you can set whether you want to receive and display beta and snapshot versions in the update check."),
updateCheckTimeInterval("plugin.updateCheck.timeInterval", 60,true,"In this option you can set the time interval in minutes in which updates should be checked."),
buyMessage("buy.message", true,"With this option you can set whether a confirmation should be sent after the payment for an alias for which you have to pay."),
buyCurrency("buy.currency", "$","With this option you set the currency."),
buyConfirmDefault("buy.confirm.use", Confirm.COMMAND,"Here you can choose which confirmation method you want to use. (COMMAND, CHAT, GUI)"),
buyConfirmGuiFillItemDesc("buy.confirm.gui.fillItem", null," ","!! You can change the GUI name and the button texts in the language file !!"," "),
buyConfirmGuiFillItemEnabled("buy.confirm.gui.fillItem.enabled", true,"Here you can set if a fillitem should be used in the Confirm GUI."),
buyConfirmGuiFillItem("buy.confirm.gui.fillItem.material", T2CitemVersion.getBlackStainedGlassPane().getType().toString(),"Here you can set which fillitem should be used in the Confirm GUI."),
buyConfirmGuiConfirm("buy.confirm.gui.confirm.material", T2CitemVersion.getGreenWool().getType().toString(),"Here you can set the material for the confirmation button."),
buyConfirmGuiCancel("buy.confirm.gui.cancel.material", T2CitemVersion.getRedWool().getType().toString(),"Here you can set the material for the cancel button."),
subAliasTab("subAlias.tabComplete", true,"Here you can set if subcommands should be displayed as tabComplete.");
buyMessage("buy.message", true,true,"With this option you can set whether a confirmation should be sent after the payment for an alias for which you have to pay."),
buyCurrency("buy.currency", "$",true,"With this option you set the currency."),
buyConfirmDefault("buy.confirm.use", Confirm.COMMAND,true,"Here you can choose which confirmation method you want to use. (COMMAND, CHAT, GUI)"),
buyConfirmGuiFillItemDesc("buy.confirm.gui.fillItem", null,true," ","!! You can change the GUI name and the button texts in the language file !!"," "),
buyConfirmGuiFillItemEnabled("buy.confirm.gui.fillItem.enabled", true,true,"Here you can set if a fillitem should be used in the Confirm GUI."),
buyConfirmGuiFillItem("buy.confirm.gui.fillItem.material", T2CitemVersion.getBlackStainedGlassPane().getType().toString(),true,"Here you can set which fillitem should be used in the Confirm GUI."),
buyConfirmGuiConfirm("buy.confirm.gui.confirm.material", T2CitemVersion.getGreenWool().getType().toString(),true,"Here you can set the material for the confirmation button."),
buyConfirmGuiCancel("buy.confirm.gui.cancel.material", T2CitemVersion.getRedWool().getType().toString(),true,"Here you can set the material for the cancel button."),
subAliasTab("subAlias.tabComplete", true,true,"Here you can set if subcommands should be displayed as tabComplete."),
;
private final String path;
private Object value;
private final boolean forceSet;
private final List<String> comments;
VALUES(String path, Object value, String... comments) {
VALUES(String path, Object value,boolean forceSet, String... comments) {
this.path = path;
this.value = value;
this.forceSet=forceSet;
this.comments = new ArrayList<>(Arrays.asList(comments));
}
@ -52,6 +55,11 @@ public class Config {
return value;
}
@Override
public boolean getForceSet() {
return forceSet;
}
@Override
public List<String> getComments() {
return comments;
@ -67,6 +75,7 @@ public class Config {
long long_ = System.currentTimeMillis();
T2CconfigWriter.createConfig(new File(Main.getPath(), "config.yml"), VALUES.values(), Util.getConfigLogo());
T2Csend.console(Util.getPrefix() + " §2The config.yml was loaded successfully §7- §e" + (System.currentTimeMillis() - long_) + "ms");
}