Commit Graph
120 Commits
Author SHA1 Message Date
Travis Watkins 019a33f50d Fix teleport failing right after join. Fixes BUKKIT-5479
Teleporting a player checks to see if the player is disconnected to
try to avoid creating ghost players. The check it uses, however, randomly
fails when the player is in the middle of joining the server. The check
that would work correctly here does not work correctly when the player
actually disconnects. To work around this we add a new flag which is
cleared on the first tick of the new player and assume they are connected
if the flag is set.
2014-03-22 19:39:03 -05:00
Nate Mortensen 385ace970e Update CraftBukkit to Minecraft 1.7.5 2014-03-21 23:56:34 -04:00
EvilSeph 6d9a6fbb4b Fix attributes not clearing on death. Fixes BUKKIT-5213
Due to an incorrect mapping of this method to a friendly name, we're
unfortunately calling the wrong method within EntityPlayer.reset() to
reset attributes. Instead of what we've mapped as "removeAllEffects", we
should be calling EntityLiving.aP(). This mapping should be corrected in
the next naming version.
2013-12-20 15:33:06 -05:00
mbax 2726696652 Update CraftBukkit to Minecraft 1.7.2 2013-11-30 19:26:12 -06:00
feildmaster dcb9d6a5ef Update CraftBukkit to 1.6.4 2013-09-19 20:01:02 -05:00
T00thpick1 1192f2a53a Add API to control scaled health. Adds BUKKIT-4590
This commit implements the ability to set the scale of hearts that the
client renders.  When the Packet44UpdateAttributes packet is sent, the
max health attribute is replaced with a scaled version, to preserve the
scaled health illusion clientside.

In order to accurately display the scaled health for players, a true
health is stored within CraftPlayer, and the datawatcher now stores the
scaled health. The getHealth() method for players still returns their
true health.

Changed setHealth() within EntityLiving to appropriately handle health
for instances of EntityPlayer. Inlined a call to
setHealth(getMaxHealth()) within the EntityLiving constructor to work
around CraftEntity instantiation.

Additionally fixes the health values sent when eating food within
FoodMetaData and ItemFood, which previously sent the unscaled health;
this commit alters them to send the properly scaled health.

Additionally fixes BUKKIT-4535, BUKKIT-4536, and BUKKIT-4127
2013-07-23 21:52:17 -05:00
Nate Mortensen cebc247b78 Correctly fire VehicleExitEvent. Fixes BUKKIT-3761
This change makes it so that EntityHuman#setPassengerOf(Entity) invokes
its parent method when leaving vehicles so that VehicleExitEvent is fired
for players leaving vehicles.

This change also fixes BUKKIT-2110, making it so VehicleExitEvent
correctly handles cancellation. The implementation of VehicleExitEvent
completely ignored the cancellation state of the event, making it so that
cancelling the event had no effect.  Cancelling a VehicleExitEvent now
causes the entity to remain inside of the vehicle, with no visual stutter.
2013-07-13 13:29:32 -06:00
EvilSeph a31158bd0b Clear attributes on death; mistranslation issue. 2013-07-10 20:02:18 -04:00
mbax f6a0b1e426 Update CraftBukkit to 1.6.2 2013-07-08 19:43:37 -04:00
EvilSeph c00db5f751 Properly clear attributes on remove and death. Fixes BUKKIT-4416 2013-07-03 00:25:31 -04:00
Wesley Wolfe adcb293a03 Fix scaling for player health. Fixes BUKKIT-4431 2013-07-02 23:09:43 -05:00
Wesley Wolfe 22adf8a3ce Rework max health values. Fixes BUKKIT-4398 2013-07-02 12:34:40 -05:00
Nate Mortensen 6c09066e22 Update CraftBukkit to 1.6.1 2013-07-01 12:10:06 -05:00
Travis Watkins 401a6809be Improve InventoryCloseEvent handling. Fixes BUKKIT-3286
Currently there are several cases where a player will have their inventory
screen closed client side but we will not call an event. To correct this
we call the event when the server is the cause of the inventory closing
instead of just when the client is the cause. We also ensure the server is
closing the inventory reliably so we get the events. Additionally this
commit also calls the event when a player disconnects which will handle
kicks, quits, and server shutdown.
2013-05-02 06:28:51 -05:00
Travis Watkins 799779e4b1 Update CraftBukkit to Minecraft 1.5.2 2013-04-27 10:42:19 -05:00
Travis Watkins ce5b97ea83 Fetch tile entities from chunks instead of world. Fixes BUKKIT-4055
When looking up tile entities for a chunk to send to a player we currently
loop through every tile entity in the world checking if it is within the
bounds of the relevant chunk. Instead of doing this we can just use the
tile entities list stored in the chunk to avoid this costly searching.

As a further optimization, we also modify the generic range-based lookup
to use chunks as well. For most lookups this will give a smaller search
pool which will result in faster lookups.

Thanks to @mikeprimm for the idea and most of the implementation.
2013-04-13 00:30:16 -05:00
mbax d95a4705cb Implement Scoreboard API. Adds BUKKIT-3776
This implementation facilitates the correspondence of the Bukkit Scoreboard
API to the internal minecraft implementation.

When the first scoreboard is loaded, the scoreboard manager will be created.
It uses the newly added WeakCollection for handling plugin scoreboard
references to update the respective objectives. When a scoreboard contains no
more active references, it should be garbage collected.

An active reference can be held by a still registered objective, team, and
transitively a score for a still registered objective. An internal reference
will also be kept if a player's specific scoreboard has been set, and will
remain persistent until that player logs out.

A player's specific scoreboard becomes the scoreboard used when determining
team structure for the player's attacking damage and the player's vision.
2013-04-04 01:13:21 -05:00
Travis Watkins 5f089137ee Cleanup comments, formatting, etc 2013-03-25 00:51:36 -05:00
Travis Watkins 696543cf3f Update CraftBukkit to Minecraft 1.5.1 2013-03-20 15:09:23 -05:00
Travis Watkins 596047aa6b Only set player weather if a plugin requested it.
If the server changes the weather it will set the per-player weather
variable and future changes will not apply. We should only set this
variable when a plugin is requesting per-player weather and not when
the server it doing it.
2013-03-18 13:58:16 -05:00
T00thpick1 1bde25bb33 Implement per-player Weather API. Adds BUKKIT-812 2013-03-18 13:03:54 -05:00
Travis Watkins 83d29e461c Update CraftBukkit to Minecraft 1.5 2013-03-15 13:28:59 -05:00
EdGruberman d834ca4c6c [Bleeding] Add experimental support for entity portal traveling 2013-01-19 06:20:33 -06:00
feildmaster e59af9908b Update CraftBukkit to Minecraft 1.4.7 2013-01-17 03:50:24 -06:00
feildmaster ced0646351 Implement entity max health methods. Adds BUKKIT-266 2012-12-23 07:29:06 -06:00
feildmaster 23b6764374 Update CraftBukkit to Minecraft 1.4.6 2012-12-20 10:43:00 -06:00
Wesley Wolfe 78f48258d8 Implement ItemFactory and ItemMeta values. Adds BUKKIT-15 2012-12-17 01:31:41 -06:00
feildmaster 39fdb56200 Players should be able to pick up items by default. Fixes BUKKIT-3143
As an added feature, players defaulted to being able to not pick up items if the flag was false. However, since minecraft doesn't normally use the flag on players, the flag was always false.
2012-12-10 20:27:40 -06:00
EvilSeph cc78e17312 Fix players losing experience when keepInventory is true. Fixes BUKKIT-2915 2012-11-18 17:45:29 -05:00
Travis Watkins 7f7192f8fd Update CraftBukkit to Minecraft 1.4.4. 2012-11-13 16:09:52 -06:00
md_5 53d24e2b22 [Bleeding] Fix mistranslation affecting time of the server vs time of day.
Fixes BUKKIT-2797
2012-11-02 16:36:43 -04:00
feildmaster 9e4e2c62af Expose API for managing and using GameRules. Adds BUKKIT-2757 2012-10-31 03:40:43 -04:00
h31ix db49a57694 Update PotionEffects on player death. Fixes BUKKIT-2673
On player death player PotionEffects need to be updated so that a player's
invisibility and other effects are removed, otherwise they will persist
after a respawn. This is a carry-over from our use of persistent player
entities.
2012-10-28 23:27:02 -04:00
Travis Watkins 60819c6693 Update CraftBukkit to Minecraft 1.4(.2). 2012-10-27 22:19:03 -04:00
EvilSeph 349cb0bba6 What is dead may never die. 2012-09-14 01:53:34 -04:00
Travis Watkins b8cc862083 Update to 1.3.2 2012-08-25 00:54:21 -04:00
Travis Watkins 164c066453 Fix "moved too quickly" detection. 2012-08-05 23:57:22 -05:00
Travis Watkins beb71069b7 Don't use Packet56 and clear client cache on world changes. 2012-08-05 18:42:03 -05:00
feildmaster a43d621c01 Update CraftBukkit to Minecraft 1.3.1 2012-08-02 04:58:50 -05:00
Wesley Wolfe b00de5f176 Cleaned up CraftBukkit comments in NMS.
Added newlines at the end of files
Fixed improper line endings on some files
Matched start - end comments
Added some missing comments for diffs
Fixed syntax on some spots
Minimized some diff
Removed some no longer used files
Added comment on some required files with no changes
Fixed imports of items used once
Added imports for items used more than once
2012-07-23 23:55:31 -05:00
feildmaster cf9544c1d9 Reuse ItemInWorldManager, and stop applying ability changes. Fixes BUKKIT-1811 2012-07-09 18:07:53 -05:00
Nathan Adams 9d09e7d016 Updated to Minecraft version 1.2.4. Updated version string to 1.2.4-R0.1. 2012-03-22 20:39:39 +00:00
Nathan Adams 543c4879fe Updated CraftBukkit to 1.2 2012-03-01 14:38:31 +00:00
Erik Broes 33ba9f0a2f Updated to rename revision 02 2012-03-01 01:12:41 +00:00
Celtic Minstrel 0842bab48b [Bleeding] Implementation of inventory framework. Addresses BUKKIT-856
See the corresponding Bukkit commit for details.

Implementation details:
- Any packets that include an itemstack will send air stacks as null; maybe this will even eliminate the client crash that occurs if the client receives an air stack
- Better handling of null itemstacks in general (ie less converting them to air stacks)
- Inventory.setContents() can now take an array smaller than the inventory without error
- Player.updateInventory() should now correctly update the result slot in a crafting inventory

Some small credit goes to Afforess (initial implementation of openInventory() methods) and Drakia (initial implementation of InventoryOpenEvent and InventoryCloseEvent).
2012-02-29 15:19:07 -05:00
Erik Broes c5a4bfd291 Use OO > new method 2012-01-29 16:06:11 +01:00
Nathan Adams b0f29b1755 Throw PlayerLevelChangeEvent and PlayerExpChangeEvent events. Thanks to feildmaster for the PR. 2012-01-19 16:07:18 +00:00
Erik Broes a4ce846d07 Fix formatting. 2012-01-15 10:54:57 +01:00
Erik Broes 61ec751ca1 Update for 1.1_01 renames.
We know these updates (can) break plugins bypassing Bukkit. They are needed for
smooth updates however. There will be another one right before before 1.1-R1.
2012-01-15 10:52:37 +01:00
Nathan Adams dfbcd36ab7 Fixed a further exploit with players attacking more things that they shouldn't. 2012-01-14 18:12:59 +00:00