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
themode
66fc6779b6
Dynamic arguments now also have an optional dynamic restriction
2020-11-07 03:40:37 +01:00
jglrxavpok
d83bec4732
Let users change extension jar after unload, then load it again
2020-11-06 16:03:08 +01:00
themode
b296b103c1
CommandCondition command string can be null if a new command packet is built
2020-11-04 05:19:30 +01:00
themode
9781e380b9
Command syntaxes can now contain a CommandCondition
2020-11-04 04:45:46 +01:00
themode
b84bcde84d
Fixed Argument#useRemaining creating an empty array
2020-11-03 23:31:26 +01:00
themode
96dcd0e27f
Incredibly hard update to 1.16.4
2020-11-03 02:16:32 +01:00
themode
1c6070a1b2
Added an unknown command callback
2020-11-02 04:13:43 +01:00
themode
2e0c5a72b7
Added optional additional data in Permission#isValidFor
2020-11-02 02:53:12 +01:00
themode
6d29f955e4
More comments for the command API, Arguments methods are NotNull since id should not be decided at runtime
2020-10-30 18:43:14 +01:00
themode
872dccd7ce
Small cleanup
2020-10-29 22:52:07 +01:00
themode
c887392a91
CommandDispatcher comments for maintenance purpose and fixed all code warnings
2020-10-29 19:51:10 +01:00
themode
384df073a8
Fixed synchronization issue when adding/removing scheduled tasks
2020-10-29 19:20:25 +01:00
themode
c8d1a30486
Improved Argument comments
2020-10-29 17:27:40 +01:00
LeoDog896
75f8396d32
Expose ArgumentWord restrictions as protected
2020-10-28 11:09:40 -04:00
themode
617d3cc89f
Removed check for manager getters
2020-10-28 13:19:34 +01:00
themode
fb098fe4f9
Command arguments can be null
2020-10-28 02:42:40 +01:00
themode
907b10604b
Fixed arguments values not being forwarded
2020-10-28 01:55:44 +01:00
themode
c3cfad22fc
dispatcher will find the correct syntax with the most arguments count
2020-10-28 01:29:05 +01:00
themode
57e33c63a0
Allowing shared arguments being instanced multiple times
2020-10-28 01:14:05 +01:00
themode
d49ddc52b6
Nodes in command can now be shared with each other
2020-10-28 01:02:12 +01:00
themode
cb28fdc208
Annotations for data & command
2020-10-24 16:58:27 +02:00
themode
3cb880cf80
General cleanup
2020-10-22 12:55:53 +02:00
themode
b2e3d3e78d
Use negative entity id for the custom breaking system
2020-10-19 11:56:26 +02:00
themode
ac362cf7ac
Explanation for ResponseDataConsumer ang general comment cleanup
2020-10-17 13:24:18 +02:00
themode
3e4ccbe75a
Usage sample for every Argument
2020-10-17 11:29:05 +02:00
themode
6217280466
Added ArgumentNbtCompoundTag and ArgumentNbtTag
2020-10-17 08:18:52 +02:00
themode
0b6a063311
Added support for CustomPotionEffect in PotionMeta
2020-10-16 16:32:57 +02:00
themode
512b30e9df
Added ArgumentItemStack
2020-10-16 14:31:15 +02:00
themode
660a67e53e
English fix
2020-10-15 21:16:31 +02:00
themode
59b03bf9ec
Detailed explanation of Argument, and basic comments for CommandSyntax
2020-10-15 15:19:07 +02:00
themode
8d21352d5f
CommandDispatcher internal comments
2020-10-15 14:36:21 +02:00
themode
50326b676c
Added PotionEffect
2020-10-15 05:29:48 +02:00
themode
0e5831cdc3
Cleanup + typo fix
2020-10-13 12:49:29 +02:00
themode
cbe2a0b71e
Comments
2020-10-12 02:56:30 +02:00
themode
5f7261cd6e
Comments
2020-10-11 18:35:32 +02:00
themode
8badd5bb4d
Fix invalid javadoc format
2020-10-11 17:05:02 +02:00
themode
e783d33767
Fix comment typo in Command
2020-10-11 15:42:22 +02:00
themode
f2004f1ecd
More comments for the command API
2020-10-11 15:27:23 +02:00
themode
28332cd09d
Command comments
2020-10-08 01:28:40 +02:00
themode
af369dedde
Added Command global listener
2020-10-08 01:21:15 +02:00
themode
f811f1efef
Comments cleanup
2020-10-06 21:03:00 +02:00
Articdive
29c6d92bdc
Final for enums and some annotations.
2020-09-29 21:45:16 +02:00
themode
5620e9a8cf
Cleanup
2020-09-24 01:50:25 +02:00
jglrxavpok
b6fc3ee978
Publish with Javadoc & Sources
2020-09-20 15:04:07 +02:00
themode
8b30caa8c8
Micro optimization + cleanup
2020-08-19 01:24:51 +02:00
jglrxavpok
a7139d19b6
Merge branch 'permission-api'
2020-08-10 21:43:15 +02:00
Felix Cravic
63ed21380c
Fixed number arguments
2020-08-09 10:59:12 +02:00
Articdive
856d328668
Small optimizations.
2020-08-08 13:41:25 +02:00
Felix Cravic
981d247f02
Fixed CommandProcessor commands, allow to disable writing tracking
2020-08-04 06:28:21 +02:00
Felix Cravic
aecf0f427a
Added dynamic arguments for Command (allow for server tab completion)
2020-08-04 06:14:42 +02:00
Felix Cravic
baccc36ed7
Allow ask_server tab complete for CommandProcessor
2020-08-04 04:21:11 +02:00
Felix Cravic
c74ce2752c
Cleanup
2020-08-03 10:35:46 +02:00
Felix Cravic
dfa4cb8b37
Cleanup + comments
2020-08-03 06:36:42 +02:00
Articdive
4b47245c90
Improve ArgumentNumber.
2020-08-01 07:35:16 +02:00
jglrxavpok
5a8f58d9dd
oops wrong javadoc
2020-07-31 22:38:03 +02:00
jglrxavpok
4782d6e899
Fixed inconsistency between hasPermission(Permission) and hasPermission(Class)
2020-07-31 22:37:47 +02:00
jglrxavpok
1772b94114
Start of Permission API
2020-07-31 22:31:58 +02:00
Felix Cravic
5c1e6e7572
Cleanup
2020-07-23 07:36:49 +02:00
Felix Cravic
189376f951
Cleanup + javadoc comments
2020-07-21 18:48:15 +02:00
Felix Cravic
287f7e64a3
Added command javadoc
2020-07-21 18:04:02 +02:00
Felix Cravic
c8f2c9c078
Remove command generic + WIP target selector
2020-07-14 13:35:07 +02:00
Felix Cravic
87ab850945
Comment + EntityFinder WIP
2020-07-11 14:16:36 +02:00
Felix Cravic
e8cd68bc3b
Fixed command range argument
2020-07-11 00:38:39 +02:00
Felix Cravic
17d638d460
Added ArgumentIntRange & ArgumentFloatRange
2020-07-10 23:51:38 +02:00
Felix Cravic
e4ad66fcde
Added a bunch of new command arg types
2020-07-10 22:50:05 +02:00
Felix Cravic
23826a0842
Reworked command packet
2020-07-10 18:12:29 +02:00
Felix Cravic
ccf8038f62
CommandBuilder is now integrated in Minestom directly
2020-07-10 16:37:18 +02:00
jglrxavpok
82c2af88a0
Actually shutdown Minestom when MinecraftServer.stopCleanly()
is called
2020-07-01 21:03:53 +02:00
Felix Cravic
37440c51cf
Added CommandSender#isPlayer and CommandSender#isConsole
2020-06-22 00:48:12 +02:00
Felix Cravic
eba5c5ae3a
Added CommandSender and ConsoleSender
2020-06-21 14:01:03 +02:00
Felix Cravic
6254ec93e9
Proper List#toArray array initialization
2020-05-25 12:25:39 +02:00
Felix Cravic
97bd1ecdb1
Cleanup
2020-05-23 04:20:01 +02:00
jglrxavpok
9d9c158af0
Added event callbacks to Instance, and organized events into packages
2020-05-07 15:46:21 +02:00
Felix Cravic
0354a60635
Added Enchantment & PotionType enum + PlayerCommandEvent call
2020-04-29 19:23:47 +02:00
Felix Cravic
18019277e6
Update
2020-04-26 06:34:08 +02:00
Felix Cravic
cbffd37c8e
Added aliases support to CommandProcessor
2020-04-25 23:51:45 +02:00
Felix Cravic
7daac5e610
Package rename to net.minestom.server
2020-04-24 03:25:58 +02:00