Commit graph

4557 Commits

Autor SHA1 Nachricht Datum
Aikar
b4b649122a
Remove the immediate dispatch optimization and adjust thread executors
hopefully will resolve #1049
2018-03-18 20:09:12 -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
Aikar
242e82f25b
Fix more issues with async scheduler and cancelling pending task
was a race condition, so do need to use the head/parsePending logic still
2018-03-17 14:59:03 -04:00
Aikar
09d1277482
Fix isCurrentlyRunning for sync tasks
Not sure where this would of ever been used, but for correctness sake.
2018-03-17 13:14:44 -04:00
Aikar
26b1519733
check that a task is valid before executing incase it was cancelled elsewhere
also set runners in the short circuit path so we know of the pending task incase its long running
2018-03-17 12:58:27 -04:00
Aikar
7dfbe44247
Improved Async Task Scheduler
The Craft Scheduler still uses the primary thread for task scheduling.
This results in the main thread still having to do work as part of the
dispatching of async tasks.

If plugins make use of lots of async tasks, such as particle emitters
that want to keep the logic off the main thread, the main thread still
receives quite a bit of load from processing all of these queued tasks.

Additionally, resizing and managing the pending entries for all of
these asynchronous tasks takes up time on the main thread too.

This commit replaces the implementation of the scheduler when working
with asynchronous tasks, by forwarding calls to the new scheduler.

The Async Scheduler uses a single thread executor for "management" tasks.
The Management Thread is responsible for all adding and dispatching of
scheduled tasks.

The mainThreadHeartbeat will send a heartbeat task to the management thread
with the currentTick value, so that it can find which tasks to execute.

Scheduling of an async tasks also dispatches a management task, ensuring
that any Queue resizing operation occurs off of the main thread.

The async queue uses a complete separate PriorityQueue, ensuring that resize
operations are decoupled from the sync tasks queue.

Additionally, an optimization was made that if a plugin schedules
a single, non repeating, no delay task, that we immediately dispatch it
to the executor pool instead of scheduling it. This avoids an unnecessary
round trip through the queue, as well as will reduce the size growth of the
queue if a plugin schedules lots of asynchronous tasks.
2018-03-16 23:09:51 -04:00
Zach Brown
ffb1bdf05f
[CI-SKIP] macOS filesystem dust made it past gitignore! 2018-03-13 18:43:13 -04:00
Y. Lin
90c7126e18 [CI-SKIP] Add vemacs to MIT list (#1043)
Somebody pinged me on Telegram and said I should do this
2018-03-11 12:16:52 -07:00
Aikar
87c48cf19d
explicit, not implicit... oops 2018-03-11 14:21:03 -04:00
Aikar
c8027cd453
Disable Implicit Network Manager Flushing
This seems completely pointless, as packet dispatch uses .writeAndFlush.

Things seem to work fine without implicit flushing, but incase issues arise,
provide a System property to re-enable it using improved logic of doing the
flushing on the netty event loop, so it won't do the flush on the main thread.

Renable flushing by passing -Dpaper.implicit-flush=true
2018-03-11 14:15:38 -04:00
Brokkonaut
e0c0fa5682 [CI-SKIP] Add Brokkonaut to MIT list (#1042) 2018-03-10 19:38:50 -08:00
Aikar
6b04f82e90
Prevent Frosted Ice from loading/holding chunks 2018-03-10 16:33:49 -05:00
Shane Freeder
ddc8a0ae88
Return null instead of players location on EnderChests opened by plugins 2018-03-10 20:26:05 +00: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
BillyGalbreath
3da0c30cd1 [CI-SKIP] Add BillyGalbreath to MIT list (#1037) 2018-03-09 12:00:48 -05:00
Techcable
6773b4f1bc [CI-SKIP] Add Techcable to MIT list (#1038) 2018-03-09 11:59:59 -05:00
Shane Freeder
af94fec5af
Fix ItemStack.damage OBFHelper (fixes #1036) 2018-03-08 19:41:00 +00:00
Shane Freeder
cdc1dcf02e
Update CB/S 2018-03-08 19:36:35 +00: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
chickeneer
e142487cf3 [CI-SKIP] Add me (chickeneer) to MIT list (#1034) 2018-03-07 22:56:00 -05:00
Aikar
933c0ed1af
Fix ProfilePropertyIterator#remove() recursion bug 2018-03-07 21:03:01 -05:00
Jadon Fowler
f83526ea1c [CI-SKIP] Add myself to the MIT List (#1032)
I added https://github.com/PaperMC/Paper/blob/master/Spigot-Server-Patches/0141-Toggleable-Elytra-Wall-Damage.patch
a while ago and I'd like to license it under MIT in case someone ever wants to use it for anything.
2018-03-07 12:13:32 -08:00
Gabscap
ce16fd74ca [CI-SKIP] Add me (Gabscap) to MIT list
And change my used mail address in patch
2018-03-07 13:58:17 +01:00
Shane Freeder
fcd39ab64f
[CI-SKIP] The power of MIT compells me 2018-03-07 12:16:01 +00:00
Shane Freeder
8ca04481bf
[CI-SKIP] Merge 'Add me (Mystiflow) to MIT list' 2018-03-07 12:13:50 +00:00
Mark Vainomaa
1f89f8b969
[CI-SKIP] I (mikroskeem) do MIT licensed contributions to Paper 2018-03-07 10:30:47 +02:00
Mystiflow
b0c42b1e1e [CI-SKIP] Add me (Mystiflow) to MIT list 2018-03-07 04:34:08 +00:00
Black Hole
1416bc3e0b [CI-SKIP] Add me (Black Hole) to MIT list (#1027) 2018-03-06 18:45:43 -08:00
kashike
c10cff7386 [ci skip] kashike wears MITtens too 2018-03-06 18:12:30 -08:00
Kyle Wood
ef88a1558a
[CI-SKIP] Add me (Kyle Wood) to MIT list 2018-03-06 19:47:50 -06:00
Daniel Ennis
5a5adc0c0c
Add self to LICENSE as MIT 2018-03-06 20:46:25 -05:00
Zach Brown
bde15f9781
[CI-SKIP] Clarify project licensing
* THIS IS NOT A RELICENSE *

This commit adds explicit clarification as to the state of this
project's licensing as it has always been. Nothing has changed here.

It also adds a note about how specific authors have chosen to release
their work under a more permissive license. Any past contributors who
want their name added to this list should submit a pull request here.

We will not be adding anyone's names to this list ourselves.
2018-03-06 20:41:03 -05:00
Aikar
709d95ae00
Add max-player-auto-save-per-tick setting to spread out saves more
This will force the saves to spread over multiple ticks even when many
players auto save interval is aligned, avoiding spikes on large servers.

Closes #1021
2018-03-04 20:20:27 -05:00
Zach Brown
1e870d319b
Update upstream B/CB 2018-03-04 18:32:38 -05:00
Kyle Wood
1b2c45f9d0
Use a more general method of aliasing md5sum
Rather than checking the platform or operating system, simply check if
the command exists. If the check fails, check if the md5 command exists.
If that fails as well, cancel the build script. Otherwise, assign the
alias as before.
2018-02-23 18:58:45 -06: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
Shane Freeder
fab6cbe7e7
Update B/CB 2018-02-24 04:03:32 +00:00
Zach
24cdac9a0e
Merge pull request #1016 from ShelLuser/master
Allowing Paper to be build on FreeBSD
2018-02-22 10:47:58 -05:00
ShelLuser
0c7e011b78 This patch allows Paper to be build on FreeBSD using the paper script. FreeBSD also doesn't have md5sum and uses md5, just like OS X. As such I added an extra check for the presence of FreeBSD. 2018-02-22 11:43:31 +01:00
Aikar
a32ff9fc0b
update url to my repo 2018-02-19 22:35:32 -05:00
Zach Brown
d2f279d5cc
Update parent pom
Switch repos to use HTTPS (@demonwav)
Add destroystokyo public
Add note that screwing with this file sucks
Remove outdated parent
2018-02-18 19:37:12 -05:00
Shane Freeder
7acf1d4be1
Update CB 2018-02-18 14:41:40 +00:00
Shane Freeder
17e57eb6ce
Extend Player Interact to cover CommandBlocks (@Phoenix616) 2018-02-18 14:39:02 +00:00
Aikar
a64aa09862
Ignore AsyncCatcher setting for Command Dispatch, always force sync
Plugins were abusing this to dispatch commands async anyways.

We will no longer check that flag, and force all commands to be ran sync.

Use a different boolean for allowing things go to through on shutdown/restart instead.

Resolves #1004
Resolves #1005
2018-02-15 00:34:58 -05:00