Commit graph

598 commits

Author SHA1 Message Date
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
BillyGalbreath 4f20c7ab67 Add "getNearbyXXX" methods to Location (#1160) 2018-06-20 21:30:09 -04:00
theminecoder b02d49beaa Fix PluginCommand to not wrap exceptions before ServerExceptionEvent can get to it (#1130) 2018-06-18 16:03:09 -05:00
BillyGalbreath efb52083b9 [CI-SKIP] Clarify Event#callEvent() JavaDoc (#1158) 2018-06-18 15:42:39 -05:00
Aikar c92fa14d36
PlayerReadyArrowEvent
Called when a player is firing a bow and the server is choosing an arrow to use.
Plugins can skip selection of certain arrows and control which is used.
2018-06-18 01:13:16 -04:00
Aikar 76d60b167f
EntityShootBowEvent consumeArrow and getArrowItem API
Adds ability to get what arrow was shot, and control if it should be consumed.
2018-06-18 00:39:04 -04:00
Aikar 708d52ca03
Ignore Missing Recipes in RecipeBook to avoid data errors
This code was causing NPE's in saving player data, potentially related to reloads.
2018-06-16 16:30:29 -04:00
BillyGalbreath 1ae07ecf52 Make shield blocking delay configurable (#1154)
Resolves #1153
2018-06-16 15:54:35 -04:00
Aikar 89aa04f9ed
Make SentientNPC extend LivingEntity 2018-06-16 14:28:13 -04:00
Aikar ed61b2982e
Add SentientNPC Interface to Entities
Used to determine ACTUAL Living NPC's. Spigot mistakenly inversed the conditions for LivingEntity, and
used LivingEntity for Insentient Entities, and named the actual EntityLiving class EntityInsentient.

This should of all been inversed on the implementation side. To make matters worse, Spigot never
exposed the differentiator that there are entities with AI that are not sentient/alive such as
Armor stands and Players are the only things that do not implement the REAL EntityLiving class (named Insentient internally)

This interface lets you identify NPC entities capable of sentience, and able to move about and react to the world.
2018-06-16 14:01:01 -04:00
Shane Freeder 2c1d1ac456
Fix compat with PluginClassloader implementations 2018-06-12 16:10:01 +01:00
Shane Freeder 586435d325
Cleanup last commit (Remember, always git diff!)
Because the one time you don't...
2018-06-09 20:03:42 +01:00
Shane Freeder f022bc006f
Only close classloaders unless implict, reload or error on enabling (Closes #1120)
We also expose the control of this behavior to the API, while retaining
the old behavior unless implictly requested.
2018-06-09 18:58:04 +01:00
Shane Freeder 5913a2cc1a
Add EntityTeleportEndGatewayEvent for entities (closes #1124) 2018-06-09 14:21:40 +01:00
Aikar 72c26039eb
Fix potential for NPE if receivers is null and the world was empty 2018-06-06 21:45:30 -04:00
Aikar d4dffd1d71
ParticleBuilder.hasReceivers shouldnt return true if no players are in the world 2018-06-06 21:35:44 -04:00
Aikar fd4a65c566
Expand ParticleBuilder more with hasReceivers, fix empty receivers list 2018-06-06 21:27:50 -04:00
Aikar 11cb276a4a
Expand particle builder API with radius based radius methods 2018-06-06 20:59:04 -04:00
Aikar 2e423c8954
ItemStack#getMaxItemUseDuration
Allows you to determine how long it takes to use a usable/consumable item
2018-06-05 23:01:16 -04:00
Aikar b97e5124e4
WitchReadyPotionEvent
Control what potion the witch readies to use
2018-06-05 22:48:48 -04:00
Aikar 5c8bd61d24
PotionEffect clone methods
Help with modifying potion effects
2018-06-04 01:55:52 -04:00
Aikar 727f932d05
add Escape Reason Drown for EndermanEscapeEvent
to detect rain specifically from every other armor ignoring hit
2018-05-31 18:16:26 -04:00
Mark Vainomaa e74e4584d6 Skip Entity and Tile Entity ticking in chunks scheduled for unload (#1132)
Fixes #1131
2018-05-30 15:31:55 -05:00
Zach Brown 51b88cabbc
Update upstream CB 2018-05-27 23:39:08 -05:00
Aikar dab41b12ce
rename method for center to toCenterLocation() 2018-05-24 21:06:06 -04:00
Aikar 45308a08d7
Location.toBlockLocation
Convert location objects to their block coordinates, or the center of the block
2018-05-24 21:02:38 -04:00
Aikar 3eb1cdef72
Fix Witch Throw Potion error - Resolves #1129 2018-05-23 23:08:04 -04:00
Foorack aedd155be1
Upgrade ASM to 6.1.1 to allow Java 9 and 10 plugins to load 2018-05-22 22:07:25 -05:00
Zach Brown de3bd3f635
Update URLs
Redirects are in place (or will be shortly). This is mostly
housekeeping.

Maven repo URLs already redirect however we can't deploy through them.
Jenkins URLs do not currently redirect but will within 24 hours.

Also adds a Discord link to the README, because apparently that's what
people want.

Documentation will be updated and announcements made once all redirects
are in place, until then, consider this advanced notice.
2018-05-19 01:29:05 -05:00
Aikar 5e644e2637
WitchThrowPotionEvent
Fired when a witch throws a potion at a player
2018-05-16 20:49:47 -04:00
Aikar dc7680211c
WitchConsumePotionEvent
Fires when a witch consumes the potion in their hand
2018-05-16 20:49:43 -04:00
Shane Freeder 8595189ab6
Update B/CB 2018-05-08 23:09:45 +01:00