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
LeoDog896
bedc91427e
Remove repetitive Set
...
The Map of commands already stores 2 lists, and making another one for the sake of it actually decreases readability.
2021-02-09 10:40:04 -05:00
LeoDog896
79ec9e6569
Add null checks for aliases
2021-02-09 09:26:53 -05:00
LeoDog896
3d74e74b9e
Use redirection for aliases instead of repetition
2021-02-09 09:25:18 -05:00
LeoDog896
6b4c514254
Fix imports
2021-02-09 07:26:32 -05:00
LeoDog896
f20d8941a5
Put simpleArgumentNode into Argument
2021-02-08 21:03:55 -05:00
LeoDog896
b770710e0d
Redo argsValues
...
(Until / if theres a better solution)
2021-02-08 20:59:46 -05:00
LeoDog896
01b4a1b582
Allow time unit to be omittable
2021-02-08 19:45:25 -05:00
LeoDog896
7705c03500
Use Array for validation
...
Unless something goes absolutely terribly and in fact void wrong the ArgumentValidation should be fine.
2021-02-08 19:33:56 -05:00
LeoDog896
8d7cce3044
Use collections for the correct situations
2021-02-08 19:11:47 -05:00
LeoDog896
e809e69a07
Use protected COMMAND_MANAGER field
2021-02-08 18:54:55 -05:00
LeoDog896
f300d60411
Prefer primitives over list
2021-02-08 18:33:01 -05:00
LeoDog896
4379f4b1e1
Outsource node building to other classes
2021-02-08 18:25:10 -05:00
themode
04c792c302
Fix javadoc
2021-02-08 04:10:43 +01:00
themode
004b4563c2
Replace NbtCompound to CommandData
2021-02-08 04:08:22 +01:00
themode
3c7bbc9d2d
Added initial command return support
2021-02-08 03:42:35 +01:00
themode
5a308f0ced
Added deprecation warning for most Arguments methods
2021-02-06 19:38:59 +01:00
themode
3e990bb716
Ignore INTERACT_AT packet, remove buggy console prefix
2021-01-24 15:44:18 +01:00
themode
b5a01d6571
Add indicator in the console to display command support
2021-01-21 11:37:54 +01:00
Tyan
855c8af455
Added ExceptionManager for custom exception handling
2021-01-20 11:43:45 +01:00
themode
240a745830
Prevent runtime exception when passing an array with null values in ArgumentWord
2021-01-19 06:27:58 +01:00
LeoDog896
fec05d6838
More fastutil usages
2021-01-15 16:04:57 -05:00
LeoDog896
3b3a86a402
Prefer nullable over optional
2021-01-15 13:39:12 -05:00
LeoDog896
3514547610
Fix isEmpty check in ColoredText
2021-01-15 13:26:12 -05:00
LeoDog896
3536bdc856
Microoptimization cleanup
...
Just some small microoptimizations including preferring fastutils, Removing unnecessary checks already dealt with using @NotNull, all since I had extra unplanned free time.
2021-01-15 11:08:11 -05:00
themode
14d0149276
Fix boolean argument
2021-01-11 02:57:18 +01:00
themode
d7fec0297f
Fix argument callback with 0 correct argument
2021-01-11 01:54:59 +01:00
themode
2cf9e55f7b
Trim argument name
2021-01-09 06:53:55 +01:00
themode
4a0302892e
Added static parser for ArgumentEntity
2021-01-09 03:40:53 +01:00
themode
9aaecceb01
Added support for player name only
2021-01-09 03:31:24 +01:00
themode
d0bf6d9f0d
Improve ArgumentString parsing + add apache commons-text dependency
2021-01-09 03:14:10 +01:00
themode
a6e5dbc60e
Fix permission level to use the target selector
2021-01-09 02:20:55 +01:00
themode
ac1fa4cb9e
Fix selector variables list and use a switch
2021-01-09 01:13:44 +01:00
themode
8f99753235
WIP entity selector argument
2021-01-09 00:59:03 +01:00
themode
ef1afb9cd9
WIP EntityFinder
2021-01-08 23:47:31 +01:00
themode
1c65b36087
Rework of ArgumentCallback to be more robust, allowing to simplify all argument types in order to be used out of the command framework for general parsing.
...
Also removed magic space string, replaced with constant from commons apache library
2021-01-08 03:07:37 +01:00
themode
2634105ad1
ArgumentWord restrictions should be part of the correction instead of the condition
2021-01-05 21:54:17 +01:00
themode
9546caca04
Fix build
2021-01-05 18:16:44 +01:00
themode
3a7ae11c56
Add CommandSender as param in onDynamicWrite
2021-01-05 18:04:28 +01:00
themode
dad642a6a2
Allow retrieving argument value using the argument object instead of the String id
2021-01-02 17:24:26 +01:00
themode
bfad3b8d7c
Allow wrappers for Arguments by making the Map protected
2021-01-02 17:11:27 +01:00
themode
82631fc6f8
Comments for the optional argument support
2021-01-02 16:09:20 +01:00
themode
4bf120b714
Added support for command syntaxes with optional arguments (default values)
2021-01-01 23:36:53 +01:00
Matt Worzala
46ac38d5b3
Change ColoredText usages to JsonMessage
2020-12-31 13:53:21 -05:00
themode
f7d1bd7e53
Merge remote-tracking branch 'origin/master'
2020-12-29 00:04:27 +01:00
themode
cecf6310ca
Added Entity#setPose
2020-12-29 00:04:15 +01:00
Matt Worzala
071a2ce196
Change ArrayList types to List
2020-12-28 14:57:39 -05:00
Archy-X
e911612ad6
Add onWrite method with CommandSender in CommandProcessor
2020-12-28 10:59:18 -07:00
TheMode
460813b6e0
Added dots
...
Signed-off-by: TheMode <themode@outlook.fr>
2020-12-21 13:44:58 +01:00
themode
b9a0a761c4
Fixed CommandManager#execute not throwing NPE
2020-12-15 09:30:09 +01:00
TheMode
a9013634ac
Fix dot
...
Signed-off-by: TheMode <themode@outlook.fr>
2020-12-14 07:40:21 +01:00
themode
b062315efb
Consolidate ChatColor immutable state
2020-12-14 01:03:12 +01:00
Felix Cravic
5e85c0117a
Cleanup
2020-12-12 06:13:50 +01:00
Felix Cravic
00c144b592
Rework of the permission API
2020-12-10 02:56:56 +01:00
KrystilizeNevaDies
f54dc4efe5
Style fixes + Imports
2020-12-10 01:10:46 +10:00
CmdrNorthpaw
df536f9aaf
Function in CommandSender to send ColoredText ( #75 )
...
* Send ColoredText messages to CommandSender
* Only send ColoredText if this is a player
* Documentation!
2020-12-10 01:09:29 +10:00
TheMode
ea3021ea69
Console command doesnt need to start with the command prefix
...
Signed-off-by: TheMode <themode@outlook.fr>
2020-12-09 06:30:15 +01:00
Felix Cravic
3c0fa42758
Precision in the documentation, syntax argument count needs to be higher than 0
2020-12-05 16:19:54 +01:00
Felix Cravic
369910aea4
Fixed a terrible typo
2020-12-01 18:52:37 +01:00
Felix Cravic
75e3ffde8d
Comments for FollowTargetGoal
2020-11-29 22:19:13 +01:00
Felix Cravic
b6aa81bbbf
Prevent adding a command syntax without any argument
2020-11-29 21:34:54 +01:00
Felix Cravic
cac3c29e41
Added block command argument type
2020-11-27 11:24:32 +01:00
Eoghanmc22
6d203b975e
Merge branch 'master' of https://github.com/Minestom/Minestom
2020-11-25 19:06:45 -05:00
Felix Cravic
431d20ef73
Fixed syntax starting with an unspecified length argument
2020-11-26 00:57:01 +01:00
Eoghanmc22
296d645400
Merge branch 'master' of https://github.com/Minestom/Minestom
...
Conflicts:
src/main/java/net/minestom/server/benchmark/BenchmarkManager.java
2020-11-25 11:29:50 -05:00
Felix Cravic
7bbb095156
Fixed Player#setInstance not refreshing chunks when already in an instance
2020-11-24 22:56:12 +01:00
Felix Cravic
daa72719a0
Specify that ASK_SERVER is required for dynamic write callback
2020-11-22 23:04:06 +01:00
Felix Cravic
0705ab34ed
Allow custom suggestion type with ArgumentDynamicWord
2020-11-22 22:58:14 +01:00
Eoghanmc22
6fd401589c
slightly optimize CommandManager
2020-11-20 08:07:09 -05:00
jglrxavpok
0a4bb5ab08
Merge branch 'extensions-v2'
...
# Conflicts:
# src/main/java/net/minestom/server/extensions/Extension.java
# src/main/java/net/minestom/server/extensions/ExtensionManager.java
# src/main/java/net/minestom/server/extras/selfmodification/MinestomRootClassLoader.java
2020-11-18 09:13:30 +01:00
themode
37a626121b
Set the default thread provider thread count to PROCESSORS*2
2020-11-17 02:56:55 +01:00
themode
c755dcfb0c
Prevent permanent loop for console commands
2020-11-17 02:43:20 +01:00
themode
0abedd7453
Optimization to prevent permanent map lookup
2020-11-14 09:02:29 +01:00
themode
da94942bad
Created PermissionHandler
2020-11-14 07:06:46 +01:00
themode
1a8baf36f6
Prevent command override using CommandManager
2020-11-14 01:39:51 +01:00
themode
6e77bb8358
Improved demo commands clarity
2020-11-12 03:09:36 +01:00
themode
dde3430010
ArgumentRelative comment
2020-11-11 04:24:09 +01:00
themode
d520a0ebc4
Created ArgumentRelativeVec to prevent code duplication
2020-11-11 03:31:15 +01:00
themode
6cbe656b15
Added "semi-relative" location argument support
2020-11-11 02:11:28 +01:00
themode
78bf5dda05
Comments for the relative location arguments
2020-11-10 23:31:35 +01:00
themode
ad357d70fc
Added ArgumentRelativeBlockPosition, ArgumentRelativeVec3 and ArgumentRelativeVec2
2020-11-10 23:16:35 +01:00
themode
3ddca82aaa
Cleanup 2
2020-11-10 08:01:27 +01:00
themode
e583f21b74
Fixed client crashing when pinging with an older client
2020-11-09 03:21:18 +01:00
themode
a574c1fe2a
Close the command scanner once stopped
2020-11-07 22:58:19 +01:00
themode
1d30e6e953
Use the Validator interface when possible for readability
2020-11-07 04:28:50 +01:00
themode
b2097a338d
Added comments for Argument constructors
2020-11-07 03:45:25 +01:00