This method is most useful when it gives all the players who have ever
logged on to the server. Previously, it was not distinguishing between
players who had previously logged on, and were currently logged in,
and those who had previously looged on and were not currently logged in.
A distinction was made, however, between those currently logged in,
but who had not logged in previously.
This commit ensures that all players who have ever logged in (and are
listed as either logged in, or they have a player .dat file) will be
returned by the mentioned method.
Fixes BUKKIT-404
The existing method for cloning a Bukkit ItemStack fails to correctly copy
the underlying enchantments. Fix this by overriding .clone() in
CraftItemStack, cloning the underlying nms ItemStack correctly.
Fixes BUKKIT-360
Fix for BUKKIT-223.
Issue BUKKIT-223: When a player exits a minecart or boat, both a
VehicleExitEvent and a VehicleEnterEvent are fired. Only the
VehicleExitEvent should fire.
Reason for bug: This occurs because the VehicleEnterEvent is fired in
EntityBoat.b and EntityMinecart.b *any* time a player right-clicks on
a vehicle, whether the right-click is to enter the vehicle or exit it.
Fix: By moving the creation of VehicleEnterEvents from EntityBoat.b
and EntityMinecart.b to Entity.setPassengerOf, we can create either a
VehicleEnterEvent or a VehicleExitEvent, depending on whether the
player is entering or exiting a vehicle.
This should fix many issues with enchantments being lost, as the method used takes care of enchantments.
Additionally, use the new nms ItemStack constructor in places where appropriate.
Fixes (at least part of) BUKKIT-7. Need to identify any further places to fix.
We also teach CraftWorld how to explode an event, taken from
Explosion.a(boolean) (the code that breaks blocks and drops them on the ground).
The EnderDragon has a flag that slows it down when it hits unbreakable blocks:
Obsidian, White Stone or Bedrock. It might be useful to extend the event so that
plugins can set this.
Letting the API set the default yield for an explosion event has been
deprecated, so we now set the default yield using the appropriate constructor.