1.1.2 | Bugfix
TabComplete Aller Commands was affected by T2C alias and partially disabled completely. This has been fixed.
This commit is contained in:
parent
6586ac4ee9
commit
dbe5f82030
2
pom.xml
2
pom.xml
@ -6,7 +6,7 @@
|
||||
|
||||
<groupId>net.t2code</groupId>
|
||||
<artifactId>Alias</artifactId>
|
||||
<version>1.1.1</version>
|
||||
<version>1.1.2</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>T2C-Alias</name>
|
||||
|
@ -6,7 +6,6 @@ import net.t2code.lib.Spigot.Lib.commands.Tab;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.Listener;
|
||||
import org.bukkit.event.server.TabCompleteEvent;
|
||||
import org.bukkit.plugin.Plugin;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
@ -17,11 +16,10 @@ public class TabEvent implements Listener {
|
||||
public void onTab(TabCompleteEvent e) {
|
||||
String buffer = e.getBuffer();
|
||||
String[] imp = buffer.replace("/", "").split(" ");
|
||||
List<String> list = new ArrayList<>(Collections.emptyList());
|
||||
if (!Main.allAliases.contains(imp[0]) || !Main.allForSubAliases.contains(imp[0])){
|
||||
e.setCompletions(list);
|
||||
return;
|
||||
}
|
||||
List<String> list = new ArrayList<>(Collections.emptyList());
|
||||
arg1.clear();
|
||||
|
||||
for (String sals : Main.allSubAliases) {
|
||||
|
@ -99,9 +99,9 @@ public class SelectAlias {
|
||||
for (String al : aliasList) {
|
||||
Main.aliasHashMap.put(al, alias);
|
||||
}
|
||||
}
|
||||
send.console(Prefix + " §aAlias file §e" + config_gui.getName() + " §awas loaded");
|
||||
}
|
||||
}
|
||||
AliasRegister.onRegister();
|
||||
}
|
||||
|
||||
|
@ -51,7 +51,7 @@ public class SelectSubAlias {
|
||||
if (subAliasFor != null) {
|
||||
String[] imp = subAliasFor.split(" ");
|
||||
if (!Main.allAliases.contains(imp[0])) {
|
||||
send.error(Main.getPlugin(), "Den Alias " + imp[0] + " in der Datei " + config_gui.getName() + " existiert nicht!");
|
||||
send.error(Main.getPlugin(), "The alias " + imp[0] + " in the file " + config_gui.getName() + " does not exist!");
|
||||
}
|
||||
String[] args = subAliasFor.split(" ");
|
||||
subAliasArg = args.length - 1;
|
||||
|
@ -10,8 +10,7 @@ SubAlias:
|
||||
# For example:
|
||||
# - aliasexample1 -> aliasexample1 <this SubAlias>
|
||||
# - aliasexample2 test -> aliasexample2 test <this SubAlias>
|
||||
SubAliasFor:
|
||||
- aliasexample1
|
||||
SubAliasFor: aliasexample1
|
||||
Permission:
|
||||
# Here you can say if a permission is needed to use the alias#
|
||||
Necessary: true
|
||||
|
Loading…
Reference in New Issue
Block a user