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>
<artifactId>T2CodeLib</artifactId>
<version>16.7</version>
<classifier>dev-6</classifier>
<classifier>dev-10</classifier>
<scope>provided</scope>
</dependency>
<dependency>

View File

@ -258,7 +258,7 @@ public class ExecuteAlias {
if (alias.consoleCommandEnable) {
for (String cmd : alias.consoleCommands) {
if (alias.consoleBungeeCommand) {
if ((boolean)T2CLibConfig.VALUES.proxy.getValue()) {
if ((boolean) T2CLibConfig.VALUES.proxy.getValue()) {
BCommandSenderReciver.sendToBungee(sender, cmd, true);
} else {
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) {
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
BCommandSenderReciver.sendToBungee(player, cmd.replace("[player]", player.getName()).replace("%player_name%", player.getName()).replace("[target]", targetSt).replace("[alias]", alias), aliasObject.adminCommandAsConsole);
} else {
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.");
}
} else {
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 {
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) {
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 {
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.");
}
} else {
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 {
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) {
if (aliasObject.bungeeCommand) {
<<<<<<< Updated upstream
if ((boolean) T2CLibConfig.VALUES.proxy.getValue()) {
BCommandSenderReciver.sendToBungee(player, cmd.replace("[player]", 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
BCommandSenderReciver.sendToBungee(player, cmd.replace("[player]", player.getName()).replace("%player_name%", player.getName()).replace("[target]", targetSt).replace("[alias]", alias), aliasObject.commandAsConsole);
} else {
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.");
}
} else {
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 {
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) {
if (alias.bungeeCommand) {
<<<<<<< Updated upstream
if ((boolean) T2CLibConfig.VALUES.proxy.getValue()) {
BCommandSenderReciver.sendToBungee(player, cmd.replace("[player]", 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
BCommandSenderReciver.sendToBungee(player, cmd.replace("[player]", player.getName()).replace("%player_name%", player.getName()).replace("[target]", targetSt), alias.commandAsConsole);
} else {
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.");
}
} else {
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 {
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) {
return s.replace("[player]", player.getName()).replace("%player_name%",player.getName());
return s.replace("[player]", player.getName()).replace("%player_name%", player.getName());
}
}