mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2024-12-22 09:08:03 +01:00
Fix for tab complete in game.
This commit is contained in:
parent
02e528cdc7
commit
d3b5411b1b
@ -7,5 +7,4 @@ authors: [tastybento, Poslovitch]
|
|||||||
|
|
||||||
softdepend: [PlaceholderAPI, MVdWPlaceholderAPI]
|
softdepend: [PlaceholderAPI, MVdWPlaceholderAPI]
|
||||||
|
|
||||||
load: startup
|
|
||||||
loadbefore: [Multiverse-Core]
|
loadbefore: [Multiverse-Core]
|
||||||
|
@ -5,7 +5,6 @@ import org.bukkit.World;
|
|||||||
import org.bukkit.plugin.PluginManager;
|
import org.bukkit.plugin.PluginManager;
|
||||||
import org.bukkit.plugin.java.JavaPlugin;
|
import org.bukkit.plugin.java.JavaPlugin;
|
||||||
|
|
||||||
import world.bentobox.bentobox.api.commands.MyCommand;
|
|
||||||
import world.bentobox.bentobox.api.configuration.BSBConfig;
|
import world.bentobox.bentobox.api.configuration.BSBConfig;
|
||||||
import world.bentobox.bentobox.api.configuration.WorldSettings;
|
import world.bentobox.bentobox.api.configuration.WorldSettings;
|
||||||
import world.bentobox.bentobox.api.events.BentoBoxReadyEvent;
|
import world.bentobox.bentobox.api.events.BentoBoxReadyEvent;
|
||||||
@ -100,13 +99,7 @@ public class BentoBox extends JavaPlugin {
|
|||||||
|
|
||||||
// Set up command manager
|
// Set up command manager
|
||||||
commandsManager = new CommandsManager();
|
commandsManager = new CommandsManager();
|
||||||
new MyCommand(); // Tab Complete works in-game and in console
|
|
||||||
getServer().getScheduler().runTask(this, () -> new MyCommand()); // Tab complete does not work in-game, only console
|
|
||||||
|
|
||||||
// These items have to be loaded when the server has done 1 tick.
|
|
||||||
// Note Worlds are not loaded this early, so any Locations or World reference will be null
|
|
||||||
// at this point. Therefore, the 1 tick scheduler is required.
|
|
||||||
//getServer().getScheduler().runTask(this, () -> {
|
|
||||||
// Create the world if it does not exist
|
// Create the world if it does not exist
|
||||||
islandWorldManager = new IslandWorldManager(instance);
|
islandWorldManager = new IslandWorldManager(instance);
|
||||||
// Load schems manager
|
// Load schems manager
|
||||||
@ -149,7 +142,6 @@ public class BentoBox extends JavaPlugin {
|
|||||||
|
|
||||||
|
|
||||||
});
|
});
|
||||||
// });
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -478,7 +478,6 @@ public abstract class CompositeCommand extends Command implements PluginIdentifi
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<String> tabComplete(final CommandSender sender, final String alias, final String[] args) {
|
public List<String> tabComplete(final CommandSender sender, final String alias, final String[] args) {
|
||||||
Bukkit.getLogger().info("DEBUG tab complete called");
|
|
||||||
List<String> options = new ArrayList<>();
|
List<String> options = new ArrayList<>();
|
||||||
// Get command object based on args entered so far
|
// Get command object based on args entered so far
|
||||||
CompositeCommand cmd = getCommandFromArgs(args);
|
CompositeCommand cmd = getCommandFromArgs(args);
|
||||||
|
Loading…
Reference in New Issue
Block a user