Commit Graph
100 Commits
Author SHA1 Message Date
Shane Freeder a596ff6bdb Fix resource pack api (Fixes #1634) 2018-10-29 13:02:56 +00:00
Shane Freeder 7941af6fec Process chunks blocking main urgently (#1627)
A chunk load on the main thread will be added to the high priority queue, however, due to existing work on this queue, there was no guarantee that the load would occur within a reasonable amount of time, potentially causing a server to crash while waiting for a chunk in the queue

In order to counteract this, a new urgent priority has been added, allowing us to prioritize these tasks over standard chunk gen/loading

(#1625 #1615 #1575 #1558 (and probably more))
2018-10-28 14:40:30 +00:00
Shane Freeder e4a5ddd929 fix "avoid hopper searches" and make it use an obfhelper 2018-10-25 21:27:54 +01:00
Shane Freeder 66c2497101 Revert field order changes in AxisAlignedBB 2018-10-25 17:07:54 +01:00
Shane Freeder 7391c5bbbb Fix javadoc issues 2018-10-25 14:38:19 +01:00
Shane Freeder b6a24ca199 [CI-SKIP] Don't run animal sniffer by default
Changes upstream moved this to a profile a while back, however,
when updating (for some unknown reason) I kept it enabled by default,
however, leaving this enabled breaks building the server in newer
versions of java, which while this wasn't a concern before, is now
an issue for users.
2018-10-24 20:19:29 +01:00
Shane Freeder 18ac1d68c0 Update for Minecraft 1.13.2 2018-10-23 00:16:21 +01:00
Shane Freeder 442538c84f Share the main thread queue for AsyncChunkProvider
fixes an issue in which thread requests are only processed
for the current provider which can cause a deadlock should
multiple requests exist across providers
2018-10-12 15:41:15 +01:00
Shane Freeder ec5b88b7c1 Updated Upstream (Bukkit/CraftBukkit)
Upstream has released updates that appears to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
867794b2 Make setPersistent also control player saving

CraftBukkit Changes:
02518f92 Make setPersistent also control player saving
2018-10-03 20:19:35 +01:00
Shane Freeder 7ac317a863 Fix FileIOThread concurrency issues (fixes #1505)
FileIOThread was using two volatile counters in order to track if
any pending work was in the queue, this causes potential concurrency
issues when this counter is updated from multiple threads, potentially
causing these counters to desync due to the unsafe volatile update
2018-10-03 19:07:08 +01:00
Shane Freeder fc0af24140 Updated Upstream (Bukkit/CraftBukkit)
Upstream has released updates that appears to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
c71bb9ca Add PlayerRecipeDiscoverEvent and methods to (un/)discover recipes

CraftBukkit Changes:
7a2f4867 Implement PlayerRecipeDiscoverEvent and methods to (un/)discover recipes
2018-10-02 11:01:56 +01:00
Shane Freeder eeb1a0e07b Configurable connection throttle kick message (Closes #1515) 2018-10-02 10:00:16 +01:00
Shane Freeder e5959a7bb9 Fix custom flying kick message 2018-10-02 06:54:45 +01:00
Shane Freeder fec83779c6 Cleanup tab completion
During testing, I could not find any case of TabCompleteEvent firing,
however, upon reinspection of the code, and additional testing, this
appears to work fine without any changes on our part.
2018-10-02 06:38:51 +01:00
Shane Freeder 84993e3fca fix newlines in spigot tab list API
Spigots implementation around the header/footer strips newlines from the
header/footer, this patch allows the tab list header/footer to retain newlines.
2018-09-01 11:33:50 +01:00
Shane Freeder 1294a18cf9 fix paper tab list API 2018-09-01 11:09:13 +01:00
Shane Freeder b39ff2b12d Update CB 2018-08-29 17:26:24 +01:00
Shane Freeder fb13965fbf Merge branch 'master' into pre/1.13 2018-08-29 04:07:50 +01:00
Shane Freeder db5a924b1c Fixup AsyncTabCompletionEvent handling 2018-08-28 19:45:14 +01:00
Shane Freeder 26b15531e0 Cleanup javadoc warnings for 1.13 2018-08-17 05:29:16 +01:00
Shane Freeder 1186b23a8d Merge branch 'master' into pre/1.13 2018-08-17 05:10:45 +01:00
Shane Freeder 69928187c9 Cleanup javadoc warnings 2018-08-16 12:20:58 +01:00
Shane Freeder b1f15b91ad Merge branch 'master' into pre/1.13 2018-08-14 16:26:01 +01:00
Shane Freeder 3eaefbe3fc Don't reset current tick based on system time 2018-08-10 15:25:45 +01:00
Shane Freeder 84c52bd9b1 re: Fixup improve tick loop patch 2018-08-09 14:14:17 +01:00
Shane Freeder cde57e0819 Fixup improve tick loop patch 2018-08-09 14:02:05 +01:00
Shane Freeder 87cbe8e40c Fixup keepalive logic (closes #1274) 2018-07-31 16:39:08 +01:00
Shane Freeder 6de5639fe3 Fix misapplied line in keepalive changes 2018-07-31 15:19:18 +01:00
Shane Freeder 897d804c62 Cleanup PortalCreateEvent patch 2018-07-31 15:14:54 +01:00
Shane Freeder a8c3640efd Merge branch 'fix-portal-create-event' of https://github.com/prplz/Paper into pre/1.13 2018-07-31 15:07:41 +01:00
Shane Freeder 09b6ad6501 Merge branch 'master' into pre/1.13 2018-07-31 14:50:40 +01:00
Shane Freeder d72dce83ad Break up and make tab spam limits configurable
Due to the changes in 1.13, clients will send a tab completion request
for all bukkit commands in order to factor in the lack of support for
brigadier and provide backwards support in the API.

Craftbukkit, however; has moved the chat spam limiter to also interact
with the tab completion request, which while good for avoiding abuse,
causes 1.13 clients to easilly be kicked from a server in bukkit due
to this. Removing the spam limit could cause issues for servers, however,
there is no way for servers to manipulate this without blindly cancelling
kick events, which only causes additional complications. This also causes
issues in that the tab spam limit and chat share the same field but different
limits, meaning that a player having typed a long command may be kicked from
the server.

Splitting the field up and making it configurable allows for server owners
to take the burden of this into their own hand without having to rely on
plugins doing unsafe things.

This patch has been applied to 1.12.2 in order to allow people using
plugins which allow clients of newer versions to connect, this is
not a common practice, however is being done as a level of nicety
given the current status of 1.13
2018-07-31 13:53:49 +01:00
Shane Freeder 5abfd8100e Update CB/S 2018-07-28 03:38:13 +01:00
Shane Freeder 9629d65220 Fix EntityDismountEvent changes
While upstream has now made this event cancellable, their changes
result in the vechicle being removed before the event is called,
thus leading cancellation to not behave as expected.
2018-07-26 18:41:00 +01:00
Shane Freeder ff4fc52552 Update B/CB/S 2018-07-26 16:20:37 +01:00
Shane Freeder 10ed7dc6b4 Explictly reset chat format in vanilla scoreboard display (fixes #1263)
Vanilla now uses chat components for scoreboards, thus no longer
returns a string which also resets the chat the chat format, add
this back ourselves.
2018-07-25 09:58:03 +01:00
Shane Freeder ceedd8c4f1 Update S
Also drop a few patches which are no longer needed/already merged in.
2018-07-23 18:21:07 +01:00
Shane Freeder fea7cd7e3c Avoid ArithmeticException should server be stopped before worlds are loaded
Our changes for the spawn radius have the potential to throw an ArithmeticException
should the server be stopped before we've loaded worlds, we check if the server is
running earlier to check if we should even consider attempting to load chunks, which
would cause us to, 1) not load chunks anyways, as we're disabled; 2) throw an
ArithmeticException due to us expecting that we're going to be loading more than 0 chunks.
2018-07-23 10:24:51 +01:00
Shane Freeder 0c14fc6ee6 Update B/CB/S 2018-07-23 09:39:55 +01:00
Shane Freeder 7dd591d1a6 update B/CB/S 2018-07-20 20:57:43 +01:00
Shane Freeder 62511066e1 Merge branch 'master' into pre/1.13 2018-07-19 20:23:18 +01:00
Shane Freeder d8f0bdc3d9 Update CB 2018-07-19 19:43:08 +01:00
Shane Freeder bd34c3623b NOT FINISHED! She compiles, and she... suffers the wrath of chunkgen... 2018-07-19 05:42:43 +01:00
Shane Freeder aea45cba34 NF! 1.13 - more fixes 2018-07-19 00:31:45 +01:00
Shane Freeder 20e3b69061 NOT FINISHED! 1.13 pre-7
I need more creative commit messages.
2018-07-19 00:16:19 +01:00
Shane Freeder 37f7038e10 NOT FINISHED! 1.13 pre-7 - Holy moley, more patches!
Really, don't touch! may harm your cat!
2018-07-18 19:55:52 +01:00
Shane Freeder 68f8952459 NOT FINISHED! restore dropped patches, fix one more! 2018-07-18 01:37:30 +01:00
Shane Freeder 3cb169aa7c NOT FINISHED! 1.13-pre7 - even more patches!
Patches, patches everywhere!
2018-07-18 01:08:13 +01:00
Shane Freeder c8d8659ad3 NOT WORKING! Even even more patches! 2018-07-17 21:32:05 +01:00
Shane Freeder 828dea48de NOT FINISHED! Fixed a few decomp issues 2018-07-17 16:14:23 +01:00
Shane Freeder e7cf7c9168 NOT FINISHED! even more 1.13-pre patches! 2018-07-16 21:08:09 +01:00
Shane Freeder 93a7205ba8 NOT FINISHED!!! More progress on 1.13-pre7
This work is unfinished, keep your paws off this branch!
2018-07-16 16:34:55 +01:00
Shane Freeder 7754b35d8f Don't send digged block updates for unloaded chunks 2018-07-12 15:19:33 +01:00
Shane Freeder 5ef91b3293 hopefully fix entity issues - #1199
@Aikar
2018-07-09 19:48:49 +01:00
Shane Freeder 702bbe6f8a Cleanup allocated favicon ByteBuf (fixes #1191)
Cleanups a bytebuffer which was allocated during the encoding of the
favicon to be sent to the client.
2018-07-03 19:19:47 +01:00
Shane Freeder 9d16e77b90 Extend Player Interact cancellation to handle FlowerPots 2018-07-03 04:33:21 +01:00
Shane Freeder 1470add5c4 Fix compat with PluginClassloader implementations 2018-06-12 16:10:01 +01:00
Shane Freeder 4d3ec19658 [CI-SKIP] Fix comment on unlit chunk sending patch 2018-06-12 15:46:08 +01:00
Shane Freeder d8e8748f70 Fix missed change inside of CraftSkullMeta 2018-06-10 12:45:04 +01:00
Shane Freeder 50eaba9503 Cleanup last commit (Remember, always git diff!)
Because the one time you don't...
2018-06-09 20:03:42 +01:00
Shane Freeder 6812a948db Only close classloaders unless implict, reload or error on enabling (Closes #1120)
We also expose the control of this behavior to the API, while retaining
the old behavior unless implictly requested.
2018-06-09 18:58:04 +01:00
Shane Freeder 056199bd92 Add EntityTeleportEndGatewayEvent for entities (closes #1124) 2018-06-09 14:21:40 +01:00
Shane Freeder 463d2a2bc0 Allow plugins to replace texture if already set on skulls 2018-06-09 12:09:21 +01:00
Shane Freeder f6f8ff278f Update B/CB 2018-05-08 23:09:45 +01:00
Shane Freeder 45f29dbd99 re-revert Better reloading of pending unload chunks 2018-04-18 13:03:59 +01:00
Shane Freeder 72bd990d87 Allow logger instances to be used across reloads 2018-04-08 02:02:48 +01:00
Shane Freeder 0ed67b50a3 remove warning for custom entities in precreaturespawn (closes #1069)
There can be no survivors.
2018-04-08 01:44:14 +01:00
Shane Freeder 492ed12781 revert "Better reloading of pending unload chunks"
This change by spigot ensures that many interactins with chunks,
e.g. getting a list of TEs will cause the chunk to be marked for not
unloading and will block their unload. This is especially true for
servers using Timings (it needs to access the TE list of chunks), or
any plugins which need to access entity/TE lists periodically.
2018-04-08 01:26:37 +01:00
Shane Freeder 4502a946d7 Flag to disable the channel limit
In some enviroments, the channel limit set by spigot can cause issues,
e.g. servers which allow and support the usage of mod packs.

provide an optional flag to disable this check, at your own risk.
2018-03-31 17:07:09 +01:00
Shane Freeder 75a9b9e07d Delay initial ping sent to the client 2018-03-31 15:27:41 +01:00
Shane Freeder 1872a94c83 Update CB/S 2018-03-31 10:34:25 +01:00
Shane Freeder d0ccbd3161 Return null instead of players location on EnderChests opened by plugins 2018-03-10 20:26:05 +00:00
Shane Freeder d207b66009 Add OBFHELPER - InventoryEnderChest#getTileEntity 2018-03-10 17:11:51 +00:00
Shane Freeder 3af34bfe45 Fix NPE when getting location from players EnderChest (fixes #1041) 2018-03-10 13:07:40 +00:00
Shane Freeder db23ad30cb Fix ItemStack.damage OBFHelper (fixes #1036) 2018-03-08 19:41:00 +00:00
Shane Freeder ab5b167d08 Update CB/S 2018-03-08 19:36:35 +00:00
Shane Freeder 11625293d1 [CI-SKIP] The power of MIT compells me 2018-03-07 12:15:43 +00:00
Shane Freeder 9488fd00fc [CI-SKIP] Merge 'Add me (Mystiflow) to MIT list' 2018-03-07 12:13:50 +00:00
Shane Freeder cf2f346ccb Update B/CB 2018-02-24 04:03:32 +00:00
Shane Freeder f10fedcc19 Update CB 2018-02-18 14:41:40 +00:00
Shane Freeder ca86dc72f6 Extend Player Interact to cover CommandBlocks (@Phoenix616) 2018-02-18 14:39:02 +00:00
Shane Freeder 808e2dff16 Update B/CB 2018-02-12 18:04:05 +00:00
Shane Freeder a95873bd35 Close Structure Window when PlayerInteractEvent is cancelled
This is opened on the client, and so we send a CloseWindow packet
2018-02-11 10:52:04 +00:00
Shane Freeder 26144e31b3 Update B/CB 2018-02-08 10:07:27 +00:00
Shane Freeder 6d2da5e46e Update B/CB 2018-01-24 17:31:43 +00:00
Shane Freeder b7c8cb0244 Update B/CB 2017-12-31 13:45:47 +00:00
Shane Freeder 743c6f83d4 Update B/CB 2017-12-30 08:55:15 +00:00
Shane Freeder 77f24f0be5 Update B 2017-12-28 16:56:31 +00:00
Shane Freeder a6be0047d7 Update CB 2017-12-26 00:52:24 +00:00
Shane Freeder 67eb9725e2 Provide a system property to set the keepalive limit
add a system property to allow people to tweak how long the server
will wait for a reply. There is a compromise here between lower and higher
values, lower values will mean that dead connections can be closed sooner,
whereas higher values will make this less sensitive to issues such as spikes
from networking or during connections flood of chunk packets on slower clients,
at the cost of dead connections being kept open for longer.
2017-12-24 13:44:41 +00:00
Shane Freeder 21e410d42e [CI-SKIP] Fix apatch zsh support 2017-12-20 13:17:32 +00:00
Shane Freeder 497103c507 Don't blindly send unlit chunks when lighting updates are allowed
Spigot, by default, disables several mechanisms around how chunks are
lit, if ever, which has forced them to always send chunks before vanilla
would consider them ready to send, causing for lots of issues around
lighting glitches.

Shamefully, the amount of work to relight chunks can be detremental
to some servers, meaning that forcibily disabling light updates can
cause major performance issues.

as such, we make a compromise; if this "feature" is disabled, we will
only send chunks which are actually ready to be sent, otherwise, we
will always send chunks.
2017-12-18 07:37:50 +00:00
Shane Freeder 11635988ce Restore broken lighting logic from spigot 2017-12-18 07:35:42 +00:00
Shane Freeder fd25094445 Update B/CB 2017-12-07 01:07:36 +00:00
Shane Freeder 786d044753 Update B/CB/S 2017-12-05 01:34:10 +00:00
Shane Freeder 149f6e1511 Fix ClassCastException in tabCompletor (fixes #942) 2017-11-27 16:52:32 +00:00
Shane Freeder 2a3e13cc52 Fix javadocs 2017-11-25 17:53:42 +00:00
Shane Freeder ea4b94d62e Do not use a snapshot for hoppers
In 1.12, Spigot improved their blockstate implementation to take a full
copy of the TE, this allows for a much better snapshot in that it will
actually retain all of the TE's state, it is a much more expensive
implementation. This is also implicated with their backwards compat
for inventories meaning that accessing of a snapshots inventory of a
placed block will actually access the inventory of the live TE, making
creation of a snapshot redundant if the only intent is to interact with
the TEs inventory.

Hoppers are a horrible hit, every attempt to transfer an ItemStack will
result in two TileEntity snapshots, with two hoppers and a double chest
ontop, I managed to log 380 cases per second where a snapshot would have been
taken in cases where the snapshot is redundant.
2017-11-25 17:35:32 +00:00
Shane Freeder 4bb7ee49bb Update B/CB 2017-11-24 07:14:38 +00:00
Shane Freeder 902eb624bd Update B/CB 2017-11-20 14:49:40 +00:00