Commit Graph

412 Commits

Author SHA1 Message Date
LeoDog896
d50b5ac179 Add documentation to Argument methods 2021-05-13 08:15:02 -04:00
TheMode
8b98472ddf Ignore case for generated string arguments 2021-05-07 21:55:49 +02:00
TheMode
e4680d1f8d Fix syntaxes tree branching when a literal is present in the middle of a syntax 2021-05-05 00:01:50 +02:00
TheMode
4b6026f18d Remove unnecessary scopes 2021-05-04 23:15:20 +02:00
TheMode
dfcf908abc Initial command syntaxes tree attempt 2021-05-04 23:00:38 +02:00
TheMode
cd0ea0c0c2 Remove deprecated CommandProcessor.java 2021-05-01 20:27:41 +02:00
TheMode
6e9adb2b9b Removed longely deprecated Arguments.class 2021-05-01 20:20:23 +02:00
TheMode
35c60733d1 Dont deprecate setDefaultValue with constant result 2021-04-28 14:05:20 +02:00
TheMode
47e7d35949 Support standalone itemstack string parsing 2021-04-25 21:42:40 +02:00
TheMode
5e385c7c9b Fix section resize performance 2021-04-25 12:39:18 +02:00
TheMode
41d61e7df6 Added CommandSyntax#getSyntaxString 2021-04-25 10:46:10 +02:00
TheMode
b0afadf093 Override Argument#toString for all subclasses 2021-04-25 10:42:05 +02:00
TheMode
7d1dfabc51 Fix color argument 2021-04-24 10:37:09 +02:00
TheMode
09c22b4e49 ArgumentWord restrictions are case sensitive (because of brigadier) 2021-04-21 22:29:54 +02:00
TheMode
cb34d34799 ArgumentItemStack cleanup 2021-04-18 04:35:11 +02:00
TheMode
dd88a14b90 Remove unused class 2021-04-18 00:19:57 +02:00
TheMode
8f3ee93191 Use literal as the default argument when generating a syntax 2021-04-16 21:51:33 +02:00
TheMode
56439a2330 Merge branch 'master' into jline 2021-04-13 02:18:10 +02:00
TheMode
20c947650f Clear command cache after unregistering a command 2021-04-12 22:45:45 +02:00
TheMode
1d5262caf2 Merge branch 'master' into item-api
# Conflicts:
#	src/test/java/demo/PlayerInit.java
2021-04-12 00:44:47 +02:00
TheMode
c347f55c1f Make it clear that ArgumentEntity uses a bitmask 2021-04-10 23:18:07 +02:00
TheMode
be2d1db9e0 Merge branch 'master' into item-api 2021-04-10 19:37:36 +02:00
TheMode
d88f81e5f3 Use UnaryOperator instead of Function 2021-04-10 01:16:21 +02:00
TheMode
e19af0377c Merge branch 'master' into item-api
# Conflicts:
#	src/main/java/net/minestom/server/item/ItemDisplay.java
#	src/main/java/net/minestom/server/utils/binary/BinaryReader.java
2021-04-09 23:19:38 +02:00
TheMode
05a553eb4e Fix javadoc build 2021-04-09 19:01:37 +02:00
TheMode
4b31e27348 Fix ArgumentMap when the argument accepts space 2021-04-09 18:59:24 +02:00
LeoDog896
ca6ee7c23a Move ArgumentMapper inside ArgumentMap 2021-04-09 12:54:02 -04:00
LeoDog896
e4c3345da7 Add beta to map 2021-04-09 12:50:05 -04:00
LeoDog896
45cc41c99e
Merge branch 'master' into argument-map 2021-04-08 13:01:50 -04:00
TheMode
4c495f401d Code cleanup 2021-04-07 18:35:19 +02:00
TheMode
5b98fbeb8b Rename CommandCondition 'source' to 'sender' 2021-04-07 15:48:05 +02:00
LeoDog896
512ec8dcbc Catch command execution 2021-04-06 22:28:12 -04:00
LeoDog896
dfae6ad5f8 Documentation and visibility changes 2021-04-06 22:12:30 -04:00
LeoDog896
0e4168ba45 Add ArgumentMap 2021-04-06 22:07:38 -04:00
Felix Cravic
e3867c659b Merge branch 'master' into item-api
# Conflicts:
#	src/main/java/net/minestom/server/item/ItemStack.java
2021-04-06 05:10:58 +02:00
Kieran Wallbanks
785a0bb66c Remove unnecessary cast attempts and instanceof checks 2021-04-04 14:10:06 +01:00
Kieran Wallbanks
59e67c0d82 Undeprecate CommandSender#sendMessage(String), see #212 2021-04-04 14:05:02 +01:00
themode
8d8a22f209 Use original NBT when possible 2021-04-02 22:14:48 +02:00
themode
a128d30b6b WIP Item rework implementation 2021-04-02 18:13:02 +02:00
jglrxavpok
13eb2ebc4c Merge remote-tracking branch 'origin/read-write-packets' 2021-03-30 22:14:09 +02:00
themode
45d3b7158c Use a Supplier in Argument#setDefaultValue, fix all-optional syntaxes missing arguments 2021-03-30 20:29:50 +02:00
jglrxavpok
930054385f More packets, just missing ChunkDataPacket 2021-03-30 19:50:55 +02:00
themode
9a83226df5 Added more built in option in ArgumentParser#generate 2021-03-29 14:13:13 +02:00
themode
7edc508662 Added beta ArgumentType#generate 2021-03-28 11:39:10 +02:00
themode
27cfe9c92b Rename Command#addConditionalSyntax 2021-03-27 18:28:10 +01:00
themode
404d6aa45e some protected fields for Argument 2021-03-27 14:08:04 +01:00
Németh Noel
477b69b9e5 Added common conditions 2021-03-26 21:13:45 +01:00
Kieran Wallbanks
e738efded3 Use Adventure in ArgumentComponent and add demo echo command 2021-03-26 17:34:38 +00:00
Kieran Wallbanks
b4b2cf70c5 Revert argument changes to single file with adventure style result 2021-03-26 17:34:38 +00:00
Kieran Wallbanks
63aaee698e Rebase to master and fix complication issues 2021-03-26 17:34:38 +00:00
Kieran Wallbanks
d419bf9401 fix TeamColor allowing unsupported formats 2021-03-26 17:34:38 +00:00
Kieran Wallbanks
e3d135e1f2 update arguments to reflect new color options 2021-03-26 17:34:38 +00:00
Kieran Wallbanks
522367dd78 Begin removing deprecated usages 2021-03-26 17:34:38 +00:00
Kieran Wallbanks
316ecbbf5a Cleanup annotations and imports 2021-03-26 17:34:38 +00:00
Kieran Wallbanks
653859e784 Add SerializationManager 2021-03-26 17:34:38 +00:00
Kieran Wallbanks
cfa9cffe87 Clean up non-Player CommandSender implementations 2021-03-26 17:34:38 +00:00
Kieran Wallbanks
4f0944ba9f Initial adventure implementation
- deprecate old text classes
- make CommandSender and Audience
- implement in ConsoleSender
- partially implement in Player
2021-03-26 17:34:38 +00:00
themode
5320beddb8 Added ArgumentUUID 2021-03-24 15:13:25 +01:00
themode
fe7b48df48 Added ArgumentResourceLocation 2021-03-24 13:58:44 +01:00
themode
9817919988 CommandParser#findCommand style cleanup 2021-03-21 09:25:22 +01:00
themode
3e3cb4b213 Fix command name recursion 2021-03-21 09:09:32 +01:00
themode
9d98c050a0 Merge branch 'master' into jline 2021-03-19 06:44:59 +01:00
themode
933b2663eb small style cleanup 2021-03-19 03:56:25 +01:00
themode
e15d710bf8 Initial jline commit 2021-03-18 02:47:10 +01:00
themode
f449201033 Remove the need for the command string in ParsedCommand 2021-03-17 05:06:09 +01:00
themode
7bbc99956d Merge branch 'master' into command-redirection 2021-03-17 01:56:00 +01:00
themode
36d548ff35 Improve redirection match 2021-03-17 01:52:55 +01:00
themode
a8bb20fca6 Fix node index query 2021-03-15 12:56:05 +01:00
themode
826b1aa6cd Added ArgumentCommand#setOnlyCorrect to force correct syntax 2021-03-15 10:13:53 +01:00
themode
fbb0ddd7db Use a proper regex to check for valid player username 2021-03-15 09:27:51 +01:00
themode
78e12879b4 Fix redirection when the player doesn't have access to a command 2021-03-15 09:05:02 +01:00
themode
3c7a96dc4a Initial command redirection improvement 2021-03-15 09:01:29 +01:00
themode
3975a0dffd Fix ArgumentString not properly supporting single quote 2021-03-13 05:05:08 +01:00
themode
158df922bc Fix suggestion chaining 2021-03-12 22:34:33 +01:00
themode
a47bf24034 Added support for empty syntax 2021-03-12 22:10:03 +01:00
themode
7309d05666 Update demo command with the new SimpleCommand, update comment to reflect permission access change 2021-03-11 03:31:25 +01:00
themode
1760c95ebe Cleanup 2021-03-11 03:24:38 +01:00
themode
855c52dea5 Added deprecation tag 2021-03-11 03:19:07 +01:00
themode
1f7558c753 Deprecate CommandProcessor further, added SimpleCommand as a replacement 2021-03-11 03:02:13 +01:00
themode
f3335d25f6 Cleanup 2021-03-11 02:42:15 +01:00
themode
60dc164cdc Prevent quote(s) in the middle of inputs 2021-03-11 00:19:55 +01:00
themode
060a148b60 Fix un-quoted ArgumentString 2021-03-11 00:18:04 +01:00
themode
9c1ff216a1 Replace Arguments by CommandContext in demo commands 2021-03-11 00:11:29 +01:00
themode
db02e93429 Fix subcommand query 2021-03-10 22:36:15 +01:00
themode
7cfa07f2e0 Support CommandContext for normal syntaxes 2021-03-10 20:19:29 +01:00
themode
7bf2deecf2 Added raw arg in CommandContext + cleanup 2021-03-10 20:03:36 +01:00
themode
cbe57f9cac Retrieve context from suggestion 2021-03-10 19:47:08 +01:00
themode
eb56324e8b Added suggestion support for subcommands 2021-03-10 19:14:24 +01:00
themode
67b3b37813 Replace Arguments by CommandContext 2021-03-10 06:38:51 +01:00
themode
b03b35b881 Improve tab packet when dealing with trailing spaces 2021-03-10 04:21:42 +01:00
themode
aa29103983 Fix java 11 support 2021-03-10 01:25:01 +01:00
themode
bca2434cff Command parsing cleanup + preparation for suggestion & advanced caching 2021-03-10 01:21:33 +01:00
themode
f98cfe1d54 Set default start & length for the tab complete packet 2021-03-09 04:04:21 +01:00
themode
441cb5a1db Initial command suggestion commit 2021-03-09 01:44:01 +01:00
themode
7241dbdcf7 Modernize the demo package 2021-03-09 00:43:35 +01:00
themode
93bd039938 Fix EntityFinder performance when searching for a constant name or uuid 2021-03-04 13:54:46 +01:00
themode
f7ec45802f Added ArgumentComponent 2021-03-03 22:52:40 +01:00
themode
a0d5ac12bc Small literal argument cleanup 2021-02-25 15:38:59 +01:00
Konstantin Shandurenko
49c92883cd ArgumentEnum 2021-02-25 07:03:26 +03:00
Konstantin Shandurenko
c9f7ee5546 Renamed ParticleType back to Particle 2021-02-23 19:29:21 +03:00
Konstantin Shandurenko
0915858df3 Meta wrappers for all the entities 2021-02-23 15:11:10 +03:00
Konstantin Shandurenko
6eda8f97db Removed @author javadocs 2021-02-23 09:14:38 +03:00
Konstantin Shandurenko
b409eadffa ArgumentEnum and /horse command for demo scene 2021-02-23 09:06:19 +03:00
themode
b0185aa7e1 Cache command result, increases performance by an order of magnitude 2021-02-22 11:49:28 +01:00
themode
732fa0434a Properly return the command result UNKNOWN 2021-02-22 11:26:16 +01:00
themode
b4508692a5 Fix situation where no command executor is chosen when there is ambiguity. Also fix subcommand default executor not being used as backup 2021-02-22 09:42:48 +01:00
themode
85a8396c9d UUID & player name cannot contain space 2021-02-21 17:44:38 +01:00
themode
78e37258ed Improve ArgumentEntity to support entity UUID & pre-check for player name 2021-02-21 17:43:30 +01:00
themode
99be06f571 Revert to check shared command arguments 2021-02-20 19:18:28 +01:00
MrBretzel
2c45103b2c
Update Arguments.java 2021-02-20 15:43:22 +01:00
MrBretzel
1ad1f06e33
Adding has(Argument<T> argument) to Arguments.java 2021-02-20 15:31:30 +01:00
themode
bd840a868f Improve optional argument support & client-side brigadier suggestion 2021-02-20 13:10:12 +01:00
themode
a419d7eb3f Add subcommand support for fast parsing & proper separation between logics 2021-02-20 08:59:15 +01:00
themode
437afc28ff Enable suggestion by default for ArgumentEntityType 2021-02-14 07:52:27 +01:00
themode
beaf25ff47 Added convenient Arguments#has 2021-02-14 00:25:08 +01:00
themode
df2ee23a7c ArgumentLoop cleanup 2021-02-13 08:43:38 +01:00
themode
e0d0c14933 Fix ArgumentLong and don't set default min/max for number arguments 2021-02-13 07:35:53 +01:00
themode
1d64cafcf2 Move some CommandDispatcher methods 2021-02-13 00:34:25 +01:00
LeoDog896
367889a374 No magic strings in ArgumentString 2021-02-12 15:27:18 -05:00
themode
33a26b80f5 Added CommandData#has and allow #set chaining 2021-02-12 08:34:05 +01:00
themode
c9ab710be2 Fix argument callback being overridden 2021-02-12 05:24:40 +01:00
themode
efd2dbc021 Fix command argument sharing 2021-02-12 04:34:37 +01:00
LeoDog896
2f99567edf Use slf4j logger instead of direct print 2021-02-11 20:18:02 -05:00
themode
5610b1a72a Added ArgumentLoop parsing 2021-02-12 00:25:12 +01:00
themode
84da72d798 Fix command aliases + cleanup 2021-02-12 00:00:44 +01:00
themode
f0105d7058 Added WIP ArgumentLoop (no parsing yet) 2021-02-11 20:36:02 +01:00
themode
f639ac83f7 Rewrite of the command nodes creation 2021-02-11 06:37:09 +01:00
themode
ab9ddebfea WIP ArgumentGroup nodes, renamed NodeMaker#addNodes 2021-02-11 05:08:49 +01:00
themode
b34b490504 Added ArgumentGroup parsing, WIP nodes 2021-02-11 04:47:48 +01:00
themode
e9d91fd21e Separate the dispatcher from the parsing algorithm 2021-02-11 04:18:19 +01:00
themode
86908fbd0e Remove Argument redirect API (should use NodeMaker instead) 2021-02-11 03:09:00 +01:00
themode
053ef06ee1 Cleanup (moved some packet methods to DeclareCommandsPacket) and added CommandResult#getInput 2021-02-11 03:00:13 +01:00
themode
1a2fd4f743 Added NodeMaker + ArgumentCommand 2021-02-11 02:51:42 +01:00
themode
601ee71744 Fix invalid argument being considered as "successful" execution 2021-02-11 01:45:35 +01:00
themode
779490064e Root node should be at index 0 (to facilitate the future ArgumentCommand) 2021-02-11 00:58:10 +01:00
themode
dffb90e1b4 Fix CommandDispatcher#findCommandResult never returning null, + cleanup 2021-02-11 00:33:55 +01:00
themode
266c4d9bed ArgumentEntity static fields naming fix 2021-02-11 00:29:31 +01:00
themode
eda821c3d8 Cleanup + don't verify player name in ArgumentEntity 2021-02-11 00:25:38 +01:00
themode
c11151360b Added ArgumentLiteral 2021-02-11 00:14:29 +01:00
themode
c6e15d4bda Added getters in CommandResult 2021-02-11 00:06:22 +01:00
themode
9fc10bc051 Added CommandResult & moved ParsedCommand 2021-02-11 00:04:42 +01:00
themode
12c0b604db Added boolean for node redirection 2021-02-10 23:09:38 +01:00
themode
2547972459 Deprecate Arguments#getObject 2021-02-10 21:35:18 +01:00
LeoDog896
0ce88102ed Get, has, and set argument redirects 2021-02-09 19:11:27 -05:00
LeoDog896
2330cb7037 And declare it as a set 2021-02-09 18:27:41 -05:00
LeoDog896
c4e6d18ee4 Get commands from appropiate set 2021-02-09 18:26:26 -05:00
LeoDog896
3f5fe7bbd9 Revert command set removal 2021-02-09 18:24:23 -05:00
LeoDog896
7854602a04 Remove unnecessary toNodes wrapper 2021-02-09 13:21:25 -05:00
LeoDog896
de5e8e3e67 Cleanup 2021-02-09 12:24:50 -05:00
LeoDog896
becd876dcd Put getNumberProperties into Number arg 2021-02-09 10:58:27 -05:00