Commit Graph
100 Commits
Author SHA1 Message Date
Aikar 64b2b87256 Upstream update 2017-08-07 23:05:16 -04:00
Aikar 489fda430a Update Upstream 2017-07-30 18:41:08 -04:00
Aikar b4131ee68f Further refine logic 2017-07-28 00:04:01 -04:00
Aikar 8ff15ca2af 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:39:31 -04:00
Aikar 8d26bacb73 Fix a bug in recipe books that prevented them from working as they should 2017-07-27 03:13:13 -04:00
Aikar 89ff242bd4 Remove use of FastUtil for unload queue, very bad performance 2017-07-27 00:25:13 -04:00
Aikar 337e7791a6 Resolves GH-806: Respect saving disabled before unloading all chunks in a world
This behavior causes a save to occur even though saving was supposed to be turned off.

It's triggered when Hell/End worlds are empty of players.
2017-07-27 00:09:24 -04:00
Aikar 5495450456 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:09 -04:00
Aikar 5617a28291 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:40:49 -04:00
Aikar cab448bd32 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:31:58 -04:00
Aikar 4265551308 Upstream update 2017-07-26 21:12:40 -04:00
Aikar ca512353fc Remove last patch, didn't resolve issue. 2017-07-16 20:59:39 -04:00
Aikar 892fca2c4c SPIGOT-3427: Recalculate ConsoleSender permissions after plugins have loaded
Resolves a really weird race condition where the console sender could lose permission to execute
commands defined in plugin.yml with default=op
2017-07-16 20:41:30 -04:00
Aikar a289bd5949 Update upstream (memory leak fix) 2017-07-16 20:36:27 -04:00
Aikar 3ecd084ba8 Fix Anvil Level sync to client
https://hub.spigotmc.org/stash/projects/SPIGOT/repos/craftbukkit/commits/763827668e6e5cddc111f3c93a0d718fec21ff51

Was done incorrectly and is now causing level desyncs to client.

Always send current level to the client, and instead make setWindowProperty set the level.
2017-07-11 23:23:17 -04:00
Aikar 61bbe8c3b3 Update upstream 2017-06-30 18:13:06 -05:00
Aikar 70d35b0de5 Update upstream, pretty important bug fix 2017-06-25 21:49:36 -04:00
Aikar 46e300045a Update upstream 2017-06-25 20:26:00 -04:00
Aikar b8fb29dc77 SPIGOT-3381: Alias SWEEPING to SWEEPING_EDGE 2017-06-25 19:40:06 -04:00
Aikar fe6fa3846a Update upstream 2017-06-22 23:14:20 -04:00
Aikar 95ae0890a6 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 104b4ec3ae Fix Lootable bug 2017-06-20 18:59:18 -04:00
Aikar 285746c465 update upstream 2017-06-20 18:53:55 -04:00
Aikar 43e2c9c48c 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 17:15:25 -04:00
Aikar 60177fdfaf Shoulder Entities Release API
Let's you eject the Parrot naturally and get the newly spawned Parrot.
2017-06-17 15:20:25 -04:00
Aikar a22ed886b5 upstream update 2017-06-10 13:14:52 -04:00
Aikar e68554e5c6 Update upstream 2017-06-09 08:29:44 -04:00
Aikar f73ec445b6 Update test server JVM flags. Bad me not even using my own flags! 2017-05-17 22:51:42 -04:00
Aikar 7daac312a5 Shame on you Mojang
Someone wrote some horrible code that throws a world accessing task
onto the HTTP DOWNLOADER Thread Pool, for an activity that is not even
heavy enough to warrant async operation.

This then triggers async chunk loads!

What in the hell were you thinking?
2017-02-05 19:19:35 -05:00
Aikar c5851f632a Remove CraftScheduler Async Task Debugger
I have not once ever seen this system help debug a crash.
One report of a suspected memory leak with the system.

This adds additional overhead to asynchronous task dispatching
2017-02-05 00:13:28 -05:00
Aikar 36ce1b950a Add more timings to Scheduler and other improvements 2017-02-05 00:13:16 -05:00
Aikar 01e765f886 Add API to get the url in a timing report listener 2017-02-04 23:07:09 -05:00
Aikar 8246be5c3d 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 adc43dff10 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
Aikar 9e81fe5059 Cap Entity Collisions - Resolves #577
Limit a single entity to colliding a max of configurable times per tick.
This will alleviate issues where living entities are hoarded in 1x1 pens

This is not tied to the maxEntityCramming rule. Cramming will still apply
just as it does in Vanilla, but entity pushing logic will be capped.

You can set this to 0 to disable collisions.
2017-01-22 18:24:14 -05:00
Aikar 03263ff5df Remove the Vanilla Method Profiler
Spigot rebrought this back after it was removed for years due to the performance hit.

It is unknown if the JIT will optimize it out as effeciently with how it was
added, so we do not want any risk of performance degredation.

Paper has a proper Timings system that makes the Vanilla Method profiler obsolete and inferior.
2017-01-21 02:02:52 -05:00
Aikar 11711a201d 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:08:16 -05:00
Aikar 24858ab25e Enforce Sync Player Saves
Saving players async is extremely dangerous. This will force it to main
the same way we handle async chunk loads.
2017-01-07 15:48:22 -05:00
Aikar 9bdc25e99b 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
Aikar 710f32619e SPIGOT-2989: Use correct Horse Inventory 2017-01-04 21:23:16 -05:00
Aikar d309b6e872 ShulkerBox Dupe Prevention - Fixes #488
This ensures that Shulker Boxes can never drop their contents twice, and
that the inventory is cleared incase it some how also got saved to the world.
2017-01-02 16:49:08 -05:00
Aikar aa074621bd Defensive copy chunk list to avoid "effective CME" - Fixes #313
Lighting operations apparently can load chunks, which will cause an NPE
in the same fashion you would trigger a CME during the chunk iteration.
2017-01-02 14:08:55 -05:00
Aikar 695ba0cbf5 Use alternate constructor for EndGateway - Fixes #563 2017-01-02 11:49:36 -05:00
Aikar beee3cd301 MC-112017: Allow 31 instead of 30 for item names 2017-01-02 02:43:50 -05:00
Aikar 7228b28a1a MC-111699: Ignore Improper Anvil Item Name Packets
The client is improperly sending Item Name Packets to the server BEFORE
the click event. This causes the server to reset before the click event is processed

This breaks the ability to rename more than 1 item at a time.

See: https://bugs.mojang.com/browse/MC-111699
2017-01-02 02:09:31 -05:00
Aikar 3734a3acdb Fix build
I totally didn't notice that the patch had a conflict >_>
2017-01-02 02:05:02 -05:00
Aikar eee4d138dd Update upstream - fixes more Spawn Egg issues 2017-01-02 01:58:15 -05:00
Aikar 0d5ac24919 Remove my copyright headers, copy/pasted 2016-12-31 21:51:49 -05:00
Aikar 3eec7df88a PlayerTeleportEndGatewayEvent
Allows you to access the Gateway being used in a teleport event
2016-12-31 21:46:34 -05:00
Aikar 2c5f074c1d Fix String based Action Bar to use ChatComponent to handle proper escaping 2016-12-29 08:29:09 -05:00
Aikar 04c621bb48 Fix ItemStack Data Conversion
Spigot did not copy our version, and their version is not 100% correct.

The current state results in item meta and damage data value conversions clashing for control

For example on a horse egg, on itemstack creation, the 100 Damage is converted to 0 and sets EntityTag

SetItemMeta then drops the previous NBTTagCompound and makes a new one, which has no EntityType associated
to it as the previous stack had no metadata.

This change makes it so that itemstack conversion is delayed until after meta applies

Pretty much restores our previous implementation before Spigot tried to resolve it.
2016-12-29 07:58:49 -05:00
Aikar 2f831e83cd Change Outdated Build Download URL to Paper CI 2016-12-29 00:57:26 -05:00
Aikar 62d7e84ff0 Vehicle Dismount Event Improvements
player.getVehicle() was returning null during the event. Paper had added lots of code to
cause the player to remount the entity on cancel.

I've simplified the diff and made player.getVehicle() work during the event by setting the
vehicle back during the event, and only set it to null if the event is not cancelled.
2016-12-29 00:53:02 -05:00
Aikar 9db5f4c20a New Firework API's
Get the launcher of a Firework and who it is boosting
2016-12-28 02:25:35 -05:00
Aikar 3967ce4cb3 Activation Range Improvements
Fixes and adds new Immunities to improve gameplay behavior
2016-12-28 00:19:58 -05:00
Aikar 498c673952 Change default Debugging port to avoid conflicts 2016-12-27 16:12:39 -05:00
Aikar 34e0091024 Incremental Auto Save Players
Take same approach we did for chunks, and only save player if its been X time since last save,
instead of doing it all in 1 tick.

This is even more helpful considering Player Saving is done sync for File IO.
2016-12-27 16:11:25 -05:00
Aikar 422dc4fa06 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 86925b4446 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 352c322914 Upstream update 2016-12-27 13:07:43 -05:00
Aikar 6a3e97e28a Respect AsyncCatcher for Async Command Detection - Fixes #555 2016-12-27 11:00:15 -05:00
Aikar da3827e1c5 Upstream, Fixes #533 2016-12-23 00:55:03 -05:00
Aikar bded01f0f5 continue instead of break for treasure map bounding
per: https://github.com/PaperMC/Paper/commit/a5f9077242fdaba3ae77170383c6cd12a2d82c10#commitcomment-20268968

The break may of been skipping attempts at valid chunks. I thought break was the right abort, but maybe it is not.
2016-12-21 21:28:01 -05:00
Aikar 06e82119e2 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
Aikar daab7ed781 Optimize isEmpty() to remove Map lookup
Every call to .isEmpty() made a horribly wasteful map lookup just to get the
reference to the Air Item for checking.

We will now cache a copy of that item
2016-12-21 04:21:42 -05:00
Aikar c6ffa97c7a Revert "Optimize ItemStack.isEmpty()"
This reverts commit c2b8a4be32.

See a bug
2016-12-21 03:51:48 -05:00
Aikar c2b8a4be32 Optimize ItemStack.isEmpty()
Remove hashMap lookup every check, simplify code to remove ternary
2016-12-21 03:50:43 -05:00
Aikar e0f5d3e1bd Update upstream 2016-12-21 01:40:41 -05:00
Aikar f7f9ba8639 Actually set the ChatPosition 2016-12-20 16:02:05 -05:00
Aikar 252c3ff471 Add String based Action Bar API 2016-12-20 15:56:41 -05:00
Aikar bc72d63bfc Configurable Cartographer Treasure Maps
Allow configuring for cartographers to return the same map location

Also allow turning off treasure maps all together as they can eat up Map ID's
which are limited in quantity.
2016-12-20 15:28:32 -05:00
Aikar a5f9077242 Bound Treasure Maps to World Border
Make it so a Treasure Map does not target a structure outside of the
World Border, where players are not even able to reach.

This also would help the case where a players close to the border, and one
that is outside happens to be closer, but unreachable, yet another reachable
one is in border that would of been missed.
2016-12-20 15:17:18 -05:00
Aikar 4506924566 Ignore invalid Marker Icon ID's in maps - Fixes #497
Replace with the red marker. Should of only happened by creative abuse.
2016-12-19 23:39:52 -05:00
Aikar fff0dc6598 Prevent Pathfinding out of World Border - Fixes #547
This prevents Entities from trying to run outside of the World Border
2016-12-19 23:08:31 -05:00
Aikar 310105c9c0 Update upstream 2016-12-19 22:58:12 -05:00
Aikar e82cdab244 Fix worldborder bug
typo in variable name
2016-12-19 01:23:59 -05:00
Aikar beb2b5b6c1 Update Upstream 2016-12-19 01:23:54 -05:00
Aikar 61526b1029 Optimize World.isLoaded(BlockPosition)Z
Reduce method invocations for World.isLoaded(BlockPosition)Z
2016-12-02 00:20:34 -05:00
Aikar e5b4e80232 Ignore "Unable to resolve BlockEntity" debug messages - Fixes #489 2016-12-02 00:02:18 -05:00
Aikar b1aa7e2ca9 Merge branch 'vemacs-cachedthreadpool-login'
* vemacs-cachedthreadpool-login:
  Cache user authenticator threads Idea from @AlfieC
2016-11-23 11:53:35 -05:00
Aikar 09a8e2f02f Update upstream 2016-11-21 18:00:40 -05:00
Aikar 84a72db135 Upstream update again 2016-11-19 00:16:42 -05:00
Aikar 7d73fa7ae0 Update Upstream 2016-11-18 23:58:56 -05:00
Aikar 8f3325047c Re-add dependency reduced pom
Learned the correct way to handle that file
2016-11-18 21:09:03 -05:00
Aikar 0ba0ac4910 update my repo url 2016-11-12 00:01:34 -05:00
Aikar 1d9fc7dfc2 Chunk Save Stats Debug Option
Adds a command line flag to enable stats on how chunk saves are processing.

Stats on current queue, how many was processed and how many were queued.
2016-11-04 02:21:33 -04:00
Aikar 3732877c5c Rework that save cap patch and make it configurable 2016-11-04 01:55:36 -04:00
Aikar e9542e33fd Don't process auto save if the save queue is filled
This avoids ever growing pending NBT objects which eat up memory.
2016-11-04 01:33:08 -04:00
Aikar 5fe1de30c9 Prevent Hoppers from loading chunks by double chest 2016-11-04 01:32:53 -04:00
Aikar c15001e24d Fix faulty logic in Auto Save check - Fixes #443 2016-11-04 01:31:49 -04:00
Aikar 4708920d8d Updated Timings to better detail saves 2016-10-20 00:21:35 -04:00
Aikar 59eb1231b5 Revert "Option to hide plugins from the Query Protocol"
This already exists

This reverts commit d6a9c326c7.
2016-10-19 23:38:18 -04:00
Aikar d6a9c326c7 Option to hide plugins from the Query Protocol 2016-10-19 23:37:14 -04:00
Aikar c59127a587 Disable Vanilla Chunk GC in favor of Bukkits 2016-09-26 01:52:01 -04:00
Aikar e081f311cb don't save level every tick for auto save. whoops 2016-09-26 01:50:26 -04:00
Aikar 731f141042 Raise string limit for packet serialization
The default limit is possible to hit with 50 page books with color codes, causing clients to disconnect.

Bump the limit up a hair to above currently seen sizes.
2016-09-21 23:56:41 -04:00
Aikar 663fbf798e Auto fix bad Y levels on player login
Bring down to a saner Y level if super high, as this can cause the server to crash
2016-09-21 23:49:27 -04:00
Aikar 59b9ad36e6 Remove FishingHook reference on Craft Entity removal
This caused some bugs chickeneer reported to me, with fishing.
2016-09-21 23:45:05 -04:00
Aikar d330ae5050 Process NMS Data Conversion post ItemMeta on Copy
ItemMeta apply is a destructive process that expects to be the authority on
what the items NBT data is.

When CraftItemStack.asNMSCopy was called, the conversion ran, potentially setting
the converted data into the ItemStacks tag.

Then if that item had ItemMeta, it would completely undo that conversion by
erasing the NBT Tag.

On copy, run conversion post ItemMeta apply.
2016-09-21 23:42:13 -04:00
Aikar cc1f66ce0e add a chunk registration fix
World checks and the Chunk Add logic are inconsistent on how Y > 256, < 0, is treated

Keep them consistent
2016-09-21 22:56:19 -04:00