Commit Graph
100 Commits
Author SHA1 Message Date
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
Shane Freeder a907e21341 Update B/CB/S 2017-11-18 03:04:21 +00:00
Shane Freeder 03960c3d95 Update B/CB/S 2017-11-17 09:40:49 +00:00
Shane Freeder f77372c65e use CB BlockState implementations for captured blocks (Fixes #868) 2017-11-16 12:37:52 +00:00
Shane Freeder 7c23108a2d Update B/CB 2017-11-16 07:16:50 +00:00
Shane Freeder c1e786e5b0 Merge pull request '#925' from Brokkonaut/NoAttackSoundsFromVanishedPlayers
Send attack SoundEffects only to players who can see the attacker
2017-11-08 16:27:17 +00:00
Shane Freeder 6d76e5b46a Update B/CB/S 2017-11-08 16:13:57 +00:00
Shane Freeder ef87e1e584 Revert maven-surefire to prevent a build regression
In some environments, the 2.20.1 version of the maven surefire plugin
can cause builds to fail due to changes in surefire in how it detects
that the forked JVM used for testing is still alive or not.
2017-11-06 23:58:32 +00:00
Shane Freeder 9fd1b06aa8 allow nerfed mobs to jump again
Entity AI tasks are initialized earlier in recent versions
of MC, this means that the fromMobSpawner has not been set
at the point where AI tasks are initilazed and so the goalFloat
will never be populated.

To rectify this, we can rely on the entity tick checking if
the mob is from a spawner each tick, and just initialize the
field should the paper option be enabled. This saves us from
having to modify the call chain in order to pass the fact that
it was created by a mobSpawner earlier.
2017-10-31 15:13:55 +00:00
Shane Freeder cfb274d3af rectify Configurable Cartographer Treasure Maps patch 2017-10-30 13:06:35 +00:00
Shane Freeder c738f996e8 Update B/CB/S 2017-10-29 15:19:21 +00:00
Shane Freeder 16e823a55d Don't send keepalive logger message if we've already disconnected 2017-10-17 21:40:53 +01:00
Shane Freeder 141f231181 Update CB 2017-10-17 14:05:49 +01:00
Shane Freeder 2b03c96d72 Merge pull request #919 from electronicboy/improve-keepalive-handling
allow keepalive to wait longer for a client response (#895)
2017-10-16 16:58:44 +01:00
Shane Freeder b1fa92a5e4 allow keepalive to wait longer for a client response
and also provide a bit more information in the server
logs so we can work out what is going on.
2017-10-15 14:00:42 +01:00
Shane Freeder 0e26fc4fbb Update CB 2017-10-13 22:07:48 +01:00
Shane Freeder e813ac8f9f Remove lighting patches from spigot that cause more harm than good.
This commit removes two patches from spigot:
please review the patch messages for more information, however;

"Allow Disabling of Random Lighting Updates" potentially leaves chunk light maps in an invalid state, with
how often the server looks at these anyways, this patch really serves a questionable nature, the work is
going to be done, only it's being delayed and allowing the light map to be left in a potentially outdated
state.

"Fix some chunks not being sent to the client" sends chunks before their lighting has been calculated, this
means that the client will recieve chunks before they lighting has been calculated which can cause rendering
artifacts. The original issue around this patch appears to have already been fixed years ago.
2017-10-04 07:02:04 +01:00
Shane Freeder 45c25c868e Update B/CB 2017-10-09 10:15:17 +01:00
Shane Freeder f618803d57 Revert keepalive back to 15 seconds 2017-10-09 09:49:12 +01:00
Shane Freeder d649f90be0 Update CB/S 2017-10-07 09:57:38 +01:00
Shane Freeder 4632195902 Fix patch message (off the main thread!)
Don't tired and push!
2017-10-06 04:27:26 +01:00
Shane Freeder f23cfe77fe rectify comment derp somebody just to point out 2017-10-05 03:39:51 +01:00
Shane Freeder 58a24b5aaf handle PacketPlayInKeepAlive async
In 1.12.2, Mojang moved the processing of PacketPlayInKeepAlive off the main
thread, while entirely correct for the server, this causes issues with
plugins which are expecting the PlayerQuitEvent on the main thread.

In order to counteract some bad behavior, we will post handling of the
disconnection to the main thread, but leave the actual processing of the packet
on the main thread.
2017-10-05 02:25:41 +01:00
Shane Freeder d398f6ccf6 Update CraftBukkit 2017-10-03 21:12:34 +01:00
Shane Freeder 2727dfbafc Update craftbukkit 2017-10-01 01:57:01 +01:00
Shane Freeder 4a6a473a13 Update metrics to support java 9
http://openjdk.java.net/jeps/223
Java decided to change their versioning scheme and in doing so modified the
java.version system property to return $major[.$minor][.$secuity][-ea], as
opposed to 1.$major.0_$identifier we can handle pre-9 by checking if the "major"
is equal to "1", otherwise, 9+

of course, it really wouldn't be all that simple if they didn't add a quirk, now would it.
valid strings for the major may potentially include values such as -ea to deannotate a pre release
2017-09-26 05:58:52 +01:00
Shane Freeder 5ce5ef1c9f Update to 1.12.2, May the Tacos be with you 2017-09-18 12:04:01 +01:00