1.2.0 Dev
[HOTFIX CODE] Added an option for players to confirm when an alias costs. (Per alias adjustable)
This commit is contained in:
parent
546b827e02
commit
02e7020815
10
pom.xml
10
pom.xml
@ -6,11 +6,8 @@
|
|||||||
|
|
||||||
<groupId>net.t2code</groupId>
|
<groupId>net.t2code</groupId>
|
||||||
<artifactId>Alias</artifactId>
|
<artifactId>Alias</artifactId>
|
||||||
<<<<<<< Updated upstream
|
|
||||||
<version>1.1.7</version>
|
|
||||||
=======
|
|
||||||
<version>1.2.0_DEV-1</version>
|
<version>1.2.0_DEV-1</version>
|
||||||
>>>>>>> Stashed changes
|
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
<name>T2C-Alias</name>
|
<name>T2C-Alias</name>
|
||||||
@ -23,10 +20,7 @@
|
|||||||
<url>T2Code.net</url>
|
<url>T2Code.net</url>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
<<<<<<< Updated upstream
|
|
||||||
=======
|
|
||||||
<finalName>${project.name}_${project.version}</finalName>
|
<finalName>${project.name}_${project.version}</finalName>
|
||||||
>>>>>>> Stashed changes
|
|
||||||
<plugins>
|
<plugins>
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
@ -77,7 +71,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>net.t2code</groupId>
|
<groupId>net.t2code</groupId>
|
||||||
<artifactId>T2CodeLib</artifactId>
|
<artifactId>T2CodeLib</artifactId>
|
||||||
<version>13.4</version>
|
<version>14.4</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>net.t2code</groupId>
|
<groupId>net.t2code</groupId>
|
||||||
|
@ -12,10 +12,7 @@ import net.t2code.t2codelib.SPIGOT.api.eco.T2Ceco;
|
|||||||
import net.t2code.t2codelib.SPIGOT.api.messages.T2Creplace;
|
import net.t2code.t2codelib.SPIGOT.api.messages.T2Creplace;
|
||||||
import net.t2code.t2codelib.SPIGOT.api.messages.T2Csend;
|
import net.t2code.t2codelib.SPIGOT.api.messages.T2Csend;
|
||||||
import net.t2code.t2codelib.SPIGOT.api.plugins.T2CpluginCheck;
|
import net.t2code.t2codelib.SPIGOT.api.plugins.T2CpluginCheck;
|
||||||
<<<<<<< Updated upstream
|
|
||||||
=======
|
|
||||||
import net.t2code.t2codelib.SPIGOT.api.yaml.T2CLibConfig;
|
import net.t2code.t2codelib.SPIGOT.api.yaml.T2CLibConfig;
|
||||||
>>>>>>> Stashed changes
|
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
@ -179,7 +176,7 @@ public class ExecuteAlias {
|
|||||||
if (alias.consoleCommandEnable) {
|
if (alias.consoleCommandEnable) {
|
||||||
for (String cmd : alias.consoleCommands) {
|
for (String cmd : alias.consoleCommands) {
|
||||||
if (alias.consoleBungeeCommand) {
|
if (alias.consoleBungeeCommand) {
|
||||||
if (SelectConfig.getBungee()) {
|
if (T2CLibConfig.getBungee()) {
|
||||||
BCommandSenderReciver.sendToBungee(sender, cmd, true);
|
BCommandSenderReciver.sendToBungee(sender, cmd, true);
|
||||||
} else {
|
} else {
|
||||||
T2Csend.console(Util.getPrefix() + " §4To use bungee commands, enable the Bungee option in the config.");
|
T2Csend.console(Util.getPrefix() + " §4To use bungee commands, enable the Bungee option in the config.");
|
||||||
@ -209,7 +206,7 @@ public class ExecuteAlias {
|
|||||||
for (String cmd : aliasObject.consoleCommands) {
|
for (String cmd : aliasObject.consoleCommands) {
|
||||||
String replace = cmd.replace("[target]", targetSt).replace("[alias]", alias);
|
String replace = cmd.replace("[target]", targetSt).replace("[alias]", alias);
|
||||||
if (aliasObject.consoleBungeeCommand) {
|
if (aliasObject.consoleBungeeCommand) {
|
||||||
if (SelectConfig.getBungee()) {
|
if (T2CLibConfig.getBungee()) {
|
||||||
BCommandSenderReciver.sendToBungee(sender, replace, true);
|
BCommandSenderReciver.sendToBungee(sender, replace, true);
|
||||||
} else {
|
} else {
|
||||||
T2Csend.console(Util.getPrefix() + " §4To use bungee commands, enable the Bungee option in the config.");
|
T2Csend.console(Util.getPrefix() + " §4To use bungee commands, enable the Bungee option in the config.");
|
||||||
@ -237,7 +234,7 @@ public class ExecuteAlias {
|
|||||||
}
|
}
|
||||||
for (String cmd : aliasObject.adminCommands) {
|
for (String cmd : aliasObject.adminCommands) {
|
||||||
if (aliasObject.adminBungeeCommand) {
|
if (aliasObject.adminBungeeCommand) {
|
||||||
if (SelectConfig.getBungee()) {
|
if (T2CLibConfig.getBungee()) {
|
||||||
BCommandSenderReciver.sendToBungee(player, cmd.replace("[player]", player.getName()).replace("[target]", targetSt).replace("[alias]", alias), aliasObject.adminCommandAsConsole);
|
BCommandSenderReciver.sendToBungee(player, cmd.replace("[player]", player.getName()).replace("[target]", targetSt).replace("[alias]", alias), aliasObject.adminCommandAsConsole);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
@ -264,7 +261,7 @@ public class ExecuteAlias {
|
|||||||
}
|
}
|
||||||
for (String cmd : aliasObject.adminCommands) {
|
for (String cmd : aliasObject.adminCommands) {
|
||||||
if (aliasObject.adminBungeeCommand) {
|
if (aliasObject.adminBungeeCommand) {
|
||||||
if (SelectConfig.getBungee()) {
|
if (T2CLibConfig.getBungee()) {
|
||||||
BCommandSenderReciver.sendToBungee(player, cmd.replace("[player]", player.getName()).replace("[target]", targetSt).replace("[alias]", alias), aliasObject.adminCommandAsConsole);
|
BCommandSenderReciver.sendToBungee(player, cmd.replace("[player]", player.getName()).replace("[target]", targetSt).replace("[alias]", alias), aliasObject.adminCommandAsConsole);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
@ -329,7 +326,7 @@ public class ExecuteAlias {
|
|||||||
}
|
}
|
||||||
for (String cmd : aliasObject.command) {
|
for (String cmd : aliasObject.command) {
|
||||||
if (aliasObject.bungeeCommand) {
|
if (aliasObject.bungeeCommand) {
|
||||||
if (SelectConfig.getBungee()) {
|
if (T2CLibConfig.getBungee()) {
|
||||||
BCommandSenderReciver.sendToBungee(player, cmd.replace("[player]", player.getName()).replace("[target]", targetSt).replace("[alias]", alias), aliasObject.commandAsConsole);
|
BCommandSenderReciver.sendToBungee(player, cmd.replace("[player]", player.getName()).replace("[target]", targetSt).replace("[alias]", alias), aliasObject.commandAsConsole);
|
||||||
} else {
|
} else {
|
||||||
T2Csend.console(Util.getPrefix() + " §4To use bungee commands, enable the Bungee option in the config.");
|
T2Csend.console(Util.getPrefix() + " §4To use bungee commands, enable the Bungee option in the config.");
|
||||||
@ -355,7 +352,7 @@ public class ExecuteAlias {
|
|||||||
}
|
}
|
||||||
for (String cmd : alias.command) {
|
for (String cmd : alias.command) {
|
||||||
if (alias.bungeeCommand) {
|
if (alias.bungeeCommand) {
|
||||||
if (SelectConfig.getBungee()) {
|
if (T2CLibConfig.getBungee()) {
|
||||||
BCommandSenderReciver.sendToBungee(player, cmd.replace("[player]", player.getName()).replace("[target]", targetSt), alias.commandAsConsole);
|
BCommandSenderReciver.sendToBungee(player, cmd.replace("[player]", player.getName()).replace("[target]", targetSt), alias.commandAsConsole);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
@ -11,7 +11,6 @@ import java.io.IOException;
|
|||||||
|
|
||||||
public class CreateConfig {
|
public class CreateConfig {
|
||||||
|
|
||||||
|
|
||||||
public static void configCreate() {
|
public static void configCreate() {
|
||||||
long long_ = System.currentTimeMillis();
|
long long_ = System.currentTimeMillis();
|
||||||
if (new File(Main.getPath(), "config.yml").exists()) {
|
if (new File(Main.getPath(), "config.yml").exists()) {
|
||||||
@ -21,18 +20,7 @@ public class CreateConfig {
|
|||||||
File config = new File(Main.getPath(), "config.yml");
|
File config = new File(Main.getPath(), "config.yml");
|
||||||
YamlConfiguration yamlConfiguration = YamlConfiguration.loadConfiguration(config);
|
YamlConfiguration yamlConfiguration = YamlConfiguration.loadConfiguration(config);
|
||||||
|
|
||||||
T2Cconfig.set("Plugin.language", "english", yamlConfiguration);
|
|
||||||
T2Cconfig.set("Plugin.updateCheck.onJoin", true, yamlConfiguration);
|
|
||||||
T2Cconfig.set("Plugin.updateCheck.seePreReleaseUpdates", true, yamlConfiguration);
|
|
||||||
T2Cconfig.set("Plugin.updateCheck.timeInterval", 60, yamlConfiguration);
|
|
||||||
|
|
||||||
T2Cconfig.set("BungeeCord.Enable", false, yamlConfiguration);
|
|
||||||
T2Cconfig.set("BungeeCord.ThisServer", "server", yamlConfiguration);
|
|
||||||
|
|
||||||
<<<<<<< Updated upstream
|
|
||||||
T2Cconfig.set("Buy.Message", true, yamlConfiguration);
|
|
||||||
T2Cconfig.set("SubAlias.TabComplete", true, yamlConfiguration);
|
|
||||||
=======
|
|
||||||
T2Cconfig.set("plugin.language", "english", yamlConfiguration);
|
T2Cconfig.set("plugin.language", "english", yamlConfiguration);
|
||||||
T2Cconfig.set("plugin.updateCheck.onJoin", true, yamlConfiguration);
|
T2Cconfig.set("plugin.updateCheck.onJoin", true, yamlConfiguration);
|
||||||
T2Cconfig.set("plugin.updateCheck.seePreReleaseUpdates", true, yamlConfiguration);
|
T2Cconfig.set("plugin.updateCheck.seePreReleaseUpdates", true, yamlConfiguration);
|
||||||
@ -41,7 +29,7 @@ public class CreateConfig {
|
|||||||
T2Cconfig.set("buy.message", true, yamlConfiguration);
|
T2Cconfig.set("buy.message", true, yamlConfiguration);
|
||||||
T2Cconfig.set("buy.currency", "$", yamlConfiguration);
|
T2Cconfig.set("buy.currency", "$", yamlConfiguration);
|
||||||
T2Cconfig.set("subAlias.tabComplete", true, yamlConfiguration);
|
T2Cconfig.set("subAlias.tabComplete", true, yamlConfiguration);
|
||||||
>>>>>>> Stashed changes
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
yamlConfiguration.save(config);
|
yamlConfiguration.save(config);
|
||||||
@ -50,8 +38,6 @@ public class CreateConfig {
|
|||||||
}
|
}
|
||||||
T2Csend.console(Util.getPrefix() + " §2config.yml were successfully created / updated." + " §7- §e" + (System.currentTimeMillis() - long_) + "ms");
|
T2Csend.console(Util.getPrefix() + " §2config.yml were successfully created / updated." + " §7- §e" + (System.currentTimeMillis() - long_) + "ms");
|
||||||
}
|
}
|
||||||
<<<<<<< Updated upstream
|
|
||||||
=======
|
|
||||||
|
|
||||||
private static void convert() {
|
private static void convert() {
|
||||||
File configOld = new File(Main.getPath(), "config.yml");
|
File configOld = new File(Main.getPath(), "config.yml");
|
||||||
@ -78,5 +64,4 @@ public class CreateConfig {
|
|||||||
|
|
||||||
configCreate();
|
configCreate();
|
||||||
}
|
}
|
||||||
>>>>>>> Stashed changes
|
|
||||||
}
|
}
|
||||||
|
@ -14,8 +14,6 @@ public class SelectConfig {
|
|||||||
private static Boolean updateCheckSeePreReleaseUpdates;
|
private static Boolean updateCheckSeePreReleaseUpdates;
|
||||||
private static Integer updateCheckTimeInterval;
|
private static Integer updateCheckTimeInterval;
|
||||||
private static String language;
|
private static String language;
|
||||||
private static Boolean Bungee;
|
|
||||||
private static String thisServer;
|
|
||||||
|
|
||||||
private static Boolean buyMessage;
|
private static Boolean buyMessage;
|
||||||
private static String buyCurrency;
|
private static String buyCurrency;
|
||||||
@ -32,18 +30,11 @@ public class SelectConfig {
|
|||||||
updateCheckTimeInterval = yamlConfiguration.getInt("Plugin.updateCheck.timeInterval");
|
updateCheckTimeInterval = yamlConfiguration.getInt("Plugin.updateCheck.timeInterval");
|
||||||
|
|
||||||
|
|
||||||
<<<<<<< Updated upstream
|
|
||||||
language = yamlConfiguration.getString("Plugin.language");
|
language = yamlConfiguration.getString("Plugin.language");
|
||||||
Bungee = yamlConfiguration.getBoolean("BungeeCord.Enable");
|
|
||||||
thisServer = yamlConfiguration.getString("BungeeCord.ThisServer");
|
|
||||||
|
|
||||||
buyMessage = yamlConfiguration.getBoolean("Buy.Message");
|
|
||||||
subAliasTab = yamlConfiguration.getBoolean("SubAlias.TabComplete");
|
|
||||||
=======
|
|
||||||
buyMessage = yamlConfiguration.getBoolean("buy.message");
|
buyMessage = yamlConfiguration.getBoolean("buy.message");
|
||||||
buyCurrency = yamlConfiguration.getString("buy.currency");
|
buyCurrency = yamlConfiguration.getString("buy.currency");
|
||||||
subAliasTab = yamlConfiguration.getBoolean("subAlias.tabComplete");
|
subAliasTab = yamlConfiguration.getBoolean("subAlias.tabComplete");
|
||||||
>>>>>>> Stashed changes
|
|
||||||
}
|
}
|
||||||
public static void setConfigVersion() {
|
public static void setConfigVersion() {
|
||||||
File config = new File(Main.getPath(), "config.yml");
|
File config = new File(Main.getPath(), "config.yml");
|
||||||
@ -80,13 +71,6 @@ public class SelectConfig {
|
|||||||
return language;
|
return language;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Boolean getBungee() {
|
|
||||||
return Bungee;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static String getThisServer() {
|
|
||||||
return thisServer;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static Boolean getBuyMessage() {
|
public static Boolean getBuyMessage() {
|
||||||
return buyMessage;
|
return buyMessage;
|
||||||
|
@ -15,6 +15,7 @@ import net.t2code.alias.Util;
|
|||||||
import net.t2code.t2codelib.SPIGOT.api.messages.T2Ctemplate;
|
import net.t2code.t2codelib.SPIGOT.api.messages.T2Ctemplate;
|
||||||
import net.t2code.t2codelib.SPIGOT.api.register.T2Cregister;
|
import net.t2code.t2codelib.SPIGOT.api.register.T2Cregister;
|
||||||
import net.t2code.t2codelib.SPIGOT.api.update.T2CupdateAPI;
|
import net.t2code.t2codelib.SPIGOT.api.update.T2CupdateAPI;
|
||||||
|
import net.t2code.t2codelib.SPIGOT.api.yaml.T2CLibConfig;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
@ -72,7 +73,7 @@ public class Load {
|
|||||||
T2Cregister.listener(new TabEvent(), plugin);
|
T2Cregister.listener(new TabEvent(), plugin);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (SelectConfig.getBungee()) {
|
if (T2CLibConfig.getBungee()) {
|
||||||
Bukkit.getMessenger().registerOutgoingPluginChannel(plugin, "t2c:bcmd");
|
Bukkit.getMessenger().registerOutgoingPluginChannel(plugin, "t2c:bcmd");
|
||||||
}
|
}
|
||||||
AliasRegisterPermissions.onPermRegister();
|
AliasRegisterPermissions.onPermRegister();
|
||||||
|
Loading…
Reference in New Issue
Block a user