mirror of
https://github.com/sekwah41/Advanced-Portals.git
synced 2024-11-22 02:25:49 +01:00
trying out material auto complete
This commit is contained in:
parent
fbbd104881
commit
9ec4c3b78a
2
pom.xml
2
pom.xml
@ -29,7 +29,7 @@
|
||||
<dependency>
|
||||
<groupId>org.bukkit</groupId>
|
||||
<artifactId>bukkit</artifactId>
|
||||
<version>1.12-pre2-SNAPSHOT</version>
|
||||
<version>1.12.1-R0.1-SNAPSHOT</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<!--<dependency>
|
||||
|
@ -23,6 +23,7 @@ import java.util.*;
|
||||
|
||||
public class AdvancedPortalsCommand implements CommandExecutor, TabCompleter {
|
||||
|
||||
private final ArrayList<String> blockMaterialList = new ArrayList<>();
|
||||
private AdvancedPortalsPlugin plugin;
|
||||
|
||||
private int portalArgsStringLength = 0;
|
||||
@ -34,12 +35,17 @@ public class AdvancedPortalsCommand implements CommandExecutor, TabCompleter {
|
||||
public AdvancedPortalsCommand(AdvancedPortalsPlugin plugin) {
|
||||
this.plugin = plugin;
|
||||
|
||||
|
||||
for(Material material : Material.values()) {
|
||||
this.blockMaterialList.add("triggerblock:" + material.name());
|
||||
}
|
||||
plugin.getCommand("advancedportals").setExecutor(this);
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
@Override
|
||||
public boolean onCommand(CommandSender sender, Command cmd, String command, String[] args) {
|
||||
System.out.printf("%s %s %s %s%n", sender, cmd, command, args );
|
||||
ConfigAccessor config = new ConfigAccessor(plugin, "config.yml");
|
||||
ConfigAccessor portalConfig = new ConfigAccessor(plugin, "portals.yml");
|
||||
if(!(sender instanceof Player)) {
|
||||
@ -272,7 +278,7 @@ public class AdvancedPortalsCommand implements CommandExecutor, TabCompleter {
|
||||
}
|
||||
break;
|
||||
case "variables" :
|
||||
sender.sendMessage(PluginMessages.customPrefix + " \u00A77Variables \u00A7c: \u00A7aname, triggerBlock, destination");
|
||||
sender.sendMessage(PluginMessages.customPrefix + " \u00A77Variables \u00A7c: \u00A7aname, triggerBlock, desti, destination, bungee, permission, command");
|
||||
sender.sendMessage("");
|
||||
sender.sendMessage("\u00A7aExample command: \u00A7e/portal create name:test triggerId:portal");
|
||||
break;
|
||||
@ -679,6 +685,7 @@ public class AdvancedPortalsCommand implements CommandExecutor, TabCompleter {
|
||||
}
|
||||
if (!hasTriggerBlock) {
|
||||
autoComplete.add("triggerblock:");
|
||||
autoComplete.addAll(this.blockMaterialList);
|
||||
}
|
||||
if (!hasDestination) {
|
||||
autoComplete.add("destination:");
|
||||
|
Loading…
Reference in New Issue
Block a user