Commit Graph

1917 Commits

Author SHA1 Message Date
Aikar
84480114eb
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 20:13:38 -05:00
Aikar
ed62690821
Catch all exceptions thrown by chunk loading
If anything throwable is thrown, be sure its caught too.

Because I totally did new Error() out of javascript habit...

This ensures that chunk loading process cant get stuck due to uncaught errors
2019-02-15 18:33:45 -05:00
Zach Brown
0ecc1545dd
Update upstream CB
--- work/CraftBukkit
Submodule work/CraftBukkit a2dd0e303..51c118b1d:
  > SPIGOT-4619: Incorrect packet order for villager inventories
  > Fix EntityPickupItemEvent getRemaining / PlayerInventory#canHold
2019-02-13 09:07:12 -05:00
Shane Freeder
60d222d330
Fix newline inconsistencies from libraries 2019-02-10 21:53:53 +00:00
Shane Freeder
3ddcf052ae
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:
a8887389 Make AreaEffectCloudApplyEvent cancellable

CraftBukkit Changes:
a2dd0e30 SPIGOT-4615: Missing target event for withers
b26fb374 Update outdated spigot link
2b1940ae Make AreaEffectCloudApplyEvent cancellable
2019-02-10 21:17:18 +00:00
Zach Brown
a5172f8d68
Always run server tests 2019-02-07 00:48:17 -05:00
Aikar
7d5b217d83
Fix logic error in async chunk loading
if a chunk load was cancelled after generating stage started
it would short circuit return with a null.

however this skipped the creation of the loadTask, which some code
would then invoke in requestChunk and trigger an NPE.

This then likely left an incomplete corrupt request in the chunk map
which then crashes servers.

It should fix these isseues
Fixes #1775
Fixes #1743
2019-02-07 00:04:29 -05:00
Shane Freeder
182d4f528f
Fix NPE during server initialization from server list pings 2019-02-06 19:15:46 +00:00
Shane Freeder
e952f6ebe2
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:
43b46cbd SPIGOT-4608: Improve quality of MapMeta APIs

CraftBukkit Changes:
c7ba9790 Fix incorrect method descriptor in previous commit
3d19f011 SPIGOT-4608: Improve quality of MapMeta APIs
2019-02-06 02:19:49 +00:00
Zach Brown
8211569c9a
Only enforce CraftPlayer#remove exception on instances of EntityPlayer
Should be more friendly to plugins that dabble in inheriting NMS
entities.
2019-02-05 07:44:36 -05:00
Zach Brown
28cf2696d4
Block Entity#remove from being called on Players
This doesn't result in the same behavior as other entities and causes
several problems. Anyone ever complain about the "Cannot send chat
message" thing? That's one of the issues this causes, among others.

If a plugin developer can come up with a valid reason to call this on a
Player we will look at limiting the scope of this change. It appears to
be unintentional in the few cases we've seen so far.
2019-02-04 23:43:28 -05:00
Aikar
5ae3895105
Fix Async Tab Completion processing
previous logic was super broken and did not truncate your currently typed
part of the input from the suggestions.
2019-02-04 22:39:00 -05:00
Shane Freeder
abba3d113b
Updated Upstream (Bukkit/CraftBukkit/Spigot)
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:
bb813f6f SPIGOT-4605: Warn against hacking physics

CraftBukkit Changes:
2ced0233 Don't handle sync packets for kicked players
d5e96882 SPIGOT-4602: Cache reflection in decompile error workaround

Spigot Changes:
b0f4c22b SPIGOT-4605: Catch more physics problems
2019-02-03 15:34:04 +00:00
Zach Brown
f8058a8187
Fire BlockPistonRetractEvent for all empty pistons
There is an explicit check in the handling code for empty pistons that
prevents sticky pistons from firing the event. However when we look back
at the history we see that this check was originally added so that ONLY
sticky pistons would fire the retract event. I'm not sure why.
1092acbddf

Over the course of several updates, the meaning of that field appears to
have changed from "is NOT sticky" to "is sticky". So now its having the
opposite effect. Only normal pistons fire the retraction event. And like
all things in CB, it's just been carried around since.

If we are to believe the history, the correct fix for this issue is to
flip it so it only fires for sticky pistons, but that puts us in a
bind. It's already firing for non-sticky pistons, changing it now would
likely result in breakage. Furthermore, there is little documentation as
to WHY that was ever intended to be the case.

Instead we opt to remove the check entirely so that the event fires for
all piston types.

Fixes GH-1829
2019-01-31 16:45:43 -05:00
Shane Freeder
7a73ce03e9
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:
3108e64a SPIGOT-4193: API for selecting entities by strings

CraftBukkit Changes:
ad6070df SPIGOT-4193: API for selecting entities by strings
2019-01-31 04:49:52 +00:00
Shane Freeder
e87859d8a5
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:
d58803c2 SPIGOT-4597: Make BlockDropItemEvent use a list
d450fdf1 Add note about Maven repository usage to pom.xml

CraftBukkit Changes:
ed274c51 SPIGOT-4597: Make BlockDropItemEvent use a list
1734f378 SPIGOT-4598: Shift click on custom workbench inventory causes crash
a65b73ad Add note about Maven repository usage to pom.xml
2019-01-30 13:26:12 +00:00
Shane Freeder
e3f2448ae1
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:
60268ac8 Recipe choice lists should be copied once handed over to Bukkit
7ab335f2 Consistent multiple choice APIs for RecipeChoice.
2b6f3d7f SPIGOT-4586: Change PotionEffectType#value to not include null

CraftBukkit Changes:
2aba349f Need to update item in hand if fish bucket pickup cancelled
b634e059 SPIGOT-4591: Must mark itemstacks as dirty in case the handle itself changed
1748af89 Consistent multiple choice APIs for RecipeChoice.
2019-01-28 22:14:04 +00:00
kashike
f238f3a0f4 Force anti-xray chunk edge mode to WAIT 2019-01-25 16:11:42 -08:00
Shane Freeder
40a8c003df
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:
d38ac1be Update compiler
2844ce20 Add CookTimeTotal API to Furnace

CraftBukkit Changes:
13f71402 Update compiler
61c762f4 Add CookTimeTotal API to Furnace
2019-01-24 21:36:24 +00:00
Shane Freeder
88a347c753
Make force actually force a load
While this posed no issues in testing, this is the only behavioral
difference which might explain some increased reports in missing
chunks on the client
2019-01-21 20:48:27 +00:00
Shane Freeder
44e66f7e53
Make anti-xray load chunks async when enabled (fixes #1808) 2019-01-21 07:12:32 +00:00
Shane Freeder
9b05677eef
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:
c64197df SPIGOT-4584: Call events for hatching turtle eggs
f54588bd Add some missing vanilla tags
dacf8f8d Fix stray asterisk in BukkitScheduler javadocs

CraftBukkit Changes:
7fc66b28 Fix minecraft.command.selector permission
47b06d5b SPIGOT-4584: Call events for hatching turtle eggs
2019-01-18 22:34:02 +00:00
Shane Freeder
a7f924c2ca
Remove "Don't double add golems to world"
Fixed upstream
2019-01-17 02:02:56 +00:00
Brokkonaut
f64dce2719 Remove "Fire EntityCombustEvent for phantoms" patch as it is fixed in Spigot (#1805)
It is fixed here: 438556243d
2019-01-16 18:06:39 +00:00
Shane Freeder
54dd19b818
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:
18cda936 Fix variant of unloadChunkRequest that was incorrectly never deprecated
00763e1b Deprecate some methods
35a83d54 SPIGOT-4572: Make default no permission message clearer
6163343d Fix some misplaced material enum entries
8736469c Fix typo in TechnicalPiston documentation

CraftBukkit Changes:
0c715b32 SPIGOT-4579: Shulker boxes not dropping in creative
50fbc3f1 SPIGOT-4576: Fix attributes in itemstack internal data being lost
8059a937 SPIGOT-4577: Fix loss of int/double custom tags when serialized to yaml
07e504c3 Clarify exception thrown when setting drop chance for player inventory
98b862ad Fix duplicate iron golem add
843cee65 Fix a bunch of duplicate EntityCombustEvent calls
43855624 SPIGOT-4571: EntityCombustEvent not firing for phantoms
2019-01-15 21:12:19 +00:00
Zach Brown
21ba01aaf4
Make anti-xray chunk edge mode LOAD the default
Fixes GH-1749

Setting the new default to load chunk edge neighbors may have unintended
side-effects so feedback will be important. Specifically, if you're not
using the asynchronous chunk loader, you should probably switch to mode
2 (WAIT)

Old users will be migrated automatically if: You're using engine mode 1
(HIDE) and you're using chunk-edge-mode 1 (DEFAULT). Other users will
not be migrated.

Thanks @stonar96
2019-01-12 18:13:53 -05:00
Shane Freeder
a5e0335065
Address some issues with book limits (#1798)
The multibyte calculation has been fixed, now we actually work out which
characters take more than a byte.

Diminishing returns has been modified, previously the multiplier would zero
itself out due to floating point limitations
2019-01-12 16:29:15 +00:00
Shane Freeder
c42ec4782e
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:
d4e8c8b3 SPIGOT-4570: Add FluidLevelChangeEvent

CraftBukkit Changes:
9dc56581 SPIGOT-4570: Add FluidLevelChangeEvent
b15abb12 SPIGOT-4566: Don't special case NETHER_PORTAL teleport reason from plugins
2019-01-08 16:57:27 +00:00
Zach Brown
a6ee4b9965
Add vehicle tracking workaround from 1.12.2 branch 2019-01-07 15:02:11 -06:00
Shane Freeder
797c46bd27
Updated Upstream (Bukkit/CraftBukkit/Spigot)
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:
6de6ac4a BlockDropItemEvent should refer to getBlockState rather than getBlockData
2b555a75 Fix BlockDropItemEvent for Skulls and Shulker Boxes

CraftBukkit Changes:
f17d591c Fix BlockDropItemEvent for Skulls and Shulker Boxes

Spigot Changes:
f56e2e78 Catch async recipe add
2019-01-07 18:24:51 +00:00
Shane Freeder
c608a94ff7
Use OBFHELPER in previous commit 2019-01-06 17:48:24 +00:00
Michael Himing
5cdbb30e78
Fix PlayerEditBookEvent 2019-01-06 17:33:15 +00:00
Shane Freeder
f4e3b4e439
Updated Upstream (Bukkit/CraftBukkit/Spigot)
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:
5b680f0b Note maximum objective score length in documentation

CraftBukkit Changes:
5932f8a7 Load default world spawn areas in consistent order
3a5dc78f Fix confusing migration message appearing on fresh server
516a408f Remove redundant CraftBukkit change for secondary world data
73a2c749 Process conversation input on the main thread.
100c3f07 Cap Objective Score Length
6e842759 Cross World Entity Teleportation
7deba1c6 Check for blank OfflinePlayer Names
f2746a5e Descriptive kick reasons instead of Nope!
b0212308 Cap Channel Registrations
a610dcd8 Identify CraftScheduler threads with useful names

Spigot Changes:
19c3c5a5 Rebuild patches
2019-01-06 17:15:21 +00:00
Shane Freeder
b9badbf2bc
Updated Upstream (Bukkit/CraftBukkit/Spigot)
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:
79f6ba25 Skip tests on default builds
b85cc32f Further discourage World.regenerateChunk

CraftBukkit Changes:
7560d3b5 Skip tests on default builds
d0a9130d SPIGOT-4563: Fix regenerating chunks saved to disk already

Spigot Changes:
8173d06f Remove need for redundant second clone of repositories
8ede0393 Rebuild patches
2019-01-04 19:19:36 +00:00
Shane Freeder
ccbeb5c4ed
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:
6ffe5a68 Add RecipeChoice.ExactChoice API for NBT matches on ingredients
ffccf6b7 SPIGOT-4560: Add HumanEntity.sleep and related APIs

CraftBukkit Changes:
917411fd Remove redundant BlockPosition creation from sleep API
756c38d1 Add RecipeChoice.ExactChoice API for NBT matches on ingredients
8e65d8df SPIGOT-4560: Add HumanEntity.sleep and related APIs
a8382862 SPIGOT-4562: reducedDebugInfo not updated on world change
2019-01-02 18:10:14 +00:00
Shane Freeder
5d5e0ad75c
Don't double broadcast movement packets (fixes #1784)
WROOOONG LEEEVERRR....
2019-01-02 16:40:09 +00:00
Zach Brown
9af685abe7
Add APIs to replace OfflinePlayer#getLastPlayed
Currently OfflinePlayer#getLastPlayed could more accurately be described
as "OfflinePlayer#getLastTimeTheirDataWasSaved".

The API doc says it should return the last time the server "witnessed"
the player, whilst also saying it should return the last time they
logged in. The current implementation does neither.

Given this interesting contradiction in the API documentation and the
current defacto implementation, I've elected to deprecate (with no
intent to remove) and replace it with two new methods, clearly named and
documented as to their purpose.
2019-01-02 01:04:11 -06:00
Shane Freeder
b68b282439
Updated Upstream (Bukkit/CraftBukkit/Spigot)
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

Warning: this commit contains more mapping changes from upstream, As always, ensure that you
have working backups and test this build before deployment; Developers working on paper will,
yet again, need to delete their work/Minecraft/1.13.2 folder

Bukkit Changes:
7fca5fd4 SPIGOT-4558: Preserve user order in the face of copied defaults in configurations
15c9b1eb Ignore spurious slot IDs sent by client, e.g. in enchanting tables
5d2a10c5 SPIGOT-3747: Add API for force loaded chunks
d6dd2bb3 SPIGOT-3538: Add getHitBlockFace for ProjectileHitEvent
771db4aa SPIGOT-794: Call EntityPlaceEvent for Minecart placement
55462509 Add InventoryView#getSlotType
2f3ce5b6 Remove EntityTransformEvent and CustomItemTagContainer from draft API
f04ad7b6 Make ProjectileLaunchEvent extend EntitySpawnEvent
ccb85808 Define EntitySpawnEvent
b8cc3ebe Add PlayerItemDamageEvent
184a495d Ease ClassLoader Deadlocks Where Possible
11ac4728 Expand Boolean Prompt Values in Conversation API
aae62d51 Added getAllSessionData() to the Conversation API.
9290ff91 Add InventoryView#getInventory API
995e530f Add API to get / set base arrow damage

CraftBukkit Changes:
c4a67eed SPIGOT-4556: Fix plugins closing inventory during drop events
5be2ddcb Replace version constants with methods to prevent compiler inlining
a5b9c7b3 Use API method to create offset command completions
2bc7d1df SPIGOT-3747: Add API for force loaded chunks
a408f375 SPIGOT-3538: Add getHitBlockFace for ProjectileHitEvent
b54b9409 SPIGOT-2864: Make Arrow / Item setTicksLived behave like FallingBlock
79ded7a8 SPIGOT-1811: Death message not shown on respawn screen
b4a4f15d SPIGOT-943: InventoryCloseEvent called on death regardless of open inventory
0afed592 SPIGOT-794: Call EntityPlaceEvent for Minecart placement
2b2d084a Add InventoryView#getSlotType
01a9959a Do not use deprecated ItemSpawnEvent constructor
9642498d SPIGOT-4547: Call EntitySpawnEvent as general spawn fallback event
963f4a5f Add PlayerItemDamageEvent
63db0445 Add API to get / set base arrow damage
531c25d7 Add CraftMagicNumbers.MAPPINGS_VERSION for use by NMS plugins
d05c8b14 Mappings Update
bd36e200 SPIGOT-4551: Ignore invalid attribute modifier slots

Spigot Changes:
518206a1 Remove redundant trove depend
1959ad21 MC-11211,SPIGOT-4552: Fix placing double slabs at y = 255
29ab5e43 SPIGOT-3661: Allow arguments in restart-script
7cc46316 SPIGOT-852: Growth modifiers for beetroots, potatoes, carrots
82e117e1 Squelch "fatal: Resolve operation not in progress" message
0a1a68e7 Mappings Update & Patch Rebuild
2019-01-01 03:29:51 +00:00
Shane Freeder
0318e62b45
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:
0969eedc Clarify furnace burn time behaviour as per SPIGOT-844
16453bfd SPIGOT-4503: Add API to insert complete ItemStack into Jukebox

CraftBukkit Changes:
dff66dfc Reduce copying of positions from block states
91cae6ef SPIGOT-4387: Durability looping from cancelled BlockPlaceEvent
24c5e68c SPIGOT-4493: Allow burnt out furnaces to remain lit like Vanilla whilst retaining SPIGOT-844 API
bc943daf Fix Jukebox API not synchronizing playing data with state
fe89a8c1 SPIGOT-4503: Add API to insert complete ItemStack into Jukebox
fc102494 Make CraftBlockState use BlockPosition
89ab4887 SPIGOT-4543: Jukebox playing calls should not use legacy data
6ff5a64c SPIGOT-4541: Cancelled bucket events require inventory update
2018-12-23 17:04:13 +00:00
Shane Freeder
ac66acab27
Updated Upstream (Bukkit/CraftBukkit/Spigot)
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:
78568d11 Tweak Block.getTemperature to return actual block temperature
9ad459ca SPIGOT-2151: Add support for getting simple bounding box of a block
ad28b19f Add BlockData#getAsString(boolean) to hide unspecified states

CraftBukkit Changes:
1b982fd6 Tweak Block.getTemperature to return actual block temperature
f55c8191 SPIGOT-2151: Add support for getting simple bounding box of a block
4b843638 Add BlockData#getAsString(boolean) to hide unspecified states

Spigot Changes:
573cdf2c BUILDTOOLS-425: Disable commit.gpgSign in applyPatches.sh
667bdd6b Deprecate Spigot version of Entity.isInvulnerable
2018-12-21 16:09:17 +00:00
Shane Freeder
b2f6b9f7ea
Prevent Enderman from loading chunks 2018-12-18 02:20:03 +00:00
Shane Freeder
6c34639605
Cleanup Entity add to world fixes 2018-12-18 02:07:05 +00:00
Shane Freeder
e293688578
Actually add entities to chunks
Because, you know, vanishing entities is always nice to have
2018-12-18 01:56:54 +00:00
Shane Freeder
1f59f78c6f
Updated Upstream (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

CraftBukkit Changes:
bb6f384a SPIGOT-4534: Only call event for new chunks
2018-12-17 23:51:44 +00:00
Shane Freeder
3496f2d7e4
Updated Upstream (Bukkit/CraftBukkit/Spigot)
Developers!: You will need to clean up your work/Minecraft/1.13.2 folder for this

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:
b850a822 SPIGOT-4526: Add conversion time API for Zombie & subclasses

CraftBukkit Changes:
38cf676e SPIGOT-4534: CreatureSpawnEvent not being called for CHUNK_GEN
b446cb5d SPIGOT-4527: Fix sponges with waterlogged blocks
6ec8ea5c SPIGOT-4526: Add conversion time API for Zombie & subclasses
c64fe508 Mappings Update
a3c2ec03 Fix missing ServerListPingEvent call for legacy pings

Spigot Changes:
1dc156ce Rebuild patches
140f654d Mappings Update
2018-12-17 05:19:39 +00:00
Zach Brown
8ed2992da9
Make scan-for-legacy-ender-dragon config work again
Portion of diff was dropped in the mappings update commit.

Also remove the option to remove invalid statistics. The server will
automatically do this now as of... 1.13?, our option wasn't even doing anything.
2018-12-14 20:17:27 -05:00
Spottedleaf
fa35d5a102 Disable watchdog early timeout for CraftServer#reload() invocations (#1718)
Fixes GH-1381
2018-12-12 20:41:11 -05:00
Spottedleaf
9cf4eeda47 Add PlayerConnectionCloseEvent (#1552)
* Add PlayerConnectionCloseEvent

This event is invoked when a player has disconnected. It is guaranteed that,
if the server is in online-mode, that the provided uuid and username have been
validated.

The event is invoked for players who have not yet logged into the world, whereas
PlayerQuitEvent is only invoked on players who have logged into the world.

The event is invoked for players who have already logged into the world,
although whether or not the player exists in the world at the time of
firing is undefined. (That is, whether the plugin can retrieve a Player object
using the event parameters is undefined). However, it is guaranteed that this
event is invoked AFTER PlayerQuitEvent, if the player has already logged into
the world.

This event is guaranteed to never fire unless AsyncPlayerPreLoginEvent has
been invoked beforehand, and this event may not be called in parallel with
AsyncPlayerPreLoginEvent for the same connection.

Cancelling the AsyncPlayerPreLoginEvent guarantees the corresponding
PlayerConnectionCloseEvent is never called.

The event may be invoked asynchronously or synchronously. As it stands,
it is never invoked asynchronously. However, plugins should check
Event#isAsynchronous to be future-proof.

On purpose, the deprecated PlayerPreLoginEvent event is left out of the
API spec for this event. Plugins should not be using that event, and
how PlayerPreLoginEvent interacts with PlayerConnectionCloseEvent
is undefined.
2018-12-12 20:17:38 -05:00
Majo
19b4f78b55
Modified Configurable Chunk Inhabited Timer Patch
Replaces the "use-chunk-inhabited-timer" config option with the options
"use-fixed-chunk-inhabited-time" and "fixed-chunk-inhabited-time".

When using "use-fixed-chunk-inhabited-time=false" everything will be the
same like it was with "use-chunk-inhabited-timer=true".

When using "use-fixed-chunk-inhabited-time=true" and
"fixed-chunk-inhabited-time=0" everything will be the same like it was
with "use-chunk-inhabited-timer=false".

Instead of just using 0 when all chunks should be treated equally this
allows to fine-tune vanilla gameplay.
2018-12-12 19:41:37 -05:00
Zach Brown
7b4fe255d8
Lazy init world storage in CraftOfflinePlayer
Allows access to some offline player properties even when there
are no worlds loaded. This is typically a rare occurrence but
probably one that should be covered as best we can.

Fixes GH-1701
2018-12-11 22:32:39 -05:00
Zach Brown
a2ad49b22f
Update upstream BD/B/CB/S
Note to other developers: This commit may require you to wipe your
workspace as a result of the changes to BD.

--- work/BuildData
Submodule work/BuildData f527a8ff..d56672db:
  > Mappings Update

--- work/Bukkit
Submodule work/Bukkit 0c1d258bb..db06c80d7:
  > Add list of entities to EntityTransformEvent
  > SPIGOT-4347: Add API to allow storing arbitrary values on ItemStacks

---work/CraftBukkit
Submodule work/CraftBukkit 6a398ac44..068dab5be:
  > Enable optional source JAR shading via profile shadeSourcesJar
  > Use ImmutableList rather than AbstractList for CraftMetaBook
  > Fix setRecipes(List) not setting Knowledge Book recipes.
  > Mappings Update
  > Add list of entities to EntityTransformEvent & move die calls
  > SPIGOT-4347: Add API to allow storing arbitrary values on ItemStacks
  > Add Vanilla help to default permissions

--- work/Spigot
Submodule work/Spigot a1f2566f6..e769fe4d9:
  > Mappings Update
  > Rebuild patches
2018-12-08 05:09:55 -05:00
Zach Brown
684bd2adbc
Upstate upstream B/CB
--- work/Bukkit
Submodule work/Bukkit 9a793cce8..0c1d258bb:
  > Make PigZapEvent extend EntityTransformEvent

--- work/CraftBukkit
Submodule work/CraftBukkit ee6684bba..6a398ac44:
  > SPIGOT-4511: Trident doesn't lose durability
  > Tweak outdated windows
2018-12-02 18:31:09 -05:00
DoNotSpamPls
0c74d4575c Change the reserved channel check to be sensible (#1610) 2018-11-30 19:08:31 -05:00
kashike
3ef68e5f20 nevermind then 2018-11-30 07:40:47 -08:00
Shane Freeder
7d25c57f43
Use Item from PlayerPickupItemEvent when fired (fixes #1717) 2018-11-30 15:15:07 +00:00
kashike
1c8d620e6e Don't fill list with items on startup 2018-11-29 16:32:23 -08:00
Zach Brown
b2dbcca4c9
Ensure stopRiding override follows all super calls
Fixes GH-1702
2018-11-27 23:19:01 -05:00
Aikar
0d7513c4a4
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:43:25 -05:00
Zach Brown
6c38478e65
Persist ArmorStand canTick API value across restarts 2018-11-27 18:14:57 -05:00
Aikar
cbac5b0524
Prevent rayTrace from loading chunks - Fixes #1706
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:41:33 -05:00
Shane Freeder
b5184575e6
limit the range at which we'll consider an attackable target
This patch aims to ensure that MCP World#getNearestAttackablePlayer
will not trigger chunk loads due to PathfinderGoalNearestAttackableTarget
performing a ray trace operation by pre-checking the maximum limit;

Given that the implementation shows that the limit should only ever
decrease when set, allowing us to skip further checks earlier on
when looking for an attackable entity
2018-11-26 13:23:49 +00:00
BillyGalbreath
3aa59b3c99 Add more Zombie API (#1547) 2018-11-25 12:51:11 -05:00
Zach Brown
dce9007a09
Fix vanilla scoreboard team color support for black
Fixes GH-1703
2018-11-25 12:16:01 -05:00
Shane Freeder
29a01de126
Updated Upstream (Bukkit/CraftBukkit/Spigot)
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:
9a793cce Remove no longer applicable caveats to setPlayerListName
7137829e SPIGOT-4496: Undeprecate MapView.getId and make int
de33ade0 Remove some draft API designations
a35fa838 SPIGOT-4472: Add Consumer scheduler methods

CraftBukkit Changes:
8cd538e6 SPIGOT-4498: Crash on startup
b4ee04ba SPIGOT-4496: Undeprecate MapView.getId and make int
ec937d0e SPIGOT-4472: Add Consumer scheduler methods

Spigot Changes:
a1f2566f Use monotonic time for watchdog
bc4adcbf SPIGOT-4498: Crash on startup
bb387e6c Rebuild patches
2018-11-24 05:28:04 +00:00
Zach Brown
e73ace252e
Fix thunder sounds not playing properly 2018-11-23 02:23:50 -05:00
Zach Brown
aac051e35b
Redo API for vanilla CanPlace and CanDestroy NBT
Now properly serializes and deserializes, is factored into hashcodes and
equality checks, etc

Deprecates the old Material based system and replaces it with a new one
based around NamespacedKeys and NamespacedTags. This allows the API to
extend beyond vanilla and Material enum based properties to datapack
based tags and elements.

Fixes GH-1635
2018-11-21 21:56:52 -05:00
Zach Brown
23a0b8c7bb
Update upstream CB
--- work/CraftBukkit
Submodule work/CraftBukkit e4183e70..f489f0f7:
  > SPIGOT-4494: Remove fix for SPIGOT-3864, better handled by SPIGOT-3879 fix
2018-11-21 21:49:47 -05:00
Shane Freeder
65cc6ba7c4
Fire entity dismount/vehicle events (but supress their cancellation) for player teleportation
Entities must be dismounted before teleportation in order to avoid
multiple issues in the server with regards to teleportation, shamefully,
too many plugins rely on the events firing, which means that not firing
these events caues more issues than it solves;

In order to counteract this, Entity dismount/exit vehicle events have
been modified to supress cancellation (and has a method to allow plugins
to check if this has been set), noting that cancellation will be silently
surpressed given that plugins are not expecting this event to not be cancellable.

This is a far from ideal scenario, however: given the current state of this
event and other alternatives causing issues elsewhere, I believe that
this is going to be the best soultion all around.

Improvements/suggestions welcome!
2018-11-20 22:39:54 +00:00
Aikar
8cd849c64d
[Auto] Updated Upstream (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

CraftBukkit Changes:
e4183e70 SPIGOT-4491: Fix InventoryMoveItemEvent causing repeated events
2018-11-19 05:01:41 -05:00
Shane Freeder
975491cb8b
Make the default permission message configurable 2018-11-18 19:54:38 +00:00
Shane Freeder
b710cc2e82
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:
689f1565 SPIGOT-4487: Clarify PlayerInteractEvent docs
01ffd1c7 Add Player to BlockCanBuildEvent

CraftBukkit Changes:
1cac9d4f Add Player to BlockCanBuildEvent
2018-11-18 16:52:49 +00:00
Aikar
aae0c12d39
Specify charset explicitly on getBytes 2018-11-17 00:38:35 -05:00
Aikar
d5408369ac
Improvements to Book Size checks
If you downloaded the build before this, delete the settings.book-size
section in paper.yml to get new values.
2018-11-17 00:34:58 -05:00
Aikar
38b6799b58
Book Size Limits
Puts some limits on the size of books.
2018-11-16 23:23:55 -05:00
Aikar
a939b01116
[Auto] Updated Upstream (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

CraftBukkit Changes:
b1d149cf SPIGOT-4489: NOTE_BLOCK incorrectly has BlockStateMeta
2018-11-15 23:21:38 -05:00
Shane Freeder
a16e1a2fe7
force entity dismount during teleportation
Entities must be dismounted before teleportation in order to avoid
multiple issues in the server with regards to teleportation, while
we now lose the ability for plugins to monitor this specific case
of entity dismount, the alternative is that we allow a cancellable
event, but silently ignore the cancelled status, which might cause
further issues for plugins tracking state

Given that nobody can be relying on the Cancellable state of those
events during teleportation due to the issues that arise from this,
this is a small trade off
2018-11-15 14:29:04 +00:00
egg82
0b9983dfbc Optimize redstone algorithm (#1494) 2018-11-14 22:09:37 -05:00
Aikar
4cd3e8173c
[CI-SKIP] [Auto] Rebuild Patches
A recent commit has been made that caused patches to be out of order, rebuilding
2018-11-13 23:41:46 -05:00
Zach Brown
0ae3b1c14e Update upstream B/CB/S
--- work/Bukkit
Submodule work/Bukkit 3aee9dbd0..0828ce366:
  > Add SpawnReason.SHEARING
  > SPIGOT-4339: Add EntityTransformEvent

--- work/CraftBukkit
Submodule work/CraftBukkit 17ff1e046..c2035aa1d:
  > Add some missing CreatureSpawnEvent.SpawnReason calls
  > SPIGOT-4339: Add EntityTransformEvent

--- work/Spigot
Submodule work/Spigot 947a8e7fd..5696c83c1:
  > Rebuild patches
2018-11-13 23:35:43 -05:00
Shane Freeder
7c8937d0c6
Updated Upstream (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

CraftBukkit Changes:
17ff1e04 SPIGOT-4483: Missing EntityInteractEvent call for zombies on eggs
2018-11-12 18:23:24 +00:00
Shane Freeder
64c6597d79
Don't allow digging into unloaded chunks 2018-11-11 21:10:37 +00:00
Zach Brown
dcebe229b5
Update upstream B/CB/S
--- work/Bukkit
Submodule work/Bukkit 1627782b..67e91ef7:
  > Fix some incorrectly handled JavaDoc
  > SPIGOT-4478: Update PlayerLoginEvent docs
  > Add API to manipulate boss bar of entities and those created by commands

--- work/CraftBukkit
Submodule work/CraftBukkit ca22de36..3a911828:
  > SPIGOT-4477: Arrows only firing direction of boat
  > SPIGOT-4478: NPE during PlayerLoginEvent recipe manipulation
  > Add API to manipulate boss bar of entities and those created by commands

--- work/Spigot
Submodule work/Spigot 2474d93d..947a8e7f:
  > Rebuild patches
2018-11-11 00:37:59 -05:00
Shane Freeder
8b8e15fb63
Drop extended BlockStateListPopulator and fix SpongeAbsorbEvent handling
This patch, while would have been nice, would just take too much
in order to re-implement it to retain and handle all of the state
changes possible, and complicates retaining state properly

Fix SpongeAbsortEvent handling

Only process drops when the block is actually going to be removed
2018-11-10 05:29:46 +00:00
Shane Freeder
7e59b6e18e
Further extend BlockStateListPopulator
Upon "real world testing", there was needed and unimplemented methods
on BlockStateListPopulator; This commit (which should fix #1663) aims
to improve the coverage of this class.

We should aim to look into expanding this class down the line, or aim to
improve the servers ability to capture these changes
2018-11-09 18:11:32 +00:00
Aikar
2b9a7d9475
Improve Activation Range by running target rules
This restores monster aggression range back to normal when
Activation Range is less than the monsters aggression range.

This allows an entity to try to acquire targets still during
inactive ticks, which will also then let it go into immunity stage.
2018-11-08 22:43:38 -05:00
Aikar
de3b813dcf
Use Vanilla Minecart Speeds
CraftBukkit changed the values on flying speed, restore back to vanilla

Might help #1658
2018-11-08 21:35:00 -05:00
Zach Brown
16a6e7ee8b
[CI-SKIP] merge profile fill fix into base patch 2018-11-08 18:50:17 -05:00
Black Hole
83e2208266 Fix PreFillProfileEvent (#1661) 2018-11-08 14:33:19 -05:00
Shane Freeder
c6effafca8
Extend BlockStateListPopulator
extends BlockStateListPopulator to suppport checking block types in the
physical world it's representing, allowing for blocks making modifications
to the world to maintain proper state.
2018-11-08 05:45:39 +00:00
Zach Brown
24d5672770
Fix typo in last commit
Woops. db6d9b0522
2018-11-07 23:23:53 -05:00
Zach Brown
db6d9b0522
Update armorstand pose and equipment w/ no tick option
This change allows ArmorStands with ticking disabled to visually update
their equipment and pose properly.

Given the wide range of usage of ArmorStands, I have not changed
their tick loop when their tick is enabled as usual. Doing so may
likely gains in the future, though additional testing would be
needed to ensure nothing breaks.

Fixes GH-1593
2018-11-07 21:27:41 -05:00
Zach Brown
335ab110bc
Update upstream B/CB 2018-11-06 20:20:11 -05:00
Aikar
0f455f00ed
Use at minimum 2 threads for Data fixers
Per MC-138093 comments, ForkJoinPool uses unlimited threads if
parallelism is ever 1. A 2 core machine will end up with 1
with the change I had previously made, so bumped the min
to 2 so we will never trigger the unlimited thread situation.

This aligns the min back with Spigot, but allows use of more
threads on systems with more cores.
2018-11-05 17:25:08 -05:00
Shane Freeder
f50977c5c4
Restore custom InventoryHolder support
Upstream removed the ability to consistently use a custom InventoryHolder,
However, the implementation does not use an InventoryHolder in any form
outside of custom inventories.

We can take that knowledge and apply some expected behavior, if we're given
an inventory holder, we should use it and return a custom inventory with the
holder, otherwise, create an inventory backed by the intended inventory, as
per upstream behavior.

This provides a "best of both worlds" scenario: plugins with InventoryHolder's
will always work as intended in the past, those without will create implementation
based inventories.
2018-11-05 04:57:31 +00:00
Aikar
88baad1438
Updated Upstream (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

CraftBukkit Changes:
e693496c SPIGOT-4467: Improve ExpiringMap
2018-11-03 21:23:08 -04:00
Aikar
1357b23994
Drop Optimize Small Entity Movements patch
Causing too many issues

Fixes #1643
2018-11-03 11:07:24 -04:00
Aikar
aaefc4fbbe
[Auto] Updated Upstream (Spigot)
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

Spigot Changes:
2474d93d SPIGOT-4462: Catch async chunk regenerate
2018-11-03 05:31:30 -04:00
Zach Brown
b4baf9ce4d
Use empty itemstack, not null in PlayerInteractManager
Introduced in 00a41bca42
Fixes GH-1642
2018-11-03 04:50:42 -04:00
Aikar
00a41bca42
Don't merge player movements (fixes block breaking issues)
Fixes #1640
2018-11-03 00:18:10 -04:00
Aikar
450ed0d75c
Keep players pitch/yaw on vehicle updates - fixes #1628 2018-11-02 23:20:22 -04:00
Aikar
70e091b7d4
Optimize World Time Updates
Splits time updates into incremental updates as well as does
the updates per world, so that we can re-use the same packet
object for every player unless they have per-player time enabled.
2018-11-02 23:14:53 -04:00
Aikar
81e5978088
Many major improvements to Async Chunk Loading
Fixes some bugs with urgent priority, improves priority all
around to optimize blocking chunk requests as much as possible.

fixes casing on the -Dpaper.maxchunkthreads to now be -Dpaper.maxChunkThreads

adds -Dpaper.genThreadPriority=3 -Dpaper.loadThreadPriority=4

lowering thread priorities will help ensure main has more
priority over chunk threads
2018-11-02 23:14:09 -04:00
Shane Freeder
1e39773b53
Updated Upstream (Bukkit/CraftBukkit/Spigot)
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:
9d0221aa API to get client side view distance.
9be7f0ea SPIGOT-4395: Additions to PlayerBedEnterEvent.
01e534c6 Minor cosmetic cleanups to imports etc

CraftBukkit Changes:
96c461b3 API to get client side view distance.
e2785f4e Remove note about development build
a8000588 SPIGOT-4395: Additions to PlayerBedEnterEvent.

Spigot Changes:
117d4f7e Rebuild patches
2018-11-03 00:29:57 +00:00
Aikar
6c2709118f
Fix enttiy move merge issues - fixes #1637 2018-11-02 10:08:57 -04:00
Aikar
0b3a5c2669
Revert "Many major improvements to Async Chunk Loading"
This reverts commit dc555f8478.
2018-11-02 09:58:16 -04:00
Aikar
0d2b71039e
Fix compile 2018-11-01 20:16:12 -04:00
Aikar
47b9a5d178
Optimize Small Entity Movement
Optimizes small movements by entities by merging the movement
into the entities next larger movement, until enough movement
velocity has been hit.

This reduces collision detection and able to reduce movement
cpu cost by 5-7%.

The default option of 0.75 seems to provide all the gains without
any noticable behavior change to entity movement.

We have to exclude slimes due to weird jumping animation bugs.
2018-11-01 20:11:31 -04:00
MisterVector
645cfad665
MC-136865: Pass original itemstack for enchantment checks on block break
When an itemstack runs out of durability, the amount is reduced to
0 which then marks the item as invalid. This causes the last unit
of durability to not apply enchantments as the enchantment level
check sees the item as a dud.

keep the clone of the item used to a non empty value so it represents
the item used.
2018-11-01 20:08:18 -04:00
Aikar
dc555f8478
Many major improvements to Async Chunk Loading
Fixes some bugs with urgent priority, improves priority all
around to optimize blocking chunk requests as much as possible.

fixes casing on the -Dpaper.maxchunkthreads to now be -Dpaper.maxChunkThreads

adds -Dpaper.genThreadPriority=3 -Dpaper.loadThreadPriority=4

lowering thread priorities will help ensure main has more
priority over chunk threads
2018-11-01 00:00:21 -04:00
Aikar
bbfef2d293
[Auto] Updated Upstream (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

CraftBukkit Changes:
aed3aecb Make natural item dropping mimic Vanilla
2018-10-31 05:21:34 -04:00
Aikar
acd334793f
[Auto] 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:
98d3f031 SPIGOT-4376: Add draft BlockDropItemEvent

CraftBukkit Changes:
1057710a SPIGOT-4376: Add draft BlockDropItemEvent
2018-10-31 05:01:59 -04:00
Shane Freeder
fc68e73647
Fix resource pack api (Fixes #1634) 2018-10-29 13:02:56 +00:00
Zach Brown
d6033a37e5
Log system info and remove paperclip java 9 warn
Removes the paperclip Java 9+ warning and replaces it with general
JVM and Host OS information that will be more useful in finding issues
for end users and ourselves.

Also removes the "for development only" 1.13 warning that everyone has
been ignoring completely anyway.
2018-10-28 21:07:17 -04:00
Zach Brown
ece0b19c59
Update upstream B/CB/S 2018-10-28 18:08:08 -04:00
Shane Freeder
e6473fc520 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 10:40:30 -04:00
Zach Brown
c4865a6445
Update upstream B/CB/S 2018-10-27 00:07:20 -04:00
Aikar
6230d632e3
give EAR immunity to piston pushed entities
helps keep vanilla behavior with piston elevators
2018-10-25 23:26:29 -04:00
Shane Freeder
34ee08f240 fix "avoid hopper searches" and make it use an obfhelper 2018-10-25 21:27:54 +01:00
Shane Freeder
0696c672be Revert field order changes in AxisAlignedBB 2018-10-25 17:07:54 +01:00
BillyGalbreath
db9e33489b Use EntityTypes for living entities (#1533) 2018-10-24 16:26:00 -04:00
Shane Freeder
c6f7877de6
[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:27:31 +01:00
Zach Brown
838a12b72b
\u0020 2018-10-24 15:06:44 -04:00
Zach Brown
719dae9595
Add version to watchdog early warning system
BECAUSE VERSIONING INFO
2018-10-24 15:01:17 -04:00
Zach Brown
4b45701372
Always write dimension NBT, even if we ignore it
DataPacks can use the dimension field for various things, so we should
still write this field to NBT, even if we ignore reading it ourselves.
2018-10-24 14:41:04 -04:00
Aikar
9e795dfe7f
Fix unloaded chunks movement setting 2018-10-24 08:38:34 -04:00
Aikar
5f7c6d0d2a
Improve default thread counts for DataFix BootStrap
Spigot capped it to 2 threads. This bumps it back up to do
maxcores -2 with a max cap of 6.

A typical 4C8T system can use 6 threads and be done in 6 seconds.

Server owners can use system property to override, but this
improves the default.
2018-10-23 23:53:13 -04:00
Aikar
d07f7197f2
Use Last Access Cache for isLoaded calls
this should provide a pretty good across-the-board performance
improvement for the entire server, as it's very common for code
to check if (isLoaded(x, z)) { then do something on that chunk }

Previously, containsKey would not read or set the last access cache

By making it do get() != null, we gain the benefits of last access
and also improves thread safey for async isLoaded checks

This exact usage scenario is used in Entity movement, so that alone
saves us up to 5%~ of CPU time for Entity movement.
2018-10-23 23:50:51 -04:00
Aikar
e9305f96a3
Don't sleep after profile lookups if not needed
Mojang was sleeping even if we had no more requests to go after
the current one finished, resulting in 100ms lost per profile lookup
2018-10-23 21:14:11 -04:00
Aikar
eb38e51ee0
Fix "prevent players from moving into unloaded chunks"
it used public method instead of private, and moved to world config

also improved the implementation to not use obfuscated stuff

Also removed the Fix Double chest conversion patch since its
fixed in other ways in vanilla
2018-10-23 21:13:58 -04:00
Zach Brown
042ccbb9b2
Strip private area unicode characters from signs
It is not immediately clear how these characters ended up on signs in
previous versions. It is clear, however, that they now render as empty
unicode boxes in 1.13, whereas previously they rendered as invisible
characters.

When these signs are loaded in versions after this commit, these
characters from the private use area of the Unicode block will be
stripped. The sign will then be marked to ensure this conversion only
runs once.

There is a flag -DPaper.keepInvalidUnicode=true that can be used if you
do not want us to strip these characters from your signs, though I can
think of no reason to use it.

Fixes GH-1571
2018-10-23 20:59:08 -04:00
Shane Freeder
1387cff4e8
Update for Minecraft 1.13.2 2018-10-23 00:16:21 +01:00
GreenMeanie
9b98a252d6 Reset players remainingAir on respawn (#1598)
As mentioned in #1597, your air level did not reset if you drown.

Now you get a full breath during respawn.
2018-10-22 15:25:48 -04:00
Gabriele C
ce7e1c14a6 Add option to prevent players from moving into unloaded chunks (#1608)
Resolves #1551
2018-10-22 15:25:16 -04:00
Aikar
7c5b5ce946
[Auto] Updated Upstream (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

CraftBukkit Changes:
a639ae44 Remove outdated build delay.
2018-10-22 15:02:10 -04:00
Aikar
d066d8b926 Remove debug text
resolves #1606
2018-10-21 19:16:54 -04:00
BillyGalbreath
0db94d4fca Fix #1604 (#1605) 2018-10-21 20:39:21 +01:00
Aikar
3fa9c0b5c3
[CI-SKIP] [Auto] Rebuild Patches
A recent commit has been made that caused patches to be out of order, rebuilding
2018-10-21 15:31:50 -04:00
Caleb Bassham
64840b3018 Fix NPE when setting a player's spectator target (#1596)
Fix NPE when setting a player's spectator target
2018-10-21 20:27:53 +01:00
Brokkonaut
4dc24e6c0f Don't modify item tag if interaction is canceled (#1589)
The item tag is stored before executing the interaction and restored before handling the
resulting events. If the event was not canceled and the ItemStack is not modified in the
event, the new tag is set back to the new one afterwards. This is similar to the handling
of the item amount.

This fixes a bug where tools lose durability when the interaction is canceled and another bug
where tools become completely repaired when they should break but the interaction was canceled.
2018-10-20 10:03:35 -04:00
BillyGalbreath
8098020fd0 Fix MC-93764 2018-10-19 19:39:21 -05:00
BillyGalbreath
8c7f0e79ce Add more Witch API (#1564) 2018-10-18 23:24:09 -04:00
Aikar
0d1ca37436
Remove MOST Synchronization from Chunk Map
This will provide quite a major performance boost by avoiding
synchronizing on EVERY chunk lookup.

Synchronize, even without contention, incurs processor cache flushes.

Considering this is the 2nd hottest method in the code base, lets
avoid doing that...

Additionally, chunk conversion operations were occuring while
under synchronization which lead to deadlocks.

Now the conversion will occur outside of the lock, and fix
that issue, resolving #1586

Note, that the chunk map is still thread safe for get operations!

The chunk map was never intended to be modified async with our
changes, as we post to main to modify the map, however
we do still synchronize for write operations (put, remove)

We also synchronize for async get operations, ensuring that
async gets are safe.

We do not need to synchronize main thread gets as the processor
cache will be insync since the map is only updated on the main thread.

However, if someone does try to delete or put concurrently, we
will force their operation back to the main thread.
2018-10-18 22:41:23 -04:00
Andrew Steinborn
7141632abf Add Velocity IP forwarding support (#1557)
While Velocity supports BungeeCord-style IP forwarding, it is not secure. Users
have a lot of problems setting up firewalls or setting up plugins like IPWhitelist.
Further, the BungeeCord IP forwarding protocol still retains essentially its original
form, when there is brand new support for custom login plugin messages in 1.13.

Velocity's modern IP forwarding uses an HMAC-SHA256 code to ensure authenticity
of messages, is packed into a binary format that is smaller than BungeeCord's
forwarding, and is integrated into the Minecraft login process by using the 1.13
login plugin message packet.
2018-10-18 20:44:59 -04:00
Caleb Bassham
3b358452ba Add events for player changing spectator target (#1498)
* Add events for player changing spectator target

- Add PlayerStartSpectatingEntityEvent
- Add PlayerStopSpectatingEntityEvent
2018-10-18 16:53:10 -04:00
Aikar
42772e476a
[CI-SKIP] [Auto] Rebuild Patches
A recent commit has been made that caused patches to be out of order, rebuilding
2018-10-17 23:06:33 -04:00
Brokkonaut
4168fa182e Fire EntityCombustEvent for phantoms (#1573) 2018-10-17 23:04:21 -04:00
Aikar
00f0a30680
Ensure chunk neighbor counts do not get desynced
Mojang was not checking that the chunk did not overwrite, or
was successfully removed.

We're seeing odd reports in #1561 that indicates issues around
this are having problems.
2018-10-17 22:47:27 -04:00
Aikar
e047098814
MC-50319: Check other worlds for shooter of projectiles
Say a player shoots an arrow through a nether portal, the game
would lose the shooter for determining things such as Player Kills,
because the entity is in another world.

If the projectile fails to find the shooter in the current world, check
other worlds.
2018-10-17 19:30:57 -04:00
BillyGalbreath
52ae2a1aec
Implement getters and setters for EntityItem owner and thrower
Closes #1526
2018-10-16 22:17:59 -04:00
Zach Brown
6ec7d9f674
Fix equals case in lightning sounds 2018-10-16 21:40:32 -04:00