Fixes tab completion for the add and remove commands #7

This commit is contained in:
2022-02-19 00:00:50 +01:00
parent 6f35da03e7
commit d76d5cdf93
5 changed files with 40 additions and 44 deletions

View File

@ -3,8 +3,7 @@ package net.knarcraft.paidsigns;
import net.knarcraft.paidsigns.command.AddCommand;
import net.knarcraft.paidsigns.command.AddTabCompleter;
import net.knarcraft.paidsigns.command.ReloadTabCommand;
import net.knarcraft.paidsigns.command.RemoveCommand;
import net.knarcraft.paidsigns.command.RemoveTabCompleter;
import net.knarcraft.paidsigns.command.RemoveTabCommand;
import net.knarcraft.paidsigns.listener.SignListener;
import net.knarcraft.paidsigns.manager.EconomyManager;
import net.knarcraft.paidsigns.manager.PaidSignManager;
@ -108,8 +107,9 @@ public final class PaidSigns extends JavaPlugin {
PluginCommand removeCommand = this.getCommand("removePaidSign");
if (removeCommand != null) {
removeCommand.setExecutor(new RemoveCommand());
removeCommand.setTabCompleter(new RemoveTabCompleter());
TabExecutor removeTabExecutor = new RemoveTabCommand();
removeCommand.setExecutor(removeTabExecutor);
removeCommand.setTabCompleter(removeTabExecutor);
}
PluginCommand reloadCommand = this.getCommand("reload");