3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-11-14 20:10:05 +01:00
Commit graph

3273 Commits

Autor SHA1 Nachricht Datum
sulu5890
e39995d213
Update Log4J (1.12.2) (#7154)
* Update Log4j

* update log4j (again)
2021-12-19 16:10:22 -08:00
Zach Brown
77cce8236f
Backport map maker workflow fix for #2221 2019-07-14 13:37:14 -05:00
kashike
33d42c8e7d
Merge pull request #2264 from Spottedleaf/fix-logging2
Queue log events when log buffer is full
2019-06-29 21:09:27 -07:00
Spottedleaf
0626875a59 Queue log events when log buffer is full
This should resolve out of order logs when the buffer is full
2019-06-29 21:00:16 -07:00
Spottedleaf
cf582da30c Anti-Xray improvements (#2226) 2019-06-24 07:58:10 -05:00
Zach Brown
f59f630b7b
Backport some fixes from newer versions
MC-114618 EntityAreaEffectCloud negative size fix
Option to prevent players from moving into unloaded chunks

Fixes GH-2114
2019-06-02 21:44:15 -05:00
Shane Freeder
8f7f4cfb3c Don't drop items into the world if BlockPlaceEvent is cancelled (Fixes #1970) 2019-04-14 21:05:41 +01:00
Zach Brown
b8c184a4d9
Backport changes to deprecated CustomTimingsHandler
This will allow us to build against JDK11 which is good since it seems
like this will be sticking around for a while.
2019-04-07 06:53:59 -04:00
Zach Brown
3b0b967c78
Allow disabling village sieges entirely
Fixes GH-1944
2019-04-07 06:35:12 -04:00
Aikar
e0847a4cea
Reuse buffers for chunk compression to optimize memory use
Instead of allocating a buffer for every chunk compression, reuse
the same 64k sized buffer.

Also stopped doing dynamic compression levels. It wasn't helping enough.

This will improve memory usage and zlib performance of chunk compression.
2019-03-29 00:03:53 -04:00
Aikar
5e4ae76bc3
Fix null task issue with timings 2019-03-26 01:39:57 -04:00
Aikar
1073a39560
Fix plugin errors corrupting timings stack
plugins that threw an error could get timings thrown off in its state

this likely led to inconsistent and unexplainable data in timings reports.

this ensures that exceptions will still stopTiming and let the system
auto self recover from corrupt stacks too.
2019-03-26 00:51:19 -04:00
Aikar
2d68918daa
missed a spot for pickupDelay fix 2019-03-24 18:15:10 -04:00
Aikar
745476f4da
don't go below 0 for pickupDelay, breaks picking up items
vanilla checks for == 0

Fixes #1911
2019-03-24 18:09:51 -04:00
AgentTroll
f81358ab8c
Update entity Metadata for all tracked players 2019-03-24 17:46:02 -04:00
Aikar
14eac29ac6
Backport Timings Improvements 2019-03-24 17:34:36 -04:00
Aikar
677997fa9e
Remove Entity slice debug logs
As per 1.13, we have no evidence these illegal states are causing
issues we can identify, so just going to hide the fact its happening
(but still have the code to auto fix it)
2019-03-04 23:47:42 -05:00
Aikar
0b1a9b2e8f
MC-145260: Fix Whitelist On/Off inconsistency - Fixes #1880
Mojang stored whitelist state in 2 places (Whitelist Object, PlayerList)

some things checked PlayerList, some checked object. This moves
everything to the Whitelist object.
2019-03-04 23:47:41 -05:00
Aikar
ab99f9da52
Handle Excessive Signs in Chunks creating too large of packets
Also adds a limit to stop sending Sign data to client after 500
signs per chunk to limit client lag.

Use -DPaper.excessiveSignsLimit=500 to configure that limit, or -1
to disable the limit and let your players be abused.

fixes #1878
2019-03-04 23:47:41 -05:00
Aikar
d70aa91fd3
don't check convert signs boolean every sign save
that lookup isn't "cheap", and synchronizes so cache it to a boolean instead
2019-03-04 23:35:10 -05:00
Aikar
013f8d2c77
Remove outbound string length limits on signs, improve codepoint logic
now 80 chars counts multi sized code points the same so 80 chinese
characters would be allowed too.

Removed outbound limit as it doesn't solve the chunk oversize problem.

proper fix for chunk sending in another patch next.
2019-03-04 23:34:48 -05:00
Zach Brown
3d60b705ba
Backport: Fire PlayerArmorChangeEvent for more cases 2019-03-03 15:27:02 -05:00
Shane Freeder
c66f02b179 Backport: Fix NPE during server initialization from server list pings 2019-02-28 19:10:22 +00:00
Shane Freeder
627b6dec02 Apply sign limits to signs text content 2019-02-28 18:48:57 +00:00
Aikar
4ba151e59d
Fix incorrect check on vehicle for auto dismount
This fixes an issue where players are dismounted from their horse on logout.
2019-02-28 02:44:47 -05:00
Aikar
087a5e99b8
Strip extra Sign data to/from client - #1876
modified clients can send abnormally large data from the client
to the server and it would get stored on the sign as sent.

the client can barely render around 16 characters as-is, but formatting
codes can get it to be more than 16 actual length.

Set a limit of 80 which should give an average of 16 characters 2
sets of legacy formatting codes which should be plenty for all uses.

This does not strip any existing data from the NBT as plugins
may use this for storing data out of the rendered area.

it only impacts data sent to and from the client.

Set -DPaper.maxSignLength=XX to change limit or -1 to disable

Also fix sign edit memory leak
2019-02-28 00:42:40 -05:00
Aikar
1627071d50
Improvements to Timings concurrency and lookup performance
ConcurrentHashMap synchronizes on .computeIfAbsent even on hits,
so this does a .get(key) first, which most of our use should
be hits, and then falls back to the CHM computeIfAbsent for thread safe puts.

Also improve concurrency on handler and group collections to use a synchronized
list instead of an array deque for concurrency safety.
2019-02-23 16:32:20 -05:00
Aikar
5719e128fa
Updated Upstream (Spigot)
This brings in Spigots Oversized Chunks fix so that servers migrating from
Spigot 1.12 to Paper 1.12 can safely transition the save formats.

Spigot Changes:
79a30d7d Allow Saving Large Chunks
2019-02-23 16:31:43 -05:00
Aikar
64efe67de3
Update default book configs to match 1.13.2 2019-02-16 18:32:52 -05:00
Aikar
132c2c533d
Fix loot table restriction when replenish is disabled - Fixes #1860 2019-02-16 18:28:09 -05:00
Aikar
e8f86cb97d
Allow Saving of Oversized Chunks - READ COMMIT DETAILS!!!
Please test this build on a local TEST SERVER before sending to your live server!

PaperMC is not responsible for any data loss to your chunks.

-------------------------------------------------------------------

The Minecraft World Region File format has a hard cap of 1MB per chunk.
This is due to the fact that the header of the file format only allocates
a single byte for sector count, meaning a maximum of 256 sectors, at 4k per sector.

This limit can be reached fairly easily with books, resulting in the chunk being unable
to save to the world. Worse off, is that nothing printed when this occured, and silently
performed a chunk rollback on next load.

This leads to security risk with duplication and is being actively exploited.

This patch catches the too large scenario, falls back and moves any large Entity
or Tile Entity into a new compound, and this compound is saved into a different file.

On Chunk Load, we check for oversized status, and if so, we load the extra file and
merge the Entities and Tile Entities from the oversized chunk back into the level to
then be loaded as normal.

Once a chunk is returned back to normal size, the oversized flag will clear, and no
extra data file will exist.

This fix maintains compatability with all existing Anvil Region Format tools as it
does not alter the save format. They will just not know about the extra entities.

This fix also maintains compatability if someone switches server jars to one without
this fix, as the data will remain in the oversized file. Once the server returns
to a jar with this fix, the data will be restored.
2019-02-15 21:50:25 -05:00
Shane Freeder
af759c3e98
Address some issues with book limits (#1798) 2019-01-12 17:31:22 +00:00
Connor (Vectrix)
2ee16de8ae Ensure the passenger player gets retracked by the vehicle player on disconnection (#1781) 2019-01-01 00:32:33 -06:00
Shane Freeder
ac697484cf
Cleanup after plugins which don't sucessfully enable
This change closes the plugin via the plugin manager, which disables
the plugin, as intended, but also cleans up after the plugin, preventing
any further errors or issues caused by tasks scheduled by the plugin before
it failed.

Backport of 1.13 cf772531f4
2018-12-06 22:09:08 -05:00
Zach Brown
cbd70031ec
Update upstream CB/S
--- work/CraftBukkit
Submodule work/CraftBukkit d7bebeff0..acbc348e9:
  > SPIGOT-4477: Arrows only firing direction of boat
  > Improve zombie villagers

--- work/Spigot
Submodule work/Spigot dcd16439b..e8ded36bc:
  > Rebuild patches
  > Add PlayerConnection timings
2018-12-06 22:02:57 -05:00
Amosar
ea0646b6f6
backport: SPIGOT-2719: Comparator and Observer don't trigger BlockRedstoneEvent 2018-12-01 20:04:38 +00:00
Aikar
cedf38aac0
Handle Large Packets disconnecting client
If a players inventory is too big to send in a single packet,
split the inventory set into multiple packets instead.
2018-11-27 21:56:54 -05:00
Zach Brown
b82359ef5a
Persist ArmorStand canTick API value across restarts 2018-11-27 18:40:56 -05:00
Aikar
cfe5920cab
Prevent rayTrace from loading chunks
ray tracing into an unloaded chunk should be treated as a miss
this saves a ton of lag for when AI tries to raytrace near unloaded chunks.
2018-11-26 19:44:34 -05:00
Aikar
a62a77885d
Specify charset explicitly on getBytes 2018-11-17 00:39:22 -05:00
Aikar
07c797387b
Limit Book Sizes 2018-11-17 00:32:40 -05:00
BlackHole
531dfad2d2
Fix PreFillProfileEvent 2018-11-08 19:00:27 -05:00
Zach Brown
67787d388c
Fix server icon encoding to show on newer clients
The base64 encoding method for server favicons in 1.12 puts newlines in
the encoded string. The 1.13 client and server pair fixed this issue and
no longer consider it valid. Luckily the 1.12.2 client will parse the
correct encoding just fine as well.

This fixes the encoding so that the server icon will display properly on
both 1.12.2 clients as well as newer clients.

Shout out to ViaVersion whose contributors noticed this some time ago.
2018-11-05 21:53:33 -05:00
Aikar
857123a653
Keep players yaw/pitch on vehicle updates 2018-11-02 23:24:35 -04:00
Zach Brown
4297106c09
Do not let the server load chunks from newer versions
If the server attempts to load a chunk generated by a newer version of
the game, immediately stop the server to prevent data corruption.

You can override this functionality at your own peril.
2018-10-23 22:06:33 -04:00
Zach Brown
b15c43a389
Update upstream for minecart spawner improvement 2018-10-23 19:03:32 -04:00
Aikar
e7245e68bd
Backport Timings improvements from 1.13 2018-10-17 23:11:04 -04:00
Aikar
fce9e20719
MC-54026: Backport 1.13 client desync fix on fast tools 2018-10-17 22:53:08 -04:00
Aikar
ca8dc1b847
Actually fix mob spawning for real
Fixes #1567
2018-10-12 16:54:46 -04:00
Aikar
be4fc8c7af
Backport the dupe uuid and entity log changes 2018-10-12 01:38:32 -04:00