This commit is contained in:
JaTiTV 2024-07-04 06:21:23 +02:00
parent 5f6648c628
commit 456e13bf5f
2 changed files with 17 additions and 38 deletions

View File

@ -101,7 +101,7 @@
<groupId>net.t2code</groupId> <groupId>net.t2code</groupId>
<artifactId>T2CodeLib</artifactId> <artifactId>T2CodeLib</artifactId>
<version>16.7</version> <version>16.7</version>
<classifier>dev-6</classifier> <classifier>dev-10</classifier>
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>
<dependency> <dependency>

View File

@ -258,7 +258,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 ((boolean)T2CLibConfig.VALUES.proxy.getValue()) { if ((boolean) T2CLibConfig.VALUES.proxy.getValue()) {
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.");
@ -316,23 +316,17 @@ public class ExecuteAlias {
} }
for (String cmd : aliasObject.adminCommands) { for (String cmd : aliasObject.adminCommands) {
if (aliasObject.adminBungeeCommand) { if (aliasObject.adminBungeeCommand) {
<<<<<<< Updated upstream
if ((boolean) T2CLibConfig.VALUES.proxy.getValue()) { if ((boolean) T2CLibConfig.VALUES.proxy.getValue()) {
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("%player_name%", player.getName()).replace("[target]", targetSt).replace("[alias]", alias), aliasObject.adminCommandAsConsole);
=======
if (T2CLibConfig.getBungee()) {
BCommandSenderReciver.sendToBungee(player, cmd.replace("[player]", player.getName()).replace("%player_name%",player.getName()).replace("[target]", targetSt).replace("[alias]", alias), aliasObject.adminCommandAsConsole);
>>>>>>> Stashed changes
} 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.");
T2Csend.player(player, Util.getPrefix() + " §4To use bungee commands, enable the Bungee option in the config."); T2Csend.player(player, Util.getPrefix() + " §4To use bungee commands, enable the Bungee option in the config.");
} }
} else { } else {
if (aliasObject.adminCommandAsConsole) { if (aliasObject.adminCommandAsConsole) {
T2Ccmd.console(cmd.replace("[player]", player.getName()).replace("%player_name%",player.getName()).replace("[target]", targetSt).replace("[alias]", alias)); T2Ccmd.console(cmd.replace("[player]", player.getName()).replace("%player_name%", player.getName()).replace("[target]", targetSt).replace("[alias]", alias));
} else { } else {
T2Ccmd.player(player, cmd.replace("[player]", player.getName()).replace("%player_name%",player.getName()).replace("[target]", targetSt).replace("[alias]", alias)); T2Ccmd.player(player, cmd.replace("[player]", player.getName()).replace("%player_name%", player.getName()).replace("[target]", targetSt).replace("[alias]", alias));
} }
} }
} }
@ -348,23 +342,18 @@ public class ExecuteAlias {
} }
for (String cmd : aliasObject.adminCommands) { for (String cmd : aliasObject.adminCommands) {
if (aliasObject.adminBungeeCommand) { if (aliasObject.adminBungeeCommand) {
<<<<<<< Updated upstream
if ((boolean) T2CLibConfig.VALUES.proxy.getValue()) {
BCommandSenderReciver.sendToBungee(player, cmd.replace("[player]", player.getName()).replace("[target]", targetSt).replace("[alias]", alias), aliasObject.adminCommandAsConsole);
=======
if (T2CLibConfig.getBungee()) {
BCommandSenderReciver.sendToBungee(player, cmd.replace("[player]", player.getName()).replace("%player_name%",player.getName()).replace("[target]", targetSt).replace("[alias]", alias), aliasObject.adminCommandAsConsole);
>>>>>>> Stashed changes
if ((boolean) T2CLibConfig.VALUES.proxy.getValue()) {
BCommandSenderReciver.sendToBungee(player, cmd.replace("[player]", player.getName()).replace("%player_name%", player.getName()).replace("[target]", targetSt).replace("[alias]", alias), aliasObject.adminCommandAsConsole);
} 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.");
T2Csend.player(player, Util.getPrefix() + " §4To use bungee commands, enable the Bungee option in the config."); T2Csend.player(player, Util.getPrefix() + " §4To use bungee commands, enable the Bungee option in the config.");
} }
} else { } else {
if (aliasObject.adminCommandAsConsole) { if (aliasObject.adminCommandAsConsole) {
T2Ccmd.console(cmd.replace("[player]", player.getName()).replace("%player_name%",player.getName()).replace("[target]", targetSt).replace("[alias]", alias)); T2Ccmd.console(cmd.replace("[player]", player.getName()).replace("%player_name%", player.getName()).replace("[target]", targetSt).replace("[alias]", alias));
} else { } else {
T2Ccmd.player(player, cmd.replace("[player]", player.getName()).replace("%player_name%",player.getName()).replace("[target]", targetSt).replace("[alias]", alias)); T2Ccmd.player(player, cmd.replace("[player]", player.getName()).replace("%player_name%", player.getName()).replace("[target]", targetSt).replace("[alias]", alias));
} }
} }
} }
@ -418,22 +407,18 @@ public class ExecuteAlias {
} }
for (String cmd : aliasObject.command) { for (String cmd : aliasObject.command) {
if (aliasObject.bungeeCommand) { if (aliasObject.bungeeCommand) {
<<<<<<< Updated upstream
if ((boolean) T2CLibConfig.VALUES.proxy.getValue()) { if ((boolean) T2CLibConfig.VALUES.proxy.getValue()) {
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("%player_name%", player.getName()).replace("[target]", targetSt).replace("[alias]", alias), aliasObject.commandAsConsole);
=======
if (T2CLibConfig.getBungee()) {
BCommandSenderReciver.sendToBungee(player, cmd.replace("[player]", player.getName()).replace("%player_name%",player.getName()).replace("[target]", targetSt).replace("[alias]", alias), aliasObject.commandAsConsole);
>>>>>>> Stashed changes
} 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.");
T2Csend.player(player, Util.getPrefix() + " §4To use bungee commands, enable the Bungee option in the config."); T2Csend.player(player, Util.getPrefix() + " §4To use bungee commands, enable the Bungee option in the config.");
} }
} else { } else {
if (aliasObject.commandAsConsole) { if (aliasObject.commandAsConsole) {
T2Ccmd.console(cmd.replace("[player]", player.getName()).replace("%player_name%",player.getName()).replace("[target]", targetSt).replace("[alias]", alias)); T2Ccmd.console(cmd.replace("[player]", player.getName()).replace("%player_name%", player.getName()).replace("[target]", targetSt).replace("[alias]", alias));
} else { } else {
T2Ccmd.player(player, cmd.replace("[player]", player.getName()).replace("%player_name%",player.getName()).replace("[target]", targetSt).replace("[alias]", alias)); T2Ccmd.player(player, cmd.replace("[player]", player.getName()).replace("%player_name%", player.getName()).replace("[target]", targetSt).replace("[alias]", alias));
} }
} }
} }
@ -449,23 +434,17 @@ public class ExecuteAlias {
} }
for (String cmd : alias.command) { for (String cmd : alias.command) {
if (alias.bungeeCommand) { if (alias.bungeeCommand) {
<<<<<<< Updated upstream
if ((boolean) T2CLibConfig.VALUES.proxy.getValue()) { if ((boolean) T2CLibConfig.VALUES.proxy.getValue()) {
BCommandSenderReciver.sendToBungee(player, cmd.replace("[player]", player.getName()).replace("[target]", targetSt), alias.commandAsConsole); BCommandSenderReciver.sendToBungee(player, cmd.replace("[player]", player.getName()).replace("%player_name%", player.getName()).replace("[target]", targetSt), alias.commandAsConsole);
=======
if (T2CLibConfig.getBungee()) {
BCommandSenderReciver.sendToBungee(player, cmd.replace("[player]", player.getName()).replace("%player_name%",player.getName()).replace("[target]", targetSt), alias.commandAsConsole);
>>>>>>> Stashed changes
} 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.");
T2Csend.player(player, Util.getPrefix() + " §4To use bungee commands, enable the Bungee option in the config."); T2Csend.player(player, Util.getPrefix() + " §4To use bungee commands, enable the Bungee option in the config.");
} }
} else { } else {
if (alias.commandAsConsole) { if (alias.commandAsConsole) {
T2Ccmd.console(cmd.replace("[player]", player.getName()).replace("%player_name%",player.getName()).replace("[target]", targetSt)); T2Ccmd.console(cmd.replace("[player]", player.getName()).replace("%player_name%", player.getName()).replace("[target]", targetSt));
} else { } else {
T2Ccmd.player(player, cmd.replace("[player]", player.getName()).replace("%player_name%",player.getName()).replace("[target]", targetSt)); T2Ccmd.player(player, cmd.replace("[player]", player.getName()).replace("%player_name%", player.getName()).replace("[target]", targetSt));
} }
} }
} }
@ -512,6 +491,6 @@ public class ExecuteAlias {
} }
private static String replacePlayer(String s, Player player) { private static String replacePlayer(String s, Player player) {
return s.replace("[player]", player.getName()).replace("%player_name%",player.getName()); return s.replace("[player]", player.getName()).replace("%player_name%", player.getName());
} }
} }