mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-06-11 20:13:55 +00:00
Implement suggestions for Bukkit + Sponge
This commit is contained in:
committed by
Kenzie Togami
parent
1c54a04fd1
commit
8a3e6a12b9
@ -29,6 +29,7 @@ import com.sk89q.worldedit.extension.platform.Actor;
|
||||
import com.sk89q.worldedit.extension.platform.Capability;
|
||||
import com.sk89q.worldedit.extension.platform.MultiUserPlatform;
|
||||
import com.sk89q.worldedit.extension.platform.Preference;
|
||||
import com.sk89q.worldedit.internal.command.CommandUtil;
|
||||
import com.sk89q.worldedit.sponge.config.SpongeConfiguration;
|
||||
import com.sk89q.worldedit.world.World;
|
||||
import com.sk89q.worldedit.world.registry.Registries;
|
||||
@ -144,7 +145,7 @@ class SpongePlatform extends AbstractPlatform implements MultiUserPlatform {
|
||||
public List<String> getSuggestions(CommandSource source, String arguments, @Nullable Location<org.spongepowered.api.world.World> targetPosition) throws CommandException {
|
||||
CommandSuggestionEvent weEvent = new CommandSuggestionEvent(SpongeWorldEdit.inst().wrapCommandSource(source), command.getName() + " " + arguments);
|
||||
WorldEdit.getInstance().getEventBus().post(weEvent);
|
||||
return weEvent.getSuggestions();
|
||||
return CommandUtil.fixSuggestions(arguments, weEvent.getSuggestions());
|
||||
}
|
||||
};
|
||||
ImmutableList.Builder<String> aliases = ImmutableList.builder();
|
||||
|
@ -98,8 +98,6 @@ public class ConfigurateConfiguration extends LocalConfiguration {
|
||||
superPickaxeDrop = node.getNode("super-pickaxe", "drop-items").getBoolean(superPickaxeDrop);
|
||||
superPickaxeManyDrop = node.getNode("super-pickaxe", "many-drop-items").getBoolean(superPickaxeManyDrop);
|
||||
|
||||
noDoubleSlash = node.getNode("no-double-slash").getBoolean(noDoubleSlash);
|
||||
|
||||
useInventory = node.getNode("use-inventory", "enable").getBoolean(useInventory);
|
||||
useInventoryOverride = node.getNode("use-inventory", "allow-override").getBoolean(useInventoryOverride);
|
||||
useInventoryCreativeOverride = node.getNode("use-inventory", "creative-mode-overrides").getBoolean(useInventoryCreativeOverride);
|
||||
|
Reference in New Issue
Block a user