electroid / intake Goto Github PK
View Code? Open in Web Editor NEWEasy-to-use framework for creating commands, especially in Minecraft
License: GNU Lesser General Public License v3.0
Easy-to-use framework for creating commands, especially in Minecraft
License: GNU Lesser General Public License v3.0
The argument parser is horribly broken by this line of code:
https://github.com/Electroid/intake/blob/master/core/src/main/java/app/ashcon/intake/parametric/ArgumentParser.java#L351
It implies that if one optional parameter has already been added, no more optionals can be there, and that's simply false. What you can't have is required parameters after an optional parameter, but that is already checked for in https://github.com/Electroid/intake/blob/master/core/src/main/java/app/ashcon/intake/parametric/ArgumentParser.java#L373
I have no clue where this code comes from, as in, why was it added. In the original version of intake is simpler and less convoluted https://github.com/EngineHub/Intake/blob/master/intake/src/main/java/com/sk89q/intake/parametric/ArgumentParser.java#L241 but it doesn't support @Nullable
and java's Optional
type, instead, it relies on only using the @Optional
annotation.
This is a blocking issue that makes many commands impossible to fix
Maybe some Minecraft specific examples too
Hello, I recently started using your library for my Spigot plugins and I have some questions about the TabCompleter.
I understood that the nodes allow to make sub-commands, but I don't understand how to make that when I make for example "/enchant add" it proposes me afterwards a list of enchantment as tabCompleter (like "/enchant add DAMAGE_ALL" as another example).
Here I hope you can help me possibly explain me something that I would not have understood in relation to this library!
(I don't speak english so if you don't understand don't hesitate to ask me to rephrase it !)
Not sure if this is already implemented, and apologies if it is, but since Brigadier has come out it has allowed for richer tab complete for Minecraft. I was wondering if Intake would ever support this for Bukkit/Spigot (of course 1.13.2+, but still allowing backwards compatibility by just disabling Brigadier components if necessary)? A library already exists for adding this tab complete to existing commands (https://github.com/lucko/commodore, used in https://github.com/lucko/LuckPerms), and I would think it would be a suitable addition to Intake, since it already handles tab complete already (according to me reading code).
https://repo.ashcon.app/nexus/content/repositories/snapshots/app/ashcon/intake/intake-core/
This is on version 1.1 not 1.0 as stated in the readme.
<repositories>
<repository>
<id>ashcon.app</id>
<url>https://repo.ashcon.app/nexus/content/repositories/snapshots/</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>app.ashcon.intake</groupId>
<!-- Use "intake-core" if you don't want Minecraft -->
<artifactId>intake-bukkit</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
</dependencies>
.
When I use intake v1.1-SNAPSHOT the following error shows inside the console
07.05 22:45:53 [Server] INFO java.lang.NoSuchMethodError: com.google.common.util.concurrent.MoreExecutors.sameThreadExecutor()Lcom/google/common/util/concurrent/ListeningExecutorService; 07.05 22:45:53 [Server] INFO at dev.loapu.vestriafoodproject.libs.intake.parametric.ParametricBuilder.<init>(ParametricBuilder.java:51) ~[?:?] 07.05 22:45:53 [Server] INFO at dev.loapu.vestriafoodproject.libs.intake.bukkit.graph.BasicBukkitCommandGraph.<init>(BasicBukkitCommandGraph.java:21) ~[?:?] 07.05 22:45:53 [Server] INFO at dev.loapu.vestriafoodproject.VestriaFoodProject.registerCommands(VestriaFoodProject.java:88) ~[?:?] 07.05 22:45:53 [Server] INFO at dev.loapu.vestriafoodproject.VestriaFoodProject.onEnableInner(VestriaFoodProject.java:74) ~[?:?]
I use Spigot (CraftBukkit version git-Spigot-f56e2e7-1a64d4a (MC: 1.13.2) (Implementing API version 1.13.2-R0.1-SNAPSHOT)) on my server. Does this happen because I shadowed the library or is there anything you can do about it?
Make it super simple for JavaPlugin
s to hook up to the framework.
If there is an even number of quotes in the arguments of a command, the outer pair is always removed. The string a "string with "quotes""
becomes a string with "quotes"
, for example. This is not always desirable (see PGMDev/PGM#259).
This appears to be the cause of the problem:
intake/core/src/main/java/app/ashcon/intake/argument/CommandContext.java
Lines 108 to 140 in 5967b51
Add simple support for a Duration
provider.
30m
-> 30 minutes
5s
-> 5 seconds
1h
-> 1 hour
Allow Provider
s to be executed asynchronously with a CompletableFuture
, that doesn't require complicated handling of futures in the parametric command.
None of this:
@Command
void getUser(CompletableFuture<User> user) {}
Just this, but executed asynchronously.
@Command
void getUser(User user) {}
A lot of the issues, including #12, have to do with our custom version of Bukkit. Separate into multiple modules and build against several Minecraft versions (1.8 and up).
org.bukkit.plugin.InvalidPluginException: java.lang.NoClassDefFoundError: app/ashcon/intake/fluent/CommandGraph
I get that error when booting up my Test Server while trying to test my plugin
Allow commands to be executed in Discord
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.