Commit Graph

409 Commits

Author SHA1 Message Date
TheMode
47c7e36b1d Fix remaining errors 2021-05-24 23:39:22 +02:00
Articdive
a95a89932e
Remove CustomBlock and fix some compiler errors. 2021-05-24 22:51:34 +02:00
TheMode
0a9fa31804
Merge pull request #275 from Minestom/respect-client-chat-settings
Respect client chat settings
2021-05-17 16:21:08 +02:00
TheMode
36942708bb Introduce EventGroup 2021-05-13 09:11:02 +02:00
Arne Dalhuisen
29b0f5448d Moved EquipmentSlot out of equipment packet 2021-05-11 14:10:45 +02:00
TheMode
920a36399f Merge branch 'master' into event-api 2021-05-11 04:53:03 +02:00
TheMode
8b98472ddf Ignore case for generated string arguments 2021-05-07 21:55:49 +02:00
Kieran Wallbanks
37f0f797fd Add ability to mimic messages from a player with the echo command 2021-05-06 16:40:31 +01:00
Kieran Wallbanks
a43c0e1291 Modify OpenToLANConfig method names 2021-05-05 16:18:11 +01:00
Kieran Wallbanks
2968ea2513 Debug cleanup, expose session ID 2021-05-05 16:18:11 +01:00
Kieran Wallbanks
17d584a2e3 Swap to SocketAddress 2021-05-05 16:18:11 +01:00
Kieran Wallbanks
94ecb8de7b Add Query system 2021-05-05 16:18:11 +01:00
Kieran Wallbanks
01fe452783 Implement OpenToLAN system 2021-05-05 16:18:11 +01:00
Kieran Wallbanks
462397d102 Remove Named and Identified interfaces 2021-05-05 16:18:11 +01:00
Kieran Wallbanks
a15e3aef44 Make legacy server pings use the ServerListPingEvent 2021-05-05 16:18:11 +01:00
Kieran Wallbanks
42e1811b7c Switch to per-version response data generation and implement NamedAndIdentified in ResponseData 2021-05-05 16:18:11 +01:00
Németh Noel
7494c5ac58 Added default entity type 2021-05-04 02:20:24 +02:00
TheMode
e45c60c225 Initial revamped event listening API 2021-05-04 00:46:18 +02:00
Németh Noel
6ac0bc831a Added entity class argument 2021-05-01 02:55:46 +02:00
TheMode
c86fafe811 Demo server cleanup 2021-04-30 23:15:34 +02:00
TheMode
2aba4c49f6 Change stresstest to profile per-instance thread 2021-04-20 10:18:48 +02:00
TheMode
e342dd2b70 Merge branch 'master' into acquirable 2021-04-18 15:23:09 +02:00
TheMode
6357eb6329 Use shared instance to do not run out of memory 2021-04-18 10:57:16 +02:00
TheMode
e9f13d0a82 WIP dynamic chunk thread change 2021-04-18 06:29:44 +02:00
TheMode
2e4a443bec Use multiple instances in the demo server 2021-04-18 02:35:17 +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
b5add32ad6 Added AcquirableCollection + waiting time monitor 2021-04-15 09:51:37 +02:00
TheMode
b066b6029a
Merge pull request #223 from thiccaxe/master
Add events for STATUS packets.
2021-04-15 07:10:32 +02:00
TheMode
a55ae4d048 Cache unmodifiable players set, remove print 2021-04-13 21:39:42 +02:00
TheMode
f98bfe702c Print tick time on header 2021-04-12 04:12:21 +02:00
TheMode
bba9c70586 Fix merge 2021-04-12 00:45:37 +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
8e9d7098e5 Allow custom transaction type, simplify inventory superclasses 2021-04-12 00:33:27 +02:00
TheMode
ecb77fc847 Rename FillOption to TransactionOption 2021-04-12 00:07:38 +02:00
TheMode
1100aa98a5 Annotation & comment 2021-04-12 00:04:40 +02:00
TheMode
d86a733b79 WIP FillOption 2021-04-11 23:43:35 +02:00
thiccaxe
fadbe39494 Getters for fields in HandshakeData 2021-04-11 10:46:09 -07:00
TheMode
c7cd8c332a Rename meta package to metadata to limit breaking changes 2021-04-11 19:13:50 +02:00
TheMode
792dd9787f Remove ItemStore API until a stable solution is found 2021-04-11 17:01:05 +02:00
thiccaxe
8a9abff98b Remove Duplicate Code; unlinking ResponseData & ServerListPingEvent
Removed code that would cause maintaining more difficult after an update in ResponseData, and additionally PlayerConnection

Updated demo to reflect changes.
2021-04-10 21:14:36 -07:00
TheMode
e0c2c4b655 Support for canPlace & canDestroy meta 2021-04-11 00:42:09 +02:00
TheMode
5adbc287b3 Added TickMonitor 2021-04-11 00:09:01 +02:00
TheMode
d6e7c9a635 Handle nbt directly inside builders instead of lazily 2021-04-09 23:57:05 +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
e4a26df2b6 Rename ItemMeta#nbt, remove unnecessary cache 2021-04-09 23:16:57 +02:00
thiccaxe
b086dc82ca Remove extra code in FakePlayerConnection, add refershServerInformation back 2021-04-08 18:20:23 -07:00
thiccaxe
94c4ec79e1 simplify data storage, fix annotations
Removed HandshakeData  - too excessive

Added abstract methods in PlayerConnection as replacement

in FakePlayerConnection setters do nothing and Getters return MinecraftServer defaults
2021-04-08 16:51:50 -07:00
thiccaxe
cad128a393 update demo to show example
may be cut down later as it is very excessive.
2021-04-08 14:41:22 -07: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
LeoDog896
0e4168ba45 Add ArgumentMap 2021-04-06 22:07:38 -04:00
thiccaxe
02538f0d31 Update Demo
reflect changes new deprecations in demo.
2021-04-04 18:58:05 -07:00
thiccaxe
7c0fcadd4f Add HandshakeEvent 2021-04-04 16:26:58 -07:00
thiccaxe
4f8e94dcf2 Note about favicon format 2021-04-04 15:57:42 -07:00
thiccaxe
cf4a8756ef StatusRequestEvent
Added basic event

notes:
 - minestom will only accept the 1.16.5 protocol version, as of now there is no way to get the protocol version from the event. Assume 1.16.5

- there is also no way to currently get the address the client used to ping the server, as that is sent in another packet and minestom does not currently pass that data through.

 - favicon appears to not be working
2021-04-04 15:43:19 -07:00
themode
5a5531723c Fix original nbt overwriting modified meta 2021-04-04 21:34:48 +02:00
themode
d6b6d41f41 Fix Inventory not using a Component as title 2021-04-04 15:33:53 +02:00
themode
ca41365453 Added some useful store methods 2021-04-03 19:35:03 +02:00
themode
dfa7d712c2 Initial ItemStore support 2021-04-03 19:08:07 +02:00
themode
4741c932a0 Add ItemTag 2021-04-03 15:45:46 +02:00
themode
f52e10c2b2 Added InventoryModifier#replaceItemStack 2021-04-03 15:01:36 +02:00
themode
785e002a50 Improve documentation 2021-04-03 00:21:23 +02:00
themode
4a075da3e0 Ensure that the meta is new when instantiating from NBT 2021-04-02 22:40:24 +02:00
themode
a128d30b6b WIP Item rework implementation 2021-04-02 18:13:02 +02:00
themode
a70870d261 Added ItemMetaBuilder.Provider 2021-04-02 15:42:58 +02:00
themode
042c7c864b Added covariant return type + enchantment 2021-04-01 22:52:28 +02:00
themode
066b041bba Allow to directly pass an ItemMeta 2021-04-01 20:06:10 +02:00
themode
cbfeb4e15b WIP meta support 2021-04-01 20:02:03 +02:00
themode
0ab66113c8 WIP item meta API 2021-04-01 19:08:21 +02:00
themode
5807da47a6 Update annotations + add example 2021-04-01 00:20:59 +02:00
jglrxavpok
930054385f More packets, just missing ChunkDataPacket 2021-03-30 19:50:55 +02:00
jglrxavpok
07ab4ac090 Most client packets are writtable, same for server packets and readability 2021-03-30 19:46:20 +02:00
jglrxavpok
43957805fd Handshake and login packets, even more readable server packets 2021-03-30 19:42:40 +02:00
jglrxavpok
7b8a8e3eb0 Tests to check which packets fail to write then read properly 2021-03-30 19:37:43 +02:00
themode
dedd807ceb Enabled compression by default, provide .editorconfig file 2021-03-27 19:44:09 +01:00
TheMode
ea3f558d8a
Merge pull request #187 from Kebab11noel/demo-commands
Demo commands
2021-03-26 21:50:25 +01:00
Németh Noel
256ed45fab Added two new commands /summon <entity> <pos> and /remove entities <entities> 2021-03-26 21:32:58 +01:00
Németh Noel
a442603067 Removed deprecated parts, changed conditions and other minor changes 2021-03-26 21:19:53 +01:00
Kieran Wallbanks
b9e35d1cc7 Make Audiences static 2021-03-26 19:28:07 +00:00
themode
6b644d6130 Fix BenchmarkManager not returning a Component 2021-03-26 20:10:42 +01:00
Kieran Wallbanks
c3adf3ff67 Include echo command in demo packages 2021-03-26 17:34:39 +00:00
Kieran Wallbanks
e738efded3 Use Adventure in ArgumentComponent and add demo echo command 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
aea8a5f794 fix compilation issues 2021-03-26 17:34:38 +00:00
Kieran Wallbanks
8b82d61c0c fix demo build 2021-03-26 17:34:38 +00:00
Kieran Wallbanks
35f9161d19 update demos 2021-03-26 17:34:38 +00:00
TheMode
7c63099963
Merge pull request #180 from Project-Cepi/extension-exposing
Extension exposing and cleanup
2021-03-26 18:33:35 +01:00
themode
9c8c8c8bf8 WIP packet allocation improvement 2021-03-26 13:08:05 +01:00
LeoDog896
d2c1284459 Merge remote-tracking branch 'upstream/master' into extension-exposing 2021-03-24 11:59:01 -04:00
themode
fe7b48df48 Added ArgumentResourceLocation 2021-03-24 13:58:44 +01:00
LeoDog896
34a56cf00e Move to Map of Extension 2021-03-24 08:39:47 -04:00
LeoDog896
701b1cb2e5 Move to DiscoveredExtension vs ExtensionDescription
For those who are wondering why I replaced some streams:

https://stackoverflow.com/questions/16635398/java-8-iterable-foreach-vs-foreach-loop
2021-03-23 11:35:52 -04: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
3c7a96dc4a Initial command redirection improvement 2021-03-15 09:01:29 +01:00
TheMode
e333eb3749
Merge pull request #165 from Minestom/command-suggestion
Command framework improvement
2021-03-13 00:59:54 +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
d6683932c8 Added PickupItemEvent#getItemEntity 2021-03-12 20:59:47 +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
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
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
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
bca2434cff Command parsing cleanup + preparation for suggestion & advanced caching 2021-03-10 01:21:33 +01:00
themode
94526b218f Merge branch 'master' into command-suggestion 2021-03-09 22:51:29 +01:00
themode
b155f3bca3 Deprecate Attributes, constants in Attribute should be used instead 2021-03-09 20:51:11 +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
29a8542d3e
Merge pull request #129 from Minestom/improve-extension-system
Improve extension system
2021-03-02 18:22:21 +01:00
TheMode
3971777e56
Merge pull request #155 from RinesThaix/entities
Projectile improvements, custom entity position synchronization cooldown support
2021-03-02 13:38:50 +01:00
Konstantin Shandurenko
de15c4b6c5 Rewriting projectiles 2021-03-01 12:59:16 +03:00
Konstantin Shandurenko
2b6a081c0d Now devs have to explicitly instantiate EntityAIGroupBuilder 2021-02-28 20:07:34 +03:00
Konstantin Shandurenko
57e2bdb5d6 Slightly rewritten EntityAIGroupBuilder 2021-02-27 17:57:30 +03:00
Konstantin Shandurenko
20f581cc11 Merged with master 2021-02-26 06:58:12 +03:00
Konstantin Shandurenko
9e6aaa1088 Removed TestArrow from the demo scene 2021-02-25 12:02:40 +03:00
Konstantin Shandurenko
1115b829a1 EntityAIGroupBuilder 2021-02-24 13:38:42 +03:00
Konstantin Shandurenko
bbe143520e A bit more changes to EntityMeta 2021-02-23 18:37:00 +03:00
Konstantin Shandurenko
237466c90e Removed new entity classes and marked previously existing ones as deprecated 2021-02-23 16:10:14 +03:00
Konstantin Shandurenko
b409eadffa ArgumentEnum and /horse command for demo scene 2021-02-23 09:06:19 +03:00
Konstantin Shandurenko
3bba4ea704 New Entity AI 2021-02-23 02:28:24 +03:00
Konstantin Shandurenko
dbd0e472c2 Added power param for projectiles shooting 2021-02-22 15:54:35 +03:00
Konstantin Shandurenko
714e107eb3 Removed @author javadocs 2021-02-22 14:53:04 +03:00
Konstantin Shandurenko
dbfebc50ec Block collisions for arrows 2021-02-22 14:42:46 +03:00
themode
f1448c8c89 Renamed RelativeLocation#from 2021-02-14 00:31:49 +01:00
themode
efd2dbc021 Fix command argument sharing 2021-02-12 04:34:37 +01:00
themode
5610b1a72a Added ArgumentLoop parsing 2021-02-12 00:25:12 +01:00
jglrxavpok
6addd63396 Fix extension subdependencies not being loaded + Test that J9 modules are supported 2021-02-04 20:40:12 +01:00
jglrxavpok
9ce7a08d12 Extension can check if their code modifiers (including Mixins) loaded correctly 2021-02-04 19:11:43 +01:00
jglrxavpok
ee158c0dea Use Nullable string instead of Optional in MinestomRootClassLoader#findExtensionObjectOwner 2021-02-04 11:57:43 +01:00
jglrxavpok
2a96beb819 Extensions will be unloaded when server is stopped 2021-02-03 20:56:36 +01:00
jglrxavpok
a63e9462c2 All EventHandler remove extension callback when the extension unloads 2021-02-03 20:47:01 +01:00
jglrxavpok
c9d2edef3a Tests for shutdown and delay tasks 2021-02-03 19:35:59 +01:00
jglrxavpok
c8e311855f Auto-unschedule and cancel tasks from extensions 2021-02-03 17:51:14 +01:00
jglrxavpok
eadd4a2b39 Automatically unload GlobalEventHandler callbacks 2021-02-03 17:11:06 +01:00
jglrxavpok
9b9565dbbd Early loading of Mixin and code modifiers
+ System property to disable early loading if necessary
2021-02-02 12:44:57 +01:00
themode
b321a10caa Change the algorithm order of InstanceContainer#setBlock 2021-01-28 16:19:06 +01:00
LeoDog896
3b3a86a402 Prefer nullable over optional 2021-01-15 13:39:12 -05:00
Matt Worzala
ef35a39388
Add Player#openBook (#99) 2021-01-09 12:40:22 +10: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
8871cf16c0 Don't default the permission level 2021-01-09 02:38:26 +01:00
themode
8f99753235 WIP entity selector argument 2021-01-09 00:59:03 +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
d0e94f0ee5 Small demo update 2021-01-07 20:28:07 +01:00
themode
6b39cb1e32 Execute the async login event before sending the login success packet 2021-01-06 19:02:35 +01:00
themode
3a7ae11c56 Add CommandSender as param in onDynamicWrite 2021-01-05 18:04:28 +01:00
themode
7019b7da85 Fix onGround field and gravityTickCount 2021-01-04 03:04:45 +01:00
ThatCreeper
30868df243 Remove unused imports 2021-01-02 17:08:59 -06:00
ThatCreeper
30be7b5b81 Add Potion Add and Remove events 2021-01-02 16:59:17 -06:00
Matt Worzala
46ac38d5b3
Change ColoredText usages to JsonMessage 2020-12-31 13:53:21 -05:00
ThatCreeper
c3d6af3afe make removeEffect send a packet
Make Potion immutable, and use long instead of Long
2020-12-30 19:07:07 -06:00
ThatCreeper
b1cab4ee05 Make /potion use TICK_PER_SECOND 2020-12-30 18:56:56 -06:00
ThatCreeper
6a154eb15a Fix /potion demo command 2020-12-30 18:29:54 -06:00
ThatCreeper
d7883d29ff Rewrite Potions 2020-12-30 18:29:07 -06:00
ThatCreeper
50b44e46e0 Add PotionEffectManager 2020-12-30 17:12:03 -06:00
themode
6e0ad54d5e Added EntityEndCrystal 2020-12-22 05:36:15 +01:00
themode
b5feb35619 Added PlayerDeathEvent to change the death message/text 2020-12-22 05:26:37 +01:00
themode
5224eecdd1 Event unification (type-specific event, CancellableEvent is now an interface) 2020-12-16 03:21:59 +01:00
themode
1742aa6f8a Updated the custom stone block in demo 2020-12-14 05:43:10 +01:00
themode
3cfa216274 Fix intellij auto annotation 2020-12-14 01:45:46 +01:00
themode
8cddf30b9e Annotation for ChunkGenerator 2020-12-14 01:41:08 +01:00
Felix Cravic
a1ee3a28a0 TestPermissions cleanup 2020-12-11 21:50:59 +01:00
Felix Cravic
90102e1562 Permission improvement 2020-12-11 21:42:32 +01:00
Felix Cravic
76c3ea52ac Merge branch 'master' into nbt-permission 2020-12-11 21:37:00 +01:00
Felix Cravic
ac8ba3ab10 Fixed ItemDropEvent and PickupItemEvent constructor + changed PlayerInit event registration to use the global event handler 2020-12-11 04:34:08 +01:00
Felix Cravic
00c144b592 Rework of the permission API 2020-12-10 02:56:56 +01:00
Felix Cravic
654a68092a Simply MainDemo 2020-12-09 22:38:20 +01:00
Felix Cravic
f7c05a445e Remove #copy 2020-12-09 21:34:53 +01:00
Felix Cravic
40787902e3 Small demo code update 2020-12-06 20:20:05 +01:00
Eoghanmc22
338a1737c7 wait for netty to finish shutting down 2020-11-25 20:13:38 -05: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
Eoghanmc22
d1138f9f81 Fix race condition 2020-11-25 11:28:37 -05:00
Felix Cravic
0705ab34ed Allow custom suggestion type with ArgumentDynamicWord 2020-11-22 22:58:14 +01:00
Eoghanmc22
d056fceb8a slightly improve performance and fix memory leak 2020-11-22 12:44:08 -05:00
Eoghanmc22
1af58b1d96 fix Main 2020-11-21 17:08:56 -05:00
Eoghanmc22
04fc38a14f Merge branch 'master' of https://github.com/Minestom/Minestom 2020-11-21 14:59:17 -05:00
themode
48b637cbc8 Fixed player spawn when a respawn point is not specified 2020-11-21 20:56:32 +01:00
Eoghanmc22
f2f0625666 Merge branch 'master' of https://github.com/Minestom/Minestom
 Conflicts:
	src/test/java/demo/PlayerInit.java
2020-11-21 13:23:16 -05:00
Eoghanmc22
926c02b7f5 Small optimizations to netty. 2020-11-21 13:09:03 -05:00
themode
234ac6daf4 Fixed build error 2020-11-21 06:43:12 +01:00
Eoghanmc22
4e11b16ee1 improve performance by 5-10% 2020-11-20 21:58:00 -05:00
Eoghanmc22
cb013f8291 player init 2020-11-20 15:19:20 -05:00
Eoghanmc22
1da7f5da78 Merge branch 'master' of https://github.com/Minestom/Minestom
 Conflicts:
	src/test/java/demo/PlayerInit.java
2020-11-20 12:28:52 -05:00
themode
8d0a24fd55 PlayerInit packet optimization 2020-11-20 18:23:46 +01:00
Eoghanmc22
ee2e141673 implement pooled buffers 2020-11-20 12:16:45 -05:00
Eoghanmc22
9a64a0a409 Merge branch 'master' of https://github.com/Minestom/Minestom
 Conflicts:
	src/main/java/net/minestom/server/entity/Player.java
	src/main/java/net/minestom/server/network/player/NettyPlayerConnection.java
	src/main/java/net/minestom/server/utils/PacketUtils.java
2020-11-20 08:56:58 -05:00
themode
533526d3a5 MainDemo does not require a default write and read speed 2020-11-19 08:48:33 +01:00
Eoghanmc22
f307303758 Netty improvements 2020-11-18 20:28:56 -05:00
Eoghanmc22
618fd2b536 Begin optimizing netty. 2020-11-18 13:39:06 -05:00
jglrxavpok
142b6a69a5 Post-merge fixes 2020-11-18 09:24:59 +01: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
2405b7ae6f KB, not MB 2020-11-17 16:11:59 +01:00