Commit Graph

729 Commits

Author SHA1 Message Date
Aikar
4c807f929e
Timings Improvements
use a better stack for managing timing tree relationships
remove unnecessary synchronization (i forgot HANDLERS is only touched on main)

this should hopefully resolve any data integrity concerns
2019-03-24 17:47:23 -04:00
Joel Paulien
830137acbe Add PlayerPostRespawnEvent (#1622) 2019-03-24 13:50:42 -04:00
Mark Vainomaa
556259dd97 Add GS4 query event (#1906) 2019-03-24 13:01:31 -04:00
Aikar
458aa79f63
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:
451bd74e Use gson for decoding version command

CraftBukkit Changes:
51100db8 SPIGOT-4678: Fix placing signs in certain circumstances
2019-03-24 12:33:39 -04:00
Zach Brown
c5ef31cb0d
Restore lost player cooldown APIs
Accidentally removed in 0976d52bbd
2019-03-24 13:16:59 -04:00
Aikar
e58c65bb37
Entity#getEntitySpawnReason
Allows you to return the SpawnReason for why an Entity Spawned

Pre existing entities will return NATURAL if it was a non
persistenting Living Entity, SPAWNER for spawners,
or DEFAULT since data was not stored.
2019-03-24 01:05:20 -04:00
Shane Freeder
ea855e2b46 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

Developers!: You will need to clean up your work/Minecraft/1.13.2 folder
for this

Also, restore a patch that was dropped in the last upstream

Bukkit Changes:
279eeab3 Fix command description not being set
96e2bb18 Remove debug print from SyntheticEventTest

CraftBukkit Changes:
d3ed1516 Fix dangerously threaded beacons
217a293d Don't relocate joptsimple to allow --help to work.
1be05a21 Prepare for imminent Java 12 release
a49270b2 Mappings Update
5259d80c SPIGOT-4669: Fix PlayerTeleportEvent coordinates for relative teleports

Spigot Changes:
e6eb36f2 Rebuild patches
2019-03-20 01:55:16 +00:00
Shane Freeder
0976d52bbd 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

Please note that this build includes changes to meet upstreams
requirements for nullability annotations. While we aim for a level of
accuracy, these might not be 100% correct, if there are any issues,
please speak to us on discord, or open an issue on the tracker to
discuss.

Bukkit Changes:
9a6a1de3 Remove nullability annotations from enum constructors
3f0591ea SPIGOT-2540: Add nullability annotations to entire Bukkit API

CraftBukkit Changes:
8d8475fc SPIGOT-4666: Force parameter in HumanEntity#sleep
8b1588e2 Fix ExplosionPrimeEvent#setFire not working with EnderCrystals
39a287b7 Don't ignore newlines in PlayerListHeader/Footer

Spigot Changes:
cf694d87 Add nullability annotations
2019-03-20 00:31:18 +00:00
Mark Vainomaa
bf2be652f0 Add WhitelistToggleEvent (#1899) 2019-03-13 16:51:42 -04:00
Zach Brown
825d17c326
Update upstream B/CB
--- work/Bukkit
Submodule work/Bukkit 96e09e50..0b95b68f:
  > SPIGOT-4650: Charging API for Vex

--- work/CraftBukkit
Submodule work/CraftBukkit f102d882..77ca7ca0:
  > Rebuild patches
  > Improve damage handling of dead entities
  > SPIGOT-4646: Test + fix InventoryWrapper.getContents
  > SPIGOT-4650: Charging API for Vex
2019-03-06 00:46:21 -05:00
Spottedleaf
e5f0d0f5dc
Fix World#getChunkAtAsync(Location) variants incorectly calculating chunk x
The blockX needs to be floored before converted to int, as float -> integer
operations are truncation. (i.e -0.5 -> 0, we want -0.5 -> -1)
2019-03-02 18:54:20 -05:00
Aikar
c83601bcff
Add ItemStack Recipe API helper methods
Allows using ExactChoice Recipes with easier methodss
2019-02-25 21:31:39 -05:00
Aikar
32b9e543d9
BlockDestroyEvent
Adds an event for when the server is going to destroy a current block,
potentially causing it to drop. This event can be cancelled to avoid
the block destruction, such as preventing signs from popping when
floating in the air.

This can replace many uses of BlockPhysicsEvent, as this will not fire
with the same velocity as BPE.
2019-02-25 21:26:12 -05:00
Zach Brown
1e38743b1d
Update upstream B/CB/S
Also fixes build as a result of an upstream force push

--- work/Bukkit
Submodule work/Bukkit 217dc08d..d13fdf8c:
  > SPIGOT-4637: Add source block to BlockPhysicsEvent.

--- work/CraftBukkit
Submodule work/CraftBukkit acbba8ba..cb98c6ea:
  > Fix line endings in CraftDefaultPermissions
  > SPIGOT-4637: Add source block to BlockPhysicsEvent.

--- work/Spigot
Submodule work/Spigot 75ee78a0c...4165cd8f4 (commits not present)
  > (Manually Added) - Appears to be a result of an upstream force push
  > (Manually Added) - Changed: SPIGOT-4636: Add creative mode NBT permissions
2019-02-25 04:39:24 -05:00
Aikar
91129b798e
[Auto] Updated Upstream (Bukkit)
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:
217dc08d SPIGOT-4634: Make Inventory iteration behaviour explicit
2019-02-25 03:16:35 -05:00
Aikar
d1b6d22eac
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:18:34 -05:00
Aikar
17b58d00d8
Unwrap Event Exceptions
This was a useless exception wrapper that ends up making
stack traces harder to read as well as the JVM cutting off
the important parts

Nothing catches this exception, so its safe to just get rid
of it and let the REAL exception bubble down
2019-02-23 12:17:41 -05:00
Aikar
13d1abf01e
Updated Upstream (Bukkit/CraftBukkit/Spigot)
Upstream has released updates that appears to apply and compile correctly.
This update has only been PARTIALLY tested by PaperMC and as with ANY update, please do your own testing

I've tested basic region file saving as well as our oversized chunks approach.

Bukkit Changes:
e167e549 Clarify MerchantInventory#getSelectedRecipe.
3a1d5b8f Apply default permissions by registration order.
c64cc93f Make tags Keyed
ec037ed7 Added a method to get a list of tags
bfb6ef86 Introduce rotation methods to the Vector class
fc727372 Remove draft API from FluidLevelChangeEvent

CraftBukkit Changes:
6430d9c0 SPIGOT-4632: BlockState location is not fixed
14cd1688 Fix CraftInventoryMerchant#getSelectedRecipe if there is no active merchant recipe.
c24abab7 Load custom permissions after default permissions.
bc99dfe8 Make tags Keyed
6fce004f Added a method to get a list of tags

Spigot Changes:
e5e5c7c6 Allow Saving Large Chunks
e8d3881c Rebuild patches
2019-02-21 22:41:40 -05:00
Shane Freeder
182d4f528f
Fix NPE during server initialization from server list pings 2019-02-06 19:15:46 +00: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
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
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
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
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
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
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
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
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
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
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
e6d31d59dd
No generics in javadocs, what are you doin 2018-11-21 22:26:18 -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
Shane Freeder
975491cb8b
Make the default permission message configurable 2018-11-18 19:54:38 +00: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
Aikar
5a310cdcdd
[Auto] Updated Upstream (Bukkit)
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:
3aee9dbd Add Material BlockData to JavaDocs
2018-11-12 02:46:43 -05: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
cf772531f4
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.
2018-11-09 21:46:12 +00: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
Shane Freeder
fc68e73647
Fix resource pack api (Fixes #1634) 2018-10-29 13:02:56 +00:00
Zach Brown
ece0b19c59
Update upstream B/CB/S 2018-10-28 18:08:08 -04:00
Zach Brown
c4865a6445
Update upstream B/CB/S 2018-10-27 00:07:20 -04:00
Shane Freeder
4424130177 Fix javadoc issues 2018-10-25 14:38:19 +01:00
Aikar
80b6894798
[Auto] Updated Upstream (Bukkit)
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:
162807b3 Remove some draft API designations
2018-10-25 06:01:38 -04:00
Shane Freeder
1387cff4e8
Update for Minecraft 1.13.2 2018-10-23 00:16:21 +01:00
BillyGalbreath
8c7f0e79ce Add more Witch API (#1564) 2018-10-18 23:24:09 -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
ed9a89e82e
Improvements to Timings Performance
1) Get rid of string interning. can be heavy, has been seen to cause issues for some users
2) Use ConcurrentHashMap instead of a SynchronizedMap
3) Stop use of MRUMapCache which is not thread safe for Group lookups
4) Stop using IdentityHashMap which has performance issues in Java 8
2018-10-17 22:09:08 -04:00
BillyGalbreath
52ae2a1aec
Implement getters and setters for EntityItem owner and thrower
Closes #1526
2018-10-16 22:17:59 -04:00
Trigary
20515a30ae
Limit lightning strike effect distance
Resolves GH-1436
2018-10-16 21:23:44 -04:00
Aikar
69a4a30e47
[CI-SKIP] [Auto] Rebuild Patches
A recent commit has been made that caused patches to be out of order, rebuilding
2018-10-12 03:11:50 -04:00
BillyGalbreath
3b580e8aa9 Here's Johnny! (#1563)
Adds Johnny API to Vindicator
2018-10-12 03:09:53 -04:00
Aikar
dc6dbeb6ad
[CI-SKIP] [Auto] Rebuild Patches
A recent commit has been made that caused patches to be out of order, rebuilding
2018-10-11 21:46:35 -04:00
BillyGalbreath
a16ef75bfd Add sun related API (#1546)
These methods are used internally throughout the game for things like spawning mobs during day/night only or making them burn in daylight, etc. Now exposed for plugin usage.
2018-10-11 21:42:49 -04:00
Aikar
69cad796ab
Ignore colorable size in test, NMS Tags not loaded at unit test
runtime materials is different than unit test.

prob going to run into this again in future, will worry about it then
2018-10-10 23:40:52 -04:00
BillyGalbreath
fe01fa5641 Turtle API (#1509) 2018-10-10 23:40:49 -04:00
BillyGalbreath
b1b6a6c4e2 Add LivingEntity#getTargetEntity (#1467) 2018-10-08 21:14:55 -04:00
Spottedleaf
676ba6206d
Fix MaterialTagTest deterministic ordering
Tacos > Burritos
2018-10-08 01:33:25 -04:00
BillyGalbreath
0ca403459b Allow setting the vex's summoner (#1545) 2018-10-06 23:31:21 -04:00
Aikar
06eff136c8
rename Material.isAir to Material.isEmpty
represents what its more for, and aligns with future Minecraft goals
2018-10-06 22:00:13 -04:00
Aikar
6cc16bffe6
MaterialTags API
This adds a plethora of useful Tags to let you identify common grouping
of materials. This should complete all of the categories that mojang
did not provide official tags for plus some more.

These are not "registered" tags. They are not usable in any form of
command system that might support tags.

These are provided as a Paper maintained list of items so that plugins
do not have to worry about maintaining all these tags themselves.

This API can technically be copy and pasted into a plugin, and plugins
can add additional Tags's if they wish too to their plugin by
instantiating a MaterialSetTag.
2018-10-06 21:42:45 -04:00
Aikar
efd4acf4c9
Add Material.isAir API
Because mojang, we now have 3 airs.
2018-10-06 21:42:45 -04:00
Aikar
aad2e08482
[CI-SKIP] Remove Trove and update to fastutul 8 on -api
These deps were marked as provided, not compile, so they were never
exposed to plugins anyways as we THOUGHT we had done, oops.

Well plugins can still add fastutil to their build and use the
deps as provided by minecraft.

This ensures -api side does not use a deprecated API as fastutil 8
removed the deprecated methods.
2018-10-03 21:32:11 -04:00
Shane Freeder
2dcae290df 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
9038677c89
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
Zach Brown
cfc7baeefb
Add support for Java 11 to deprecated Timings API
In Java 11 the internal reflection method used to determine the calling
class in the legacy and deprecated Timings API, that no one should be
using anymore, was removed.

This means plugins that try and use it will all fail to enable and we
can't compile the server with JDK 11.

The solution to the removal of this internal reflection class is
to just use reflection to call it if its available and fall back to
the unnamed handler system if it isnt.

Update to the newer API if you use Timings already...
2018-09-29 14:05:24 -04:00
Aikar
b62dfa0bf9
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:
39ce5d3a SPIGOT-4399: ItemMeta.equals broken with AttributeModifiers

CraftBukkit Changes:
1cf8b5dc SPIGOT-4400: Populators running on existing chunks
116cb9a1 SPIGOT-4399: Add attribute modifier equality test
5ee1c18a SPIGOT-4398: Set ASM7_EXPERIMENTAL flag
2018-09-28 19:31:59 -04:00
Aikar
2365b308c8
Updated Upstream (Bukkit/CraftBukkit/Spigot)
Upstream has released updates that appears to apply and compile correctly.

This update has been tested to ensure that World Conversion still occurs correctly.

Bukkit Changes:
0812ce2c SPIGOT-4397: isChunkGenerated API

CraftBukkit Changes:
4824655c SPIGOT-4398: Upgrade to ASM 6.2.1 for better Java 11 support
eea43870 MC-134115: Fix issues converting tile entities
1a7f2d10 SPIGOT-4397: isChunkGenerated API
40aed54d SPIGOT-4396: Improve vehicle movement

Spigot Changes:
f6a273b1 Rebuild patches
2018-09-26 22:35:46 -04:00
Zach Brown
ec1012b5d5
Allow zero revive health when it matches maxHealth
Apparently a zero max health attribute is perfectly fine in vanilla and
our own revive handling code appears to handle the case fine, even when
EntityDeathEvent is cancelled. So we should allow it to avoid issues
when these mobs are killed.
2018-09-24 20:48:21 -04:00
Aikar
917d582441
[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:
b9620fd9 API to generate filled explorer maps

CraftBukkit Changes:
c1ecaa2f API to generate filled explorer maps
2018-09-24 05:41:32 -04:00
Mark Vainomaa
3491f5542e Create API for CanPlaceOn and CanDestroy NBT tags (#1015) 2018-09-22 23:30:54 -04:00
BillyGalbreath
df72ca1321 Expose attack cooldown methods for Player (#1412) 2018-09-22 23:03:53 -04:00
Aikar
cce969a59d
Remove Precondition on name for AttributeModifier
Vanilla allows empty names
2018-09-22 18:42:03 -04:00
Zach Brown
44406d43b3
Fix up maven stuff hopefully 2018-09-22 12:58:09 -04:00
Aikar
7438edc9a1
Rework Async Chunks API in prep for merge, add utility
This adds a new Future based, Consumer<Chunk> based, and ability
to control whether or not to generate to the Async Chunk API.

Until Async Chunks merges, these API's are still synchronous, but
this commit will allow plugins to start using the API's in use
with the Async Chunks beta.
2018-09-21 16:56:08 -04:00
Max Lee
1e66b061fa Add a separate PreSpawnerSpawnEvent (#1455)
This event extends the PreCreatureSpawnEvent and includes the position
of the spawner that spawned the entitiy. (similarly to how the
SpawnerSpawnEvent contains the spawner's BlockState).

This one doesn't include the state though as getting the block and
generating that snapshot is a bit wasteful.
2018-09-18 19:34:11 -04:00
Tassu
03c8b8ec27 Implement furnace cook speed multiplier API. (#1437)
Adds methods `Furnace#getCookSpeedMultiplier()` and
`Furnace#setCookSpeedMultiplier(double)`.

This PR is basically 3516ae34ef for 1.13.

A test plugin may be found [here](https://gist.github.com/supertassu/fade0cce946261732c6299e1ec89290e).
2018-09-17 18:53:27 -04:00
Aikar
d7686f129f
Add ItemStackRecipeChoice Draft API
This is based on Spigots Draft API. This is subject to change

Allows creating recipes that must match isSimilar to full item stack.
2018-09-13 21:41:19 -04:00
Aikar
998bf84e4c
Performance & Concurrency Improvements to Permissions
Modifying of permissions was only half protected, enabling concurrency
issues to occur if permissions were modified async.

While no plugin really should be doing that, modifying operations
are not heavily called, so they are safe to add synchronization to.

Now, all modification API's will be synchronized ensuring safety.

Additionally, hasPermission was victim to a common java newbie mistake
of calling if (containsKey(k)) return get(k), resulting in 2 map lookups.

Optimized it to simply be a single get call cutting permission map
lookups in half.
2018-09-13 20:55:31 -04:00
Zach Brown
298f2a4cdf
Update branch name for GitHub version checking 2018-09-13 12:20:02 -04:00
Aikar
cf1fe85b04
Mob Pathfinding API
Adds an API to allow plugins to instruct a Mob to Pathfind to a Location or Entity

This does not do anything to stop other AI rules from changing the location, so
it is still up to the plugin to control that or override after another goal changed
the location.
2018-09-09 21:50:12 -04:00
Aikar
b3a9fc3bf9
Rename some methods per discussion in channel 2018-09-09 21:45:54 -04:00
Aikar
55afdc44c9
You can use EntityPathfindEvent to cancel new pathfinds from overriding your current 2018-09-09 14:48:32 -04:00
Aikar
05edb779e0
getextPointIndex was not needing to be boxed/nullable 2018-09-09 14:36:51 -04:00
Aikar
16efbae731
Mob Pathfinding API
Adds an API to allow plugins to instruct a Mob to Pathfind to a Location or Entity

This does not do anything to stop other AI rules from changing the location, so
it is still up to the plugin to control that or override after another goal changed
the location.
2018-09-09 14:31:08 -04:00
Aikar
3c62f3723d
Merge branch 'master' into pre/1.13
* master:
  Remove no longer needed tests due to last change
2018-09-09 01:19:34 -04:00
Aikar
6793fee387
Remove no longer needed tests due to last change 2018-09-09 01:14:18 -04:00
Aikar
6e39ed3c6d
Merge branch 'master' into pre/1.13
* master:
  Remove deadlock risk in firing async events
2018-09-09 01:06:44 -04:00
Aikar
5228a4f24c
Remove deadlock risk in firing async events
The PluginManager incorrectly used synchronization on firing any event
that was marked as synchronous.

This synchronized did not even protect any concurrency risk as
handlers were already thread safe in terms of mutations during event
dispatch.

The way it was used, has commonly led to deadlocks on the server,
which results in a hard crash.

This change removes the synchronize and adds some protection around enable/disable
2018-09-09 01:04:59 -04:00
chickeneer
dfa6e717fb Fix invalid data types for particles and fix colors in the ParticleBuilder (#1422)
* Fix invalid data types for particles and fix colors in the ParticleBuilder
2018-09-08 19:52:56 -04:00
Zach Brown
1bce77696d
Merge branch 'master' into pre/1.13 2018-09-08 19:12:58 -04:00
Max Lee
4e30b91d4e Improve death events (#1362)
* Improve death events

This adds the ability to cancel the events and to specify the sound.
2018-09-07 20:14:48 -04:00
BillyGalbreath
997190c3e0 Add ray tracing methods to LivingEntity (#1410)
This method will return the Block a player is looking at while taking into consideration the AABB of each block in the path.

For example, you can look through the 1/4 space of air in a Stair block and get the block behind it instead of the Stair block you are looking past.
2018-09-03 19:59:54 -04:00
Aikar
33bdd20193
[CI-SKIP] [Auto] Rebuild Patches
A recent commit has been made that caused patches to be out of order, rebuilding
2018-09-03 10:11:35 -04:00
willies952002
b55b3af9e1 Add Force-Loaded Chunk API (#1387) 2018-09-03 10:05:55 -04:00
Aikar
222147db5d
[Auto] 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:
8ab814cd Add getFacing method to get the current cardinal direction an entity is facing.

CraftBukkit Changes:
ee5efeb0 Add getFacing method to get the current cardinal direction an entity is facing.

Spigot Changes:
0ede7d0e Rebuild patches
2018-09-03 04:14:40 -04:00
Aikar
62153085aa
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:
eaf05a2a Expand Recipe API to allow multiple Materials per slot

CraftBukkit Changes:
4c219e2a Expand Recipe API to allow multiple Materials per slot
2018-08-31 23:53:54 -04:00
Aikar
50768eb975
Improvements to Timings
With 1.13, the idea of accessing chunks async is going to have to
be supported with the push towards thread safe chunk access mojang
has done.

This commit changes timings to always thread check at start and stop
timings and only mutate state on main thread.

This makes startTimingIfSync pointless, but I'm just going to leave
it as is.

Timings will no longer complain when used async, it just will not
do anything.

Further concurrency issues have been addressed with creating
timings handlers that may of overall been an issue for any handler
that might of been created async (happened even for things that
only timed sync)

with that, the 'protected' concept of handlers has been removed,
and 'plugin' vs 'safe' handlers are now the same.

Got rid of some guava functions in favor of java 8 real stuff now too.
2018-08-30 20:43:15 -04:00
Aikar
5e7e79880e
[Auto] Updated Upstream (Bukkit)
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:
28237f03 SPIGOT-4330: Improve isSimilar for legacy stacks
2018-08-29 21:54:31 -04:00
Zach Brown
f8b40558fd
Add Inventory#removeItemAnySlot
Closes GH-1360

This behaves identically to Inventory#removeItem, except it
searches all slots rather than just the storage contents.
2018-08-29 21:41:39 -04:00
Aikar
765a548c68
[Auto] Updated Upstream (Bukkit)
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:
aa81efb0 Remove some additional draft API markings
2018-08-29 03:09:34 -04:00
BillyGalbreath
7dff42b4ae Add More Creeper API (#1372) 2018-08-27 03:01:08 -04:00
BillyGalbreath
2d0c9eea98 Add PhantomSpawnEvent (#1375) 2018-08-27 02:51:20 -04:00
Aikar
c2c61055b6
[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:
410a601d SPIGOT-4313: Unsupported plugin should not crash server

CraftBukkit Changes:
f5985747 SPIGOT-4313: Unsupported plugin should not crash server
2018-08-26 23:05:00 -04:00
Aikar
835bc39b03
Paper 1.13.1 Update
Updated Upstream (Bukkit/CraftBukkit/Spigot)

Bukkit Changes:
2dcc44dc SPIGOT-4307: Fix hacky API for banners on shields
e0fc6572 SPIGOT-4309: Add "forced" display of particles
efeeab2f Add index to README.md for easier navigation
f502bc6f Update to Minecraft 1.13.1

CraftBukkit Changes:
d0bb0a1d Fix some tests randomly failing
997d378d Fix client stall in specific teleportation scenarios
b3dc2366 SPIGOT-4307: Fix hacky API for banners on shields
2a271162 SPIGOT-4301: Fix more invalid enchants
5d0d83bb SPIGOT-4309: Add "forced" display of particles
a6772578 Add additional tests for CraftBlockData
ce1af0c3 Update to Minecraft 1.13.1

Spigot Changes:
2440e189 Rebuild patches
4ecffced Update to Minecraft 1.13.1
2018-08-26 20:51:39 -04:00
Aikar
da126a405e
[Auto] Updated Upstream (Bukkit)
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:
23c1a2ba Deprecate ItemStack durability methods in favour of ItemMeta Damageable as they are being frequently used incorrectly.
2018-08-25 08:34:37 -04:00
Zach Brown
12cf81881c
Merge branch 'master' into pre/1.13 2018-08-24 12:15:59 -04:00
BillyGalbreath
56569f7812 1.13: Slime Patherfinder Events (#1246)
Replaces PR #1161 for 1.13

Resolves #930 

Adds new slime pathfinder related events. All events can be cancelled.
- `SlimePathfindEvent` is the base event of all added events. Cancelling this event will cancel all pathfinders.
- `SlimeWanderEvent` is called when slimes wander around by either swimming or moving/jumping forward. Cancelling this event will prevent slimes from moving around and jumping, but they will still look around and target players.
- `SlimeSwimEvent`is called when slimes are swimming in water/lava. Cancelling will prevent the slimes from moving/jumping in water/lava.
- `SlimeChangeDirectionEvent` is called when a slime changes directions. It contains the new `yaw` position the slime wants to change to, and it can be set to another value. Cancelling this event will prevent slimes from changing directions (except for when targeting players).
- `SlimeTargetLivingEntityEvent` is called when a slime targets a player. NMS uses EntityLiving here so it is named this. Contains the LivingEntity the slime has targeted. Cancelling this event will prevent the slime from targeting the entity and will make it lose current focus.

Adds `Slime#canWander()` and `Slime#setWander(boolean)` for a more persistent control (does not persist server restarts) over all 4 pathfinder types without the spammy event having to be cancelled a bajillion times a second.

Video demonstration: https://youtu.be/8hcLqazmO28

Test plugin: https://pastebin.com/cFgcgdWV
2018-08-24 10:40:14 -04:00
cakoyo
a1e9cd39d2 Add source block to BlockPhysicsEvent (#1364)
Resolves #1275 

For plants, the source block is itself, because the `changed` type is itself.
2018-08-24 10:38:31 -04:00
Christopher White
6c32ee4a5c Add isChunkGenerated API (#1363)
Resolves #1329
2018-08-22 21:13:03 -04:00
Aikar
41ecb86304
Merge branch 'master' into pre/1.13
* master:
  add World#getLocationAtKey for Block Key API
2018-08-19 11:53:05 -04:00
Aikar
66733df5f9
add World#getLocationAtKey for Block Key API
For when you don't want to actually load the block
2018-08-19 11:50:40 -04:00
Aikar
d6df1e92f0
[Auto] Updated Upstream (Bukkit)
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:
fd6a980a Fix PlayerInventory.setItem docs
2018-08-19 00:29:35 -04:00
Zach Brown
3cc691efd8
Merge branch 'master' into pre/1.13 2018-08-18 04:12:45 -05:00
Aikar
fa254d2142
[CI-SKIP] [Auto] Rebuild Patches
A recent commit has been made that caused patches to be out of order, rebuilding
2018-08-17 18:01:37 -04:00
BillyGalbreath
04f6110896 1.13: Player launch projectile event (#1249)
Replaces PR #1193 for 1.13

I'm pretty sure I got all player launched projectiles (except arrows). Let me know if I missed any.

This fixes a use-case specific issue that was discovered [here](https://www.spigotmc.org/threads/projectilehitevent-doesnt-work-in-survival-mode.327097/page-2#post-3059433). I have a use-case example a few posts down, [here](https://www.spigotmc.org/threads/projectilehitevent-doesnt-work-in-survival-mode.327097/page-2#post-3060204).
2018-08-17 17:55:40 -04:00
searchndstroy
af57a5fed5 Allow Blocks to be accessed via a long key (#1335)
The key can be retrieved via methods Location#toBlockKey() and
Block#getBlockKey()

World provides lookup for blocks by long key via method World#getBlockAtKey(long)

The formatting for the key is as follows:

10 bit y|27 bit z|27 bit x

The y value is considered unsigned while z and x are considered two's complement

Y range: [0, 1023]
X, Z range: [-67 108 864, 67 108 863]


Checked encoding and decoding via https://gist.github.com/Spottedleaf/74f4e241012ca2fa67d8f1c7e8e34722
2018-08-17 17:55:01 -04:00
Aikar
3d1abdee73
[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:
f7662d5c SPIGOT-4283: Allow setting recipe groups

CraftBukkit Changes:
bfb91314 SPIGOT-4283: Allow setting recipe groups
2018-08-17 06:49:39 -04:00
Shane Freeder
98d4ba9dce
Cleanup javadoc warnings for 1.13 2018-08-17 05:29:16 +01:00
Shane Freeder
039d6f2f75
Merge branch 'master' into pre/1.13 2018-08-17 05:10:45 +01:00
Shane Freeder
4f4a4fc100
Cleanup javadoc warnings 2018-08-17 04:02:03 +01:00
Aikar
5302850894
Merge branch 'master' into pre/1.13
* master:
  Fix bug in last patch
  Ensure chunks are always loaded on hard position sets
  Improve Watchdog Early Warning Feature - Closes #1319
  Allow disabling armour stand ticking
2018-08-16 18:25:44 -04:00
kashike
edb9d18aed Allow disabling armour stand ticking 2018-08-15 01:29:41 -07:00
Aikar
7d915467fe
[Auto] Updated Upstream (Bukkit)
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:
7ba8d633 SPIGOT-4265: Declare org.bukkit module
2018-08-15 02:15:28 -04:00
Aikar
36e6c991af
Ability to get Tile Entities from chunks without snapshots
Also make Timings use said new feature and not create snapshots on it reading data
2018-08-15 01:20:40 -04:00
Aikar
4c1a7f1265
Provide Chunk Coordinates as a Long API
Allows you to easily access the chunks X/z as a long, and a method
to look up by the long key too.
2018-08-14 18:43:17 -04:00
Shane Freeder
466e43b16d
Merge branch 'master' into pre/1.13 2018-08-14 16:26:01 +01:00
chickeneer
bd1d0bf426 Add a force option to the ParticleBuilder API (#1322)
Particle packets contain a boolean which marks the particle to either force or show normal to the receiver.
Spigot has been sending all particles with the force boolean which overrides client particle settings.

Related changes in this commit;
- Add a force option to the ParticleBuilder API, which defaults to true to keep spigot consistent with existing api.
- Add a new spawnParticle method to support this mode as a parameter. Of course kept existing api methods the same so as to not break them.

Let me know if changes are needed.
2018-08-14 01:42:31 -04:00
Aikar
3a70bed5f4
Updated Upstream (Bukkit/CraftBukkit) for LootTable API
I have tested that the Replenishing Feature still works as expected.
Lootable API's that now have Bukkit equivalents are now deprecated.

Bukkit Changes:
f0f33981 SPIGOT-1936: LootTable API

CraftBukkit Changes:
c0df4b82 SPIGOT-1936: LootTable API
2018-08-12 13:11:13 -04:00
Aikar
4bb44d2fcb
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:
c23d391f Update documentation of BlockPhysicsEvent
14fcd896 SPIGOT-4258: Add Player.updateCommands method

CraftBukkit Changes:
15da7067 SPIGOT-4258: Add Player.updateCommands method

Spigot Changes:
2b0e71c7 Rebuild patches
2018-08-12 02:08:09 -04:00
Aikar
a288b486ae
[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:
1f85e526 SPIGOT-4253: Add way to prioritise item conversion

CraftBukkit Changes:
96778caa SPIGOT-4253: Add way to prioritise item conversion
2018-08-11 03:49:37 -04:00
Aikar
f835a91d15
Updated Upstream (Bukkit/CraftBukkit), deprecate SentientNPC API
Upstream has added the equivalent of our SentientNPC API, with exception to the EnderDragon.

We've added Mob to the EnderDragon, and our SentientNPC API should behave the same.

Vex#getOwner has been deprecated and a replacement Vex#getSummoner has been added using Mob.

However, since 1.13 is not production ready, SentientNPC API is subject for removal in 1.13.1 since
1.13 API is not compatible with 1.12.

Please move to the Mob interface ASAP.

This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
c5ab54d8 Expand GameRule API
ab9a606c Improve entity hierarchy by adding Mob interface.

CraftBukkit Changes:
29e75648 Expand GameRule API
50e6858b Improve entity hierarchy by adding Mob interface.
0e1d79b4 Correct error in previous patch
2018-08-10 22:20:59 -04:00
Shane Freeder
c2c18b2b7f
Don't reset current tick based on system time 2018-08-10 15:27:42 +01:00
Aikar
c86adf99ca
[Auto] Updated Upstream (Bukkit)
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:
6875ad8b Update documentation and status of command completion related events
2018-08-09 18:29:38 -04:00
Aikar
85bfc4508a
[CI-SKIP] [Auto] Rebuild Patches
A recent commit has been made that caused patches to be out of order, rebuilding
2018-08-07 10:51:42 -04:00
BillyGalbreath
dd17f98e61 [1.13] Hand for bucket events (#1300)
This adds the `getHand()` method to the `PlayerBucketEvent`s
2018-08-07 10:44:44 -04:00
Aikar
a96460a635
[Auto] Updated Upstream (Bukkit)
upcommit

Bukkit Changes:
dd18c0fc Deprecate and add note to regenerateChunk method
2018-08-06 23:19:31 -04:00
Brokkonaut
d5eb80049c [1.13] Skull block profile api (#1308)
Adds #1307
2018-08-06 01:24:55 -04:00
Aikar
a4e7bdb306
[Auto] Rebuild Patches
A recent commit has been made that caused patches to be out of order, rebuilding
2018-08-05 18:55:03 -04:00
BillyGalbreath
adcd0c1505 SkeletonHorse Additions (#1283) 2018-08-04 21:12:41 -04:00
Aikar
93fa0ac04a
Provide Chunk Coordinates as a Long API
Allows you to easily access the chunks X/z as a long, and a method
to look up by the long key too.
2018-08-04 19:38:58 -04:00
Aikar
7fe0b31e5f
remove PotionEffect color API as it was removed upstream
appears that value was never even used anyways
2018-08-03 21:23:57 -04:00
Aikar
eabe735a12
update upstream 2018-08-03 20:31:44 -04:00
Aikar
1abd4d51c1
Update upstream 2018-08-01 22:49:47 -04:00
Aikar
4be4037e3d
Merge pull request #1214
b854308c Add TNTPrimeEvent (Mark Vainomaa)

* pull/1214/head:
  Add TNTPrimeEvent
2018-07-31 02:01:27 -04:00
Aikar
76e1e4d79f
Update Upstream
Removed my ChunkLoadEvent patch as upstream fixed it
2018-07-30 01:08:59 -04:00
Aikar
c7dcc8ce89
Merge pull request #1244
3e19de0c Rebuild Patches (BillyGalbreath)
8e5db995 AnvilDamageEvent (BillyGalbreath)

* pull/1244/head:
  Rebuild Patches
  AnvilDamageEvent
2018-07-30 00:12:03 -04:00
Anthony MacAllister
4fa289b8ba EntityTransformedEvent (#1281) 2018-07-29 23:54:13 -04:00
willies952002
4fb5e0fe14 Expand ArmorStand API (#1277)
Add the following:
- Add proper methods for getting and setting items in both hands. Deprecates old methods
- Enable/Disable slot interactions
2018-07-29 23:53:59 -04:00
Aikar
b9b32ba7dc
Update upstream 2018-07-29 22:16:15 -04:00
Aikar
566740114e
update upstream 2018-07-29 12:42:07 -04:00
BillyGalbreath
3e19de0cf5 Rebuild Patches 2018-07-28 22:15:52 -05:00
BillyGalbreath
b3b0b9f24a Merge branch 'pre/1.13' of https://github.com/PaperMC/Paper into AnvilDamageEvent 2018-07-28 22:02:56 -05:00
BillyGalbreath
8e5db99552 AnvilDamageEvent 2018-07-28 01:33:36 -05:00
BillyGalbreath
fa9224721e 1.13: EnderDragon Events (#1247)
Replaces PR #1185 for 1.13

Add some new cancellable enderdragon events dealing with its fireball shooting and the areaeffectcloud it spawns. Based on [talking with someone with a specific use-case](https://www.spigotmc.org/threads/cancel-projectilehitevent.326466/) this was [confirmed to work](http://i.imgur.com/ezlfpKC.png) for them in PM.
2018-07-28 02:03:10 -04:00
Zach Brown
64e27b40d9
Move part of last change into proper file 2018-07-25 21:55:25 -05:00
Zach Brown
e64513b585
Remove deprecated AuthLib API from Paper-API
Use the PlayerProfile API as a replacement
2018-07-25 21:49:43 -05:00
Aikar
48d75228ed
Update upstream 2018-07-25 19:05:07 -04:00
Aikar
ee9416b07d
Merge branch 'master' into pre/1.13
* master:
  Expand Location Manipulation API - Closes #1265
2018-07-25 01:38:59 -04:00
Aikar
cae33c7e3c
Expand Location Manipulation API - Closes #1265
Adds set(x, y, z), add(base, x, y, z), subtract(base, x, y, z);
2018-07-25 01:38:37 -04:00
Aikar
4f7a858bd6
Merge pull request #1248
c2d29a73 PlayerElytraBoostEvent (BillyGalbreath)

* pull/1248/head:
  PlayerElytraBoostEvent

Also merged paper config into parent
2018-07-23 20:29:55 -04:00
Aikar
1b3658b2c4
Merge pull request #1257
0069113b Put the decompile fixes into MC Dev Fixes patch (Andrew Steinborn)
608b5e52 Optimize RegistryID.c() (Andrew Steinborn)

* pull/1257/head:
  Put the decompile fixes into MC Dev Fixes patch
  Optimize RegistryID.c()
2018-07-23 20:15:56 -04:00
Aikar
9a17bddf12
Update upstream 2018-07-23 19:41:14 -04:00
Andrew Steinborn
0069113b2e Put the decompile fixes into MC Dev Fixes patch 2018-07-23 13:10:06 -04:00
Andrew Steinborn
608b5e5235 Optimize RegistryID.c()
Fixes #1253
2018-07-23 12:58:48 -04:00
Shane Freeder
aad194a32e
Update B/CB/S 2018-07-23 09:44:57 +01:00
Aikar
e2c75e81f7
Update Paper to 1.13 proper - THIS IS STILL HIGHLY UNSTABLE
DO NOT RUN ON PRODUCTION SERVERS!!! Use Backups!!
2018-07-22 01:27:46 -04:00
Aikar
39ea0d21dc
Restore World.loadChunkAsync API - but load chunks sync
We are still missing Async Chunk Loading, but plugins may be
depending on this API, so it missing blocks upgrading.
2018-07-21 16:55:43 -04:00
BillyGalbreath
c2d29a73ac PlayerElytraBoostEvent 2018-07-21 02:00:31 -05:00
Shane Freeder
1fe8472503
update B/CB/S 2018-07-20 20:57:43 +01:00
Zach Brown
09663381ca
Use 1.13 branch and builds for versioning 2018-07-19 17:33:29 -05:00
Zach Brown
613db95e01
Add an asterisk to plugins onEnable and in command
Easy visual indicator for server admins to tell which plugins are
operating under the legacy compat mode, and which have been updated.
2018-07-19 15:08:07 -05:00
Shane Freeder
84c98c2ba8
NOT FINISHED! She compiles, and she... suffers the wrath of chunkgen... 2018-07-19 05:42:43 +01:00
Mark Vainomaa
b854308c88
Add TNTPrimeEvent 2018-07-16 14:32:13 +03:00
Aikar
5b6dfb3463
NOT FINISHED!!! Current Progress on 1.13-pre7 update
This work is 100% unfinished. I am pushing it up so that we as a team
can work on this update.

Do not try to use this branch. You will fail.
2018-07-16 00:13:29 -04:00
Aikar
a8c28e1920
Initial Paper-API for Bukkit 1.13 Preview 4 - THIS IS NOT SERVER
This branch/commit is only useful to those who purely use a clean Bukkit/Spigot/Paper API
and does not use NMS/OBC references.

This will let you start updating your plugin to the latest 1.13 builds of Bukkit Preview (4 as of now)

Note that this release is not final!!! API breakages may occur!

It is up to you if you find use out of this work.
2018-07-14 21:53:22 -04:00
Zach Brown
5b02e5736a
Update upstream B/CB 2018-07-13 02:39:44 -05:00
Aikar
3d1f804a22
Vex#getOwner API
Get's the NPC that summoned this Vex
2018-07-04 15:32:30 -04:00
Aikar
18c3716c49
Current Chunk for Entity and Block Entities, counts by entity type
This enables us a fast reference to the entities current chunk instead
of having to look it up by hashmap lookups.

We also store counts by type to further enable other performance optimizations in later patches.
2018-07-04 03:58:56 -04:00
Aikar
f534210885
InventoryCloseEvent Reason API
Allows you to determine why an inventory was closed, enabling plugin developers
to "confirm" things based on if it was player triggered close or not.
2018-07-03 21:57:33 -04:00
Brokkonaut
e19ed02025
Add World.getEntity(UUID) API
This is the best way to get an entity when the world and its UUID are known.
It is faster than Server.getEntity(UUID) because it does not have to iterate all worlds
2018-07-03 14:53:28 -05:00
Brokkonaut
2ed792d699
Improve ProjectileHitEvent to include the BlockFace where the projectile has hit (#1182) 2018-07-03 14:34:42 -05:00
Aikar
2adb879802
Add Critical missing Bukkit API - setTarget/getTarget moved down to SentientNPC
This fixes a CRITICAL missing part of the Bukkit API due to mistakes on upstream
refusing to implement the Sentient NPC baseclass of all NPC's.

Until now, the Bukkit API has not provided a way for accessing and setting
a non creature entities target.

Although Flying, Slime, Ambient, and Water mobs all supported targets internally,
you were unable to get/set it.

Now with the SentientNPC API and these API's moved down, every sentient NPC has
access to target data.
2018-07-01 22:10:21 -04:00
Aikar
5659d66915
Subtraction goes down, not up. Silly me. 2018-06-30 04:45:17 -04:00
Aikar
98555e9b90
LivingEntity Hand Raised/Item Use API
How long an entity has raised hands to charge an attack or use an item

Also aliased isHandsRaised for isChargingAttack in RangedEntity
2018-06-29 00:55:29 -04:00
Aikar
7abf2eeeac
RangedEntity API
Allows you to determine if an entity is capable of ranged attacks,
and to perform an attack.
2018-06-26 22:08:01 -04:00
Aikar
ae79aa3436
EntityPathfindEvent should be an EntityEvent 2018-06-25 22:09:11 -04:00
Aikar
ff572760c4
ItemStack API additions for quantity/flags/lore 2018-06-22 23:03:46 -04:00
Aikar
980d53d156
Expand Explosions API
Add Entity as a Source capability, and add more API choices, and on Location.
2018-06-20 23:19:46 -04:00
Brokkonaut
a5285de480 Add EntityKnockbackByEntityEvent (#1162)
This event is called when an entity receives knockback by another entity. The knockback can be modified in the event. If the event is cancelled the entity is not knocked back.
2018-06-20 21:59:11 -04:00