Commit Graph

592 Commits

Author SHA1 Message Date
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
Aikar
19dea1a6f7
Close Plugin Class Loaders on Disable
This should close more memory leaks from /reload and disabling plugins,
by closing the class loader and the jar file.
2018-05-01 21:36:55 -04:00
Aikar
bd603371bf
EndermanAttackPlayerEvent
Allow control over whether or not an enderman aggros a player.

This allows you to override/extend the pumpkin/stare logic.
2018-05-01 20:19:47 -04:00
Aikar
00f24317ff
Expand World.spawnParticle API and add Builder
Adds ability to control who receives it and who is the source/sender (vanish API)
the standard API is to send the packet to everyone in the world, which is ineffecient.

This adds a new Builder API which is much friendlier to use.
2018-04-30 20:32:15 -04:00
Aikar
0eba89f673
Location.isChunkLoaded() API 2018-04-30 19:27:59 -04:00
Aikar
dbc775c09c
Additional world.getNearbyEntities API's
Provides more methods to get nearby entities, and filter by types and predicates
2018-04-30 18:27:42 -04:00
Aikar
d38e9dcf0e
Enderman.teleportRandomly()
Ability to trigger the vanilla "teleport randomly" mechanic of an enderman.
2018-04-30 13:30:00 -04:00
Aikar
30bc4df0a9
EndermanEscapeEvent
Fires an event anytime an enderman intends to teleport away from the player

You may cancel this, enabling ranged attacks to damage the enderman for example.

Resolves #1101
2018-04-30 13:16:42 -04:00
Aikar
33a6de0f13
Add Ban Methods to Player Objects
Allows a more logical API for banning players.

player.banPlayer("Breaking the rules");
2018-04-28 11:31:26 -04:00
Kyle Wood
35b4136815
Track previous version and report in command
It is often difficult to diagnose new issues server admins get when
upgrading to a new server version because the only information they are
able to tell us regarding the server version they are running is
"latest". This commit attempts to mitigate this by keeping track of the
previous version of Paper they were running, which is then reported by
the `/version` or `/paper version` command. This gives us a better idea
of the commits included in the upgrade, which may help diagnose new
issues easier.
2018-04-11 23:02:20 -04:00
Zach Brown
d4c3e49a06
Make version command use the direct link
It was using a redirect, but apparently a small portion of systems,
networks, some mess, are having problems with that redirect.

Just use the direct link and skip the hassle.
2018-04-09 16:13:08 -04:00
Shane Freeder
242d671fa9
Allow logger instances to be used across reloads 2018-04-08 02:02:48 +01:00
Mark Vainomaa
c6ac33816b
Add method to open already placed sign 2018-04-05 06:48:24 +03:00
Shane Freeder
d09826faf2
Flag to disable the channel limit
In some enviroments, the channel limit set by spigot can cause issues,
e.g. servers which allow and support the usage of mod packs.

provide an optional flag to disable this check, at your own risk.
2018-03-31 18:56:49 +01:00
Minecrell
16869992a8 Call PaperServerListPingEvent for legacy pings (#1057)
* Make the legacy ping handler more reliable

The Minecraft server often fails to respond to old ("legacy") pings
from old Minecraft versions using the protocol used before the switch
to Netty in Minecraft 1.7.

Due to packet fragmentation[1], we might not have all needed bytes
available when the LegacyPingHandler is called. In this case, it will
run into an error, remove the handler and continue using the modern
protocol.

This is unlikely to happen for the first two revisions of the legacy
ping protocol (used in Minecraft 1.5.x and older) since the request
consists of only one or two bytes, but happens frequently for the
last/third revision introduced in Minecraft 1.6.

It has much larger, variable packet sizes due to the inclusion of
the virtual host (the hostname/port used to connect to the server).

The solution[2] is simple: If we find more than two matching bytes,
we buffer the remaining bytes until we have enough to fully read and
respond to the request.

[1]: https://netty.io/wiki/user-guide-for-4.x.html#wiki-h3-11
[2]: https://netty.io/wiki/user-guide-for-4.x.html#wiki-h4-13

* Add legacy ping support to PaperServerListPingEvent

Add a new method to StatusClient check if the client is a legacy
client that does not support all of the features provided in the
event.
2018-03-30 13:00:01 -04:00
Minecrell
5b6c59009b Improve backward compatibility of deprecated player sample API (#1065)
Some plugins (e.g. older builds of EssentialsX) assume that
ServerListPingEvent.getSampleText() returns a mutable copy of
the player sample list. This was the case until it was refactored
on top of the new API introduced in #980.

As a result, they may run into an error when trying to modify the
returned list directly. Modify getSampleText() to return a mutable
copy (a plain ArrayList) to mimic the old behavior.
2018-03-26 17:45:18 -04:00
Aikar
658eca0c22
Add Setters for ID/Name and add completeByCache for Profile API 2018-03-25 21:50:46 -04:00
Aikar
cff8ae9644
Use copies for PlayerProfile in PaperServerList and SkullMeta
Don't want to risk mutating players properties in server list (unlikely, but lets be proper)

and Skull also has a setter API, so that should be used too.
2018-03-22 23:32:55 -04:00
Minecrell
e15167251b Add extended PaperServerListPingEvent (#980)
* Drop original implementation for old player sample API

* Add extended PaperServerListPingEvent

Add a new event that extends the original ServerListPingEvent
and allows full control of the response sent to the client.

* Implement deprecated player sample API
2018-03-22 23:19:59 -04:00
Aikar
b8a672dd94
Fix Profile Textures and expand PlayerProfile .complete() API
I mistakenly thought .complete() also checked for textures, which was not the case

So the logic was not working as desired.

Also some undesired logic paths lead to textures of the logging in player being dropped, forcing
us to always load the textures immediately again on login, leading to rate limits.

Everythings now good

the .complete() api now will default specify to also complete textures, but you may
pass false to it to skip loading textures.
2018-03-22 21:40:57 -04:00
Aikar
b29f5c05c1
getPlayerUniqueId API
Gets the unique ID of the player currently known as the specified player name
In Offline Mode, will return an Offline UUID

This is a more performant way to obtain a UUID for a name than loading an OfflinePlayer
2018-03-22 01:41:44 -04:00
Aikar
7354b9166d
Update javadoc on setPlayerProfile 2018-03-18 13:28:01 -04:00
Aikar
c2933f8106
Player.setPlayerProfile API
This can be useful for changing name or skins after a player has logged in.
2018-03-18 12:32:09 -04:00
Aikar
fb02c91835
Ability to change PlayerProfile in AsyncPreLoginEvent
This will allow you to change the players name or skin on login.
2018-03-18 11:46:14 -04:00
Aikar
e3e257562f
Add PlayerProfile.complete() API to trigger skin lookup 2018-03-18 11:31:32 -04:00
Shane Freeder
77229ce7ab
Add OBFHELPER - InventoryEnderChest#getTileEntity 2018-03-10 17:11:51 +00:00
Shane Freeder
9daa9cec93
Fix NPE when getting location from players EnderChest (fixes #1041) 2018-03-10 13:26:49 +00:00
MiniDigger
09692269ca Toggleable player crits, helps mitigate hacked clients. (#1040)
This is a port of https://github.com/PaperMC/Paper/blob/ver/1.8.8/Spigot-Server-Patches/0040-Toggleable-player-crits-helps-mitigate-hacked-client.patch
Also adds me to the MIT list.
2018-03-09 23:14:47 -05:00
Minecrell
ce30be9781 [CI-SKIP] Add Minecrell to MIT list (#1035)
Change email address for some older patches to make it clear that
they are MIT licensed too.
2018-03-08 07:08:21 -08:00
Aikar
34e91b6e40
Rename getOwnerUUID to Tameable#getOwnerUniqueId for consistency
for the @kashike, thanks for adding a server diff to use this name!
2018-02-24 01:17:05 -05:00
Aikar
dcbb0f1e27
Tameable#getOwnerUUID API
This is faster if all you need is the UUID, as .getOwner() will cause
an OfflinePlayer to be loaded from disk.

This method is already implemented on the server, just needed to expose it.
2018-02-24 00:57:09 -05:00
Aikar
094bb03a37
Optimize Hoppers
- Lots of itemstack cloning removed. Only clone if the item is actually moved
- Return true when a plugin cancels inventory move item event instead of false, as false causes pulls to cycle through all items.
  However, pushes do not exhibit the same behavior, so this is not something plugins could of been relying on.
- Add option (Default on) to cooldown hoppers when they fail to move an item due to full inventory
- Skip subsequent InventoryMoveItemEvents if a plugin does not use the item after first event fire for an iteration
2018-02-12 23:26:02 -05:00
Shane Freeder
89a61a21ef
Update B/CB 2018-02-12 17:37:33 +00:00
Zach Brown
18ee843380
Properly flag profile events as async as needed 2018-02-01 23:24:27 -05:00
Aikar
9b1ada78c9
Remove warning for custom entities in precreaturespawn, add note to event
We can't fix this. The event will simply not fire for hacky plugins replacing
entity registrations.
2018-01-28 22:50:35 -05:00
Zach Brown
09182f737d
Add ArmorStand Item Meta
This is adds basic item meta for armor stands. It does not add all
possible metadata however.

There are armor, hand, and equipment types, as well as position data
that can also be added here. This initial implementation should serve as
a starting point for future additions in this area.

Fixes GH-559
2018-01-27 20:40:42 -05:00
Aikar
8173d569d6
Make PlayerProfile.getProperties mutable
Most other collections returned like this is mutable, lets be consistent.
2018-01-21 14:09:41 -05:00
BillyGalbreath
4d7c516cb4 PlayerAdvancementCriterionGrantEvent (#978) 2018-01-21 13:23:34 -05:00
Aikar
5b72a03bcf
Fill Profile Property Events
Allows plugins to populate profile properties from local sources to avoid calls out to Mojang API
to fill in textures for example.

If Mojang API does need to be hit, event fire so you can get the results.

This is useful for implementing a ProfileCache for Player Skulls
2018-01-19 00:55:38 -05:00
Aikar
f193fdb1ab
Add SkullMeta.setPlayerProfile API
This allows you to create already filled textures on Skulls to avoid texture lookups
which commonly cause rate limit issues with Mojang API
2018-01-19 00:38:49 -05:00
Aikar
531981a1cc
Move ProfileWhitelistVerifyEvent to use new PlayerProfile API
Also update javadocs on lookup events to link the new methods to use
2018-01-19 00:12:03 -05:00
Aikar
18e3bf685c
Update Profile Lookup Events to use new PlayerProfile API 2018-01-19 00:03:09 -05:00
Aikar
71c18fd5c9
Add PlayerProfile API to replace GameProfile
This simply provides the base API to create the objects. Further commits will come that adds
adds usage of this API to existing GameProfile based API's, as well as new API's.
2018-01-18 23:19:30 -05:00
Aikar
6068eb129f
PlayerNaturallySpawnCreaturesEvent
This event can be used for when you want to exclude a certain player
from triggering monster spawns on a server.

Also a highly more effecient way to blanket block spawns in a world
2018-01-14 17:36:24 -05:00
Aikar
6a5948b316
PreCreatureSpawnEvent - Closes #917
Adds an event to fire before an Entity is created, so that plugins that need to cancel
CreatureSpawnEvent can do so from this event instead.

Cancelling CreatureSpawnEvent rapidly causes a lot of garbage collection and CPU waste
as it's done after the Entity object has been fully created.

Mob Limiting plugins and blanket "ban this type of monster" plugins should use this event
instead and save a lot of server resources.

See: https://github.com/PaperMC/Paper/issues/917
2018-01-14 17:12:13 -05:00
Zach Brown
fc911a20f5
Update upstream B/CB/S 2018-01-04 02:04:31 -06:00
Shane Freeder
1180d8f383
Update B 2017-12-28 16:56:31 +00:00
Zach Brown
eb0f5adfdc
Update upstream B/CB/S 2017-12-27 22:45:33 -06:00
Aikar
fc194dfaae
Ability to apply mending to XP API
This allows plugins that give players the ability to apply the experience
points to the Item Mending formula, which will repair an item instead
of giving the player experience points.

Both an API To standalone mend, and apply mending logic to .giveExp has been added.
2017-12-20 17:50:26 -05:00
Aikar
54f9e9fb1a
Always copy completions for #setCompletions in Tab Complete Events
Per feedback on 7fb767f
2017-12-20 01:09:54 -05:00
Aikar
46394cb8b0
ExperienceOrbMergeEvent
Fired when the server is about to merge 2 experience orbs
Plugins can cancel this if they want to ensure experience orbs do not lose important
metadata such as spawn reason, or conditionally move data from source to target.
2017-12-19 22:57:46 -05:00
Aikar
0fcd0b5c52
Make PlayerPickupExperienceEvent extend PlayerEvent 2017-12-19 22:08:28 -05:00
Aikar
9f204c2a91
PlayerPickupExperienceEvent
Allows plugins to cancel a player picking up an experience orb
2017-12-19 22:05:16 -05:00
Aikar
7fb767fe41
AsyncTabCompleteEvent shouldn't store Immutable Lists 2017-12-19 16:52:53 -05:00
Aikar
c208d652b4
ExperienceOrbs API for Reason/Source/Triggering player
Adds lots of information about why this orb exists.

Replaces isFromBottle() with logic that persists entity reloads too.
2017-12-19 16:46:27 -05:00
Aikar
93376977a3
Add World#createExplosion(Location, float, boolean, boolean) API
don't know why this API was missing
2017-12-19 16:25:38 -05:00
Aikar
ece3333123
Display warning on deprecated recipe API
Any plugin still using this API will result in the server saving an inconsistent UUID to player data files,
which then triggers warnings such as "Tried to load unrecognized recipe: bukkit:9e5b92f5-e549-4f47-b0a8-9f89390ed77b removed now."
on the players login.

Plugin authors need to define a key to keep it consistent between server restarts.
2017-12-09 12:42:11 -05:00
Shane Freeder
a693cb21ab
Update B/CB/S 2017-12-05 01:34:10 +00:00
Aikar
147081d0ff
AsyncTabCompleteEvent
Let plugins be able to control tab completion of commands and chat async.

This will be useful for frameworks like ACF so we can define async safe completion handlers,
and avoid going to main for tab completions.

Especially useful if you need to query a database in order to obtain the results for tab
completion, such as offline players.

Also adds isCommand and getLocation to the sync TabCompleteEvent
2017-11-26 22:05:48 -05:00
Shane Freeder
f31eb87d39
Fix javadocs 2017-11-25 17:53:42 +00:00
Aikar
79f57aa18c
API to get a BlockState without a snapshot
This allows you to get a BlockState without creating a snapshot, operating
on the real tile entity.

This is useful for where performance is needed
2017-11-24 07:28:57 +00:00
Shane Freeder
7f12781017
Update B/CB/S 2017-11-18 03:04:21 +00:00
Shane Freeder
caec68907d
Update B/CB/S 2017-11-17 09:55:26 +00:00
pkt77
3438e96192
Add PlayerArmorChangeEvent
Closes GH-928
2017-11-10 23:49:34 -05:00
BillyGalbreath
d7039347b0 PlayerAttemptPickupItemEvent additions 2017-11-10 22:49:53 -05:00
Zach Brown
bc1804b0e4
Update B/CB/S 2017-11-10 17:31:39 -05:00
Shane Freeder
1d03f56bd6
Update B/CB/S 2017-11-08 16:13:57 +00:00
Minecrell
1f4d3af169 Expose client protocol version and virtual host 2017-10-12 17:31:36 +02:00
Minecrell
da11ba232e Deprecate player sample list that includes only the player name 2017-10-12 16:12:08 +02:00
kashike
3d3ee1d9b4
Some logging changes 2017-10-03 12:13:38 -04:00
Zach Brown
a8c503b86f Update documentation around PlayerJumpEvent 2017-09-29 14:58:24 -04:00
Zach Brown
83c7399962 Add PlayerJumpEvent 2017-09-28 17:38:17 -04:00
Minecrell
5a3fb946d8 Add workaround for plugins modifying the parent of the plugin logger
Essentials uses a custom logger name ("Essentials") instead of the
plugin logger. Log messages are redirected to the plugin logger by
setting the parent of the "Essentials" logger to the plugin logger.

With our changes, the plugin logger is now also called "Essentials",
resulting in an infinite loop. Make sure plugins can't change the
parent of the plugin logger to avoid this.
2017-09-23 21:45:34 +02:00
Minecrell
ce34fd1ade Allow plugins to use SLF4J for logging
SLF4J is a commonly used abstraction for various logging frameworks
such as java.util.logging (JUL) or Log4j. Currently, plugins are
required to do all their logging using the provided JUL logger.
This is annoying for plugins that target multiple platforms or when
using libraries that log messages using SLF4J.

Expose SLF4J as optional logging API for plugins, so they can use
it without having to shade it in the plugin and going through
several layers of logging abstraction.
2017-09-23 21:45:27 +02:00
Minecrell
bbfc0c8ee3 Handle plugin prefixes in Log4j configuration 2017-09-23 21:30:35 +02:00
DemonWav
f3b8afd56a
Move eclipse compiler patch to POM changes patch
Also update to Paperclip 1.1-SNAPSHOT
2017-09-23 13:21:02 -05:00
DemonWav
73e1b3f2f0
Remove eclipse compiler for Paper-API
Fixes building with JDK9
2017-09-22 20:12:23 -05:00
Shane Freeder
d934dcc1e3
Update to 1.12.2, May the Tacos be with you 2017-09-18 12:04:01 +01:00
Shane Freeder
9c79dd3214
Cache generated EventExecutors (fixes #786)
the first 'major' change in this PR is to cache the generated event
executrs from the ASM class, by doing this we only generate a single
class for every method that we need an executor for, thus reducing the
number of classes that are needed, especially in cases where plugins
re/unregister events all the time.

The second change is to modify the generated classloader map, generated
classloaders are not held against the plugin itself but the classloader
that the event is declared in, the implication here is that we cannot
drop generated classloaders when a plugin disable, and so we use a guava
weak-key'd hashmap, downfall here is that classes won't be GC'd until
guava drops the generated classloader, however the first change should
deal with most of the grunt.
2017-09-14 14:57:50 +01:00
Shane Freeder
2104c3a683
Update CB/S 2017-09-09 08:17:12 +01:00
BillyGalbreath
75cb198fd2
LivingEntity#setKiller 2017-08-24 15:19:29 -04:00
kashike
85c6f826e4 Deprecate usages of authlib
ref #828
2017-08-22 19:12:34 -07:00
Shane Freeder
4368f412c6
Update CB 2017-08-16 16:47:06 +01:00
Shane Freeder
d77731eee2
Update S 2017-08-12 22:51:29 +01:00
Zach Brown
a8508dc5df
Remove null values in TileEntity tick list
Because who wouldn't want to tick a null tile entity right?
Fixes GH-851
2017-08-11 17:59:44 -05:00
Aikar
ff5bd7b03b Upstream update 2017-08-07 23:05:16 -04:00
Shane Freeder
bec1253aa9
Update B/CB/S 2017-08-06 00:08:21 +01:00
BlackHole
6879328bf6 Update to 1.12.1 2017-08-03 17:27:54 +02:00
BillyGalbreath
2670d1f8eb Make /plugins list alphabetical 2017-07-31 02:09:13 -05:00
Aikar
cdd6d8562a Update Upstream 2017-07-30 18:41:08 -04:00
Shane Freeder
fed4815fff
Update B/CB 2017-07-28 15:51:46 +01:00
Aikar
5b6dfbc428 ProfileWhitelistVerifyEvent
Fires when the server is validating if a player is whitelisted.

Allows you to do dynamic whitelisting and change of kick message
2017-07-27 23:42:19 -04:00
Aikar
9a7cdcec39 Add getI18NDisplayName API
Gets the Display name as seen in the Client.
Currently the server only supports the English language. To override this,
You must replace the language file embedded in the server jar.
2017-07-26 23:44:29 -04:00
Aikar
8e78124e46 Implement ensureServerConversions API
This will take a Bukkit ItemStack and run it through any conversions a server process would perform on it,
to ensure it meets latest minecraft expectations.
2017-07-26 23:44:29 -04:00
Aikar
4a35e438e9 Improve the Saddle API for Horses
Not all horses with Saddles have armor. This lets us break up the horses with saddles
and access their saddle state separately from an interface shared with Armor.
2017-07-26 23:44:29 -04:00
willies952002
c86f61f8af Allow Changing of Player Sample in ServerListPingEvent 2017-07-26 23:06:56 -04:00
Aikar
a7cb000633 Update upstream (memory leak fix) 2017-07-16 20:36:27 -04:00
Shane Freeder
18be9d24e4
Update B/CB 2017-07-10 14:04:41 +01:00
BillyGalbreath
e0e23db485
Add Entity#fromMobSpawner API
Merges and closes GH-752
2017-07-09 01:39:09 -05:00
Shane Freeder
18c16a6111
Fix javadoc warnings 2017-07-03 19:54:40 +01:00
Zach Brown
b1d34f6180
Make timings more tolerant of corrupt chunks
Fixes GH-744
2017-07-02 20:54:29 -05:00
Aikar
3244d917f3 Update upstream 2017-06-25 20:26:00 -04:00
Aikar
b3d6ec2d26 SPIGOT-3381: Alias SWEEPING to SWEEPING_EDGE 2017-06-25 19:40:34 -04:00
Zach Brown
b61aec52a4
Update upstream B/CB 2017-06-25 18:00:32 -05:00
Zach Brown
8a45451a97
Update upstream B/CB/S 2017-06-21 22:12:40 -05:00
Aikar
a96a996213 Allow plugins to override Vanilla commands with aliases
Spigot broke this in 1.12, re-adding the logic back
2017-06-20 18:59:23 -04:00
Aikar
1ebe37e5a3 Profile Lookup Events
Adds a Pre Lookup Event and a Post Lookup Event so that plugins may prefill in profile data, and cache the responses from
profiles that had to be looked up.
2017-06-17 20:57:29 -04:00
sweepyoface
a88fd61a23 Add UnknownCommandEvent (#746) 2017-06-17 20:53:31 -04:00
Aikar
68e8778890 Shoulder Entities Release API
Let's you eject the Parrot naturally and get the newly spawned Parrot.
2017-06-17 15:21:39 -04:00
Zach Brown
2b51986c25
Update upstream B/CB/S 2017-06-12 22:28:09 -05:00
Zach Brown
cb887bb4f4
Renumber patches, fix conflicts, update for 1.12 2017-06-11 20:02:57 -05:00
BillyGalbreath
d6358a6ac1 PlayerAttemptPickupItemEvent (#732) 2017-06-11 19:46:11 -05:00
BillyGalbreath
209b70caab PlayerPickupItemEvent#setFlyAtPlayer (#683)
* PlayerPickupItemEvent#setFlyAtPlayer
2017-06-11 19:43:59 -05:00
BillyGalbreath
8ad4216e18 EntityPickupItemEvent (#679)
EntityPickupItemEvent
2017-06-11 19:42:01 -05:00
BillyGalbreath
1ca53dcefe Item#canEntityPickup (#680)
Item#canEntityPickup
2017-06-11 19:40:42 -05:00
Zach Brown
fe4678c414
Properly fix JavaDoc linting issues
Fixes our own, and upstream's, issues with the stricter Java 8 JavaDoc
linter.

Also removes the destroystokyo-release maven repository. I'm not sure
why I added it originally, but it's unnecessary now.
2017-06-10 17:12:48 -05:00
Zach Brown
1df56f4369
Go back to disabling javadoc linting for now
It's breaking our maven deployments. This should be fixed properly in
the future when I have more time and have had less to drink.
2017-06-09 19:40:41 -05:00
kashike
90b2d02091 Add configuration option to prevent player names from being suggested 2017-06-09 07:32:12 -07:00
Zach Brown
5e40806ee2
Remove 1.12 prerelease changes patch 2017-06-08 17:19:12 -05:00
Shane Freeder
3c9f2a0a20
Update Paper to MC 1.12 2017-06-08 15:17:11 +01:00
Zach Brown
04d2d38581
Update upstream B/CB 2017-06-02 23:41:05 -05:00
Shane Freeder
adab11a1f7
Update to 1.12-pre6 2017-05-31 22:12:46 -05:00
Zach Brown
7611b62cf0
Remove unnecessary doclint param on API 2017-05-27 23:36:18 -05:00
Zach Brown
066f383b95
Update upstream B/CB/S 2017-05-27 23:25:17 -05:00
Zach Brown
720769bf30
Update upstream B/S 2017-05-23 17:11:28 -05:00
Zach Brown
c1d0b4b4c6
Update Paper to MC 1.12-pre5 2017-05-20 23:49:56 -05:00
Zach Brown
baf762a2c1
Update upstream B/CB/S 2017-05-15 11:25:20 -05:00
Zach Brown
6e2332a592
Switch 1.12-pre2 to its own version checks
Fix stream formatting issue that had been bugging me
2017-05-15 10:28:28 -05:00
Zach Brown
828d600143
Update API patches to MC 1.12pre2 2017-05-14 08:46:44 -05:00
Zach Brown
2103c75247
Publicly execute the main thread at dawn
GH-684

Better handles most true deadlock situations
2017-05-13 06:08:09 -05:00
Shane Freeder
ffb572ce9a
Remove Ignore invalid Marker Icon ID's in maps
Spigot has patched this issue inside MapIcon, meaning that we no longer need to maintain this patch; Spigots patch also fixes #668 in that it will verify the length of the array, as well as protect against a negative type value being fetched from the array. Only real change is that Spigots patch returns a MapIcon.Type.PLAYER, instead of the RED_MARKER as originally PR'd by Aikar.
2017-04-22 15:52:56 +01:00
Zach Brown
e4a071f6e4
Update upstream B/CB 2017-03-31 23:24:42 -05:00
Zach
246712ed92 Merge pull request #628 from willies952002/feature/reloadCommands
Don't Display Success Message on Alias Reload Fail
2017-03-24 22:34:13 -05:00
Zach Brown
dbabbdbdbe
Update upstream B/CB 2017-03-18 21:01:13 -05:00
willies952002
77fdfd6de1
Don't Display Success Message on Alias Reload Fail
Also add "commands" to Tab Completion
Note: This required a signature change to Bukkit#reloadCommandAliases() so that it returns a boolean based on if the command aliases reloaded or not.
2017-03-12 13:52:04 -04:00
Zach Brown
ae98591b8c
Update upstream B/CB/S 2017-02-17 20:03:38 -06:00
Spottedleaf
f33f4b9c31 Use invokeinterface for methods defined in interfaces in the ASM executor 2017-02-14 03:04:20 -08:00
Zach Brown
919cb9d19a
Update upstream CB, reduce version cache time
Closes GH-602
2017-02-07 16:29:26 -06:00
Aikar
ee7f13ea3c Add API to get the url in a timing report listener 2017-02-04 23:07:09 -05:00
Aikar
d033b57b47 More improvements to Timings, RCON now is no longer blocking!
Finally made timings accept "Callback style" reports, so plugins
can listen for when the report is done.

Added new Util interfaces, MessageCommandSender and BufferedCommandSender

This restores and improves using RCON to generate timings reports
2017-02-04 22:47:39 -05:00
Aikar
f938ae30fd Run timings reports after end of tick
I believe we are getting data corruption by doing it in the middle of the tick, as I was seeing
really odd reports from automated ones vs command ones.

This will break issueing timings over rcon single command mode and getting the report link in the response back

But I will try to restore that (and make RCON no longer cause spikes) soon.

Reports will still generate, just because its async, the RCON connection
will drop if not in terminal mode before its done.
2017-02-04 20:46:27 -05:00
Zach Brown
1e1541a2e9
Update upstream S 2017-01-30 22:33:54 -06:00
Zach Brown
88205cd8fe
Update upstream B/CB/S 2017-01-25 22:27:42 -06:00
Zach Brown
3f88bc1ec7
Expose WorldBorder@isInBounds(Location) check 2017-01-21 17:06:28 -06:00
BillyGalbreath
36078e1a3d Add fromBottle flag to Experience Orbs (#584)
* Add fromBottle flag to Experience Orbs
2017-01-20 09:01:53 -06:00
Zach Brown
c1641b8e0c
Update upstream B/CB/S 2017-01-20 05:21:44 -06:00
Michael Himing
9606774ee6 Add World.getPlayerCount 2017-01-13 23:00:33 +11:00
Aikar
e4ef645032 Enforce Sync Chunk Unloads
Unloading Chunks async is extremely dangerous. This will force it to main
the same way we handle async chunk loads.
2017-01-07 16:10:56 -05:00
Aikar
7e06f2145e Provide E/TE/Chunk count stat methods
Provides counts without the ineffeciency of using .getEntities().size()
which creates copy of the collections.
2017-01-07 15:27:46 -05:00
Zach Brown
63130fd2aa
Update upstream B/CB
Closes GH-569
2017-01-06 15:45:59 -06:00
Aikar
1b18e93607 Remove my copyright headers, copy/pasted 2016-12-31 21:51:49 -05:00
Aikar
16b99d6dab PlayerTeleportEndGatewayEvent
Allows you to access the Gateway being used in a teleport event
2016-12-31 21:46:34 -05:00
Aikar
49aca0c04d New Firework API's
Get the launcher of a Firework and who it is boosting
2016-12-28 02:25:35 -05:00
Aikar
bf756994b0 JavaDoc String ActionBar API and Deprecate Component based methods.
The Component based methods are not even safe to use, as it may result in invalid items being sent to the client.

The string based method we have added is the only safe way to send with the API.

The client is stricter about componenents being sent for this API, and does not accept children components.

The client is expecting a legacy string.
2016-12-27 15:20:09 -05:00
Aikar
fc6f3510a2 Change implementation of String based Action Bar API
Appears colors did not work for Bungee version, as Action Bar is stricter
2016-12-27 15:06:14 -05:00
Aikar
23236ef8aa IllegalPacketEvent - Resolves #419
Fire an event when an illegal packet is received to let plugins handle it

Lets plugins change the kick message and if it should kick or not.
2016-12-21 21:22:02 -05:00
kashike
c8fb4667af
API for ArmorStand movement and option for entity lookups 2016-12-21 11:56:09 -06:00
Zach Brown
cae453c16b
Update to Paper to MC 1.11.2 2016-12-21 11:21:40 -06:00
Zach Brown
33163525f3
Update Paper to MC 1.11.1 2016-12-20 17:45:00 -06:00
Aikar
f4ea1998ee Actually set the ChatPosition 2016-12-20 16:02:05 -05:00
Aikar
29369fb085 Add String based Action Bar API 2016-12-20 15:56:41 -05:00
Zach Brown
0728696e06
Add ProjectileCollideEvent
Base our vanish changes on top of that event.
2016-12-16 22:13:46 -06:00
Zach Brown
1d8b7e2ecc
Update upstream B/CB 2016-12-16 15:00:16 -06:00
Zach Brown
57c2b8de43
Update upstream B/CB 2016-12-06 17:12:19 -06:00
AlphaBlend
dfdd4e3334
Add source to PlayerExpChangeEvent 2016-11-30 17:33:06 -06:00
Jamie Mansfield
b4c00f4b27
Resolve previous pr 2016-11-29 19:58:13 +00:00
willies952002
6d966ed034 Allow Reloading of Command Aliases
Use "/reload commands" to reload the aliases stored in commands.yml
2016-11-28 21:54:19 -05:00
Zach Brown
ed6bd4ea4a
Update upstream B/CB - hitEntity added upstream 2016-11-28 17:16:07 -06:00
Alfie Cleveland
324acd64b4
Optimise NetworkManager 2016-11-26 21:48:09 -06:00
vemacs
ddbf7318b2 Optimize network queue by making size() constant-time
Idea from @AlfieC
2016-11-23 13:20:16 -05:00
Zach Brown
97e0eac6e7
Update upstream B/CB 2016-11-21 15:51:27 -06:00
Zach Brown
cb66c8dce7
Add ShulkerBoxes to the LootTable API 2016-11-19 11:31:01 -06:00
Aikar
9725050889 Update Upstream 2016-11-18 23:58:56 -05:00
Aikar
ae5a66ed1b Re-add dependency reduced pom
Learned the correct way to handle that file
2016-11-18 21:09:03 -05:00
Zach Brown
a6d146a939
Update Paper to MC 1.11 2016-11-18 16:21:06 -06:00
Zach Brown
65538782cd
Update upstream B/CB/S 2016-11-12 20:21:46 -06:00
Zach Brown
493caa07b4
MC uses JSR 1.3.9 2016-11-03 14:51:00 -05:00
Zach Brown
f0baa4b9cc
t 2016-11-03 14:28:58 -05:00
Zach Brown
764473b2cc
Move nullable annotation dependency to JSR 2016-11-03 14:25:50 -05:00
Zach Brown
9fd4ec64e7
Remove some handlers 2016-10-30 21:42:38 -05:00
AlphaBlend
02006e6b24
Add EntityZapEvent 2016-10-30 21:31:02 -05:00
Zach Brown
ecefa79676
Add usage message to ReloadCommand
Used when the wrong arguments are supplied, missed when we added the
permissions reload functionality.
2016-10-30 00:14:17 -05:00
Zach Brown
0860727dae
Update upstream S 2016-10-26 16:05:22 -05:00
Zach Brown
92567cc43a
Update upstream B/CB 2016-10-21 15:28:44 -05:00
AlphaBlend
96b534f1f1
Add hit entity to ProjectileHitEvent 2016-10-05 16:07:58 -05:00
Zach Brown
18799efd0d
Update upstream B/CB/S 2016-10-01 11:47:56 -05:00
kashike
3d5f59c855 Fix @aikar's oops with verbose timings 2016-09-23 23:19:15 +00:00
Zach Brown
f7cfe1f769
Add javax.annotations to the API
Used this set specifically because they are present in NMS already.
2016-09-16 14:38:52 -05:00
Zach Brown
2e880e7676
Make UseItem rate limiting stricter, configurable 2016-09-10 23:27:07 -05:00
Zach Brown
f5d7e2067d
Update upstream B/CB/S 2016-09-05 14:21:03 -05:00
kashike
8f91416dcb @Zbob750 missed a few name changes 2016-09-04 06:35:42 +00:00
Zach Brown
f9f96ea3a5
Update upstream B/CB/S 2016-09-02 22:44:52 -05:00
Zach Brown
b170e8cedb
Update upstream B/CB/S
Remove two features added upstream
2016-08-27 18:41:58 -05:00
Aikar
323c18dd65 Timings v2: confirm before reset. Add delays before report generation
Require user to confirm the timings reset, warning them that they should not be doing this.
Also require Timings to have ran for 3 minutes before allowing the report command.
Also require 1 minute intervals between reports to stop report spam.
2016-08-19 23:42:38 -04:00
Zach Brown
17c9d7d9da
Kick git and rebuild patches 2016-08-15 19:22:10 -05:00
Zach Brown
15f3ca7ecb
Update upstream B/CB 2016-08-07 00:01:31 -05:00
Zach Brown
01a09f8ff1
Update maven repo urls 2016-08-06 16:49:55 -05:00
Zach Brown
8f6208b1d3
Send a fake team as needed for the collision rule 2016-07-30 17:04:39 -05:00
Zach Brown
46bfd418a8
Update upstream B/CB/S 2016-07-30 18:02:34 -05:00
Zach Brown
f9f1a2e97e
Cleanup obfuscation helper comment format 2016-07-28 19:09:54 -05:00
Aikar
106787f894 Timings v2 cleanups - potential overflow fix and fix bad hostnames
if hostname is invalid on system, just use a static string

also cleans up visibility of a lot of code, hopefully will help jvm optimize more.
2016-06-30 01:32:00 -04:00
Zach Brown
83472d4c99
Update upstream B/CB/S 2016-06-26 14:13:34 -05:00
Zach Brown
45d9b4c497
Update to MC 1.10.2 2016-06-25 12:21:26 -05:00
Aikar
0152e0f616 Update Entity AddTo|RemoveFrom World events to be EntityEvents 2016-06-24 00:17:23 -04:00
DemonWav
8862652351
Add repo to handle the bungee-cord chat dependency 2016-06-23 00:34:56 -05:00
Zach Brown
14ffaf5d2c
Update upstream B/CB 2016-06-11 22:22:27 -05:00
Zach Brown
c442e96eb9
Update to Minecraft 1.10 2016-06-08 23:42:46 -05:00