Commit Graph
29 Commits
Author SHA1 Message Date
Zach Brown 4c350ecbb5 Dont block Player#remove if the handle is a custom player
Upstream throws UOE if you try to call remove on a Player.
We just add a check to ensure that the CraftPlayer's handle
is a ServerPlayer
2019-02-04 23:33:24 -05:00
Zach Brown f1f016dd5e Replace OfflinePlayer#getLastPlayed
Currently OfflinePlayer#getLastPlayed could more accurately be described
as "OfflinePlayer#getLastTimeTheirDataWasSaved".

The API doc says it should return the last time the server "witnessed"
the player, whilst also saying it should return the last time they
logged in. The current implementation does neither.

Given this interesting contradiction in the API documentation and the
current defacto implementation, I've elected to deprecate (with no
intent to remove) and replace it with two new methods, clearly named and
documented as to their purpose.
2019-01-02 00:35:43 -06:00
Zach Brown 48707f87ac Inventory#removeItemAnySlot 2018-08-28 23:04:15 -04:00
Zach Brown e3dd06b7c1 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 addition should serve a
starting point for future additions in this area.

Fixes GH-559
2018-01-27 17:04:14 -05:00
Zach Brown 8c951e13df Add PlayerJumpEvent 2017-09-28 17:21:44 -04:00
Zach Brown 3edcdeaf22 Block player logins during server shutdown 2017-07-02 21:35:56 -05:00
Zach Brown 49fbdd7336 Add option to make parrots stay on shoulders despite movement
Makes parrots not fall off whenever the player changes height, or touches water, or gets hit by a passing leaf.
Instead, switches the behavior so that players have to sneak to make the birds leave.

I suspect Mojang may switch to this behavior before full release.

To be converted into a Paper-API event at some point in the future?

== AT ==
public net.minecraft.world.entity.player.Player removeEntitiesOnShoulder()V
2017-05-16 21:29:08 -05:00
Zach Brown 2f74bdb56b Properly handle async calls to restart the server
The watchdog thread calls the server restart function asynchronously. Prior to
this change, it attempted to do several non-safe operations from the watchdog
thread, rather than the main. Specifically, because of a separate upstream change,
it causes player entities to be ticked asynchronously, among other things.

This is dangerous.

This patch moves the old handling into a synchronous variant, for calls from the
restart command, and adds separate handling for async calls, such as those from
the watchdog thread.

When calling from the watchdog thread, we cannot assume the main thread is in a
tickable state; it may be completely deadlocked. In order to handle this, we mark
the server as stopping, in order to account for situations where the server should
complete a tick reasonbly soon, i.e. 99% of cases.

Should the server not enter a state where it is stopping within 10 seconds, We
will assume that the server has in fact deadlocked and will proceed to force
kill the server.

This modification does not force restart the server should we actually enter a
deadlocked state where the server is stopping, whereas this will in most cases
exit within a reasonable amount of time, to put a fixed limit on a process that
will have plugins and worlds saving to the disk has a high potential to result
in corruption/dataloss.
2017-05-12 23:34:11 -05:00
Zach Brown b1018e6808 Filter bad block entity nbt data from falling blocks 2016-11-12 23:25:22 -06:00
Zach Brown 72bc20c589 Configurable packet in spam threshold 2016-09-11 14:30:57 -05:00
Zach Brown a55727ff06 Don't lookup game profiles that have no UUID and no name 2016-07-16 19:11:17 -05:00
Zach Brown bdd96190e0 Optional TNT doesn't move in water 2016-05-22 20:20:55 -05:00
Zach Brown ba4eeb8a28 System property for disabling watchdoge 2016-05-12 23:02:58 -05:00
Zach Brown 3532e55dab EntityRegainHealthEvent isFastRegen API
Don't even get me started
2016-04-22 01:43:11 -05:00
Zach Brown 3c1c4ab059 Option to use vanilla per-world scoreboard coloring on names
This change is basically a bandaid to fix CB's complete and utter lack
of support for vanilla scoreboard name modifications.

In the future, finding a way to merge the vanilla expectations in with
bukkit's concept of a display name would be preferable. There was a PR
for this on CB at one point but I can't find it. We may need to do this
ourselves at some point in the future.
2016-04-06 01:04:23 -05:00
Zach Brown b2671f4dd1 Configurable spawn chances for skeleton horses 2016-03-22 12:04:28 -05:00
Zach Brown c8c53412a4 Disable spigot tick limiters 2016-03-02 23:45:17 -06:00
Zach Brown 1fed104464 Add more entities to activation range ignore list 2016-03-02 00:32:25 -06:00
Zach Brown 188e3332d6 Check online mode before converting and renaming player data 2016-03-02 00:03:55 -06:00
Zach BrownandJake Potrebic b8b1eef98c Configurable top of nether void damage
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
2016-03-01 23:58:50 -06:00
Zach Brown 3e1c79c850 Only refresh abilities if needed 2016-03-01 23:12:03 -06:00
f41436f787 Expose server build information
Co-authored-by: Zach Brown <1254957+zachbr@users.noreply.github.com>
Co-authored-by: Kyle Wood <kyle@denwav.dev>
Co-authored-by: Mark Vainomaa <mikroskeem@mikroskeem.eu>
Co-authored-by: Riley Park <rileysebastianpark@gmail.com>
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
Co-authored-by: masmc05 <masmc05@gmail.com>
2016-03-01 14:32:43 -06:00
Zach Brown 92ffacc419 Allow nerfed mobs to jump 2016-03-01 13:24:16 -06:00
Zach Brown c7125aaa48 Configurable fishing time ranges 2016-03-01 13:14:11 -06:00
Zach Brown 92ebed543f Configurable baby zombie movement speed 2016-03-01 13:09:16 -06:00
Zach Brown 097b7fd752 Configurable cactus bamboo and reed growth height
Bamboo - Both the minimum fully-grown height and the maximum are configurable
- Machine_Maker
2016-03-01 13:02:51 -06:00
Zach Brown 4cd66b0305 Hook into CB plugin rewrites
Allows us to do fun stuff like rewrite the OBC util fastutil location to
our own relocation. Also lets us rewrite NMS calls for when we're
debugging in an IDE pre-relocate.
2018-10-03 20:09:18 -04:00
Zach Brown 329dfdabdc Paper Metrics
Removes Spigot's mcstats metrics in favor of a system using bStats

To disable for privacy or other reasons go to the bStats folder in your plugins folder
and edit the config.yml file present there.

Please keep in mind the data collected is anonymous and collection should have no
tangible effect on server performance. The data is used to allow the authors of
PaperMC to track version and platform usage so that we can make better management
decisions on behalf of the project.
2017-03-24 23:56:01 -05:00
Zach BrownandJake Potrebic bc10922ef3 Build system changes
== AT ==
public net.minecraft.server.packs.VanillaPackResourcesBuilder safeGetPath(Ljava/net/URI;)Ljava/nio/file/Path;

Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
2016-02-29 20:40:33 -06:00