summaryrefslogtreecommitdiffstats
path: root/src/main/java/org
Commit message (Collapse)AuthorAgeLines
* Allow teleportation of entities on vehicles. Fixes BUKKIT-4210bendude562014-08-17-2/+8
| | | | | | | | | | | Up until Minecraft version 1.5 it was not possible to teleport entities within vehicles. With the 1.5 update came the change in the Minecraft teleportation logic to dismount before teleporting the entity, if applicable. This commit ammends the existing CraftBukkit logic for rejecting teleportation for entities in vehicles to permit the action. Due to this change, CraftBukkit is now in-line with Minecraft 1.5 teleportation logic.
* Implement ability to keep items on death via plugins. Adds BUKKIT-5724Jerom van der Sar2014-08-17-1/+6
| | | | | | | | | | | | | When a player dies their inventory is normally scattered over the the area in which they died. Plugins should be able to modify this behaviour by defining whether or not the player's inventory will be dropped on the ground or waiting for the player when they eventually respawn. This commit implements the methods included in the Bukkit half for the new behaviour by acting upon the boolean flag. The boolean flag is tested prior to clearing the inventory as well as prior to dropping the items on the ground. If the flag is true (indicating "keep inventory"), the items are not removed from the player's inventory and are not dropped on the ground.
* Implement deprecated methods. Adds BUKKIT-5752Wesley Wolfe2014-08-07-0/+58
|
* Use sensible AssertionError instead of ambiguous RuntimeExceptionWesley Wolfe2014-08-07-4/+4
|
* Fix removal of items from Item Frames. Fixes BUKKIT-5736feildmaster2014-08-02-2/+6
|
* Provide modifier functions to EntityDamageEvent. Fixes BUKKIT-5688Wesley Wolfe2014-07-13-3/+9
|
* Put damage modifiers in Functions for event. Fixes BUKKIT-5681Travis Watkins2014-07-09-20/+30
|
* Update CraftBukkit to Minecraft 1.7.10Travis Watkins2014-07-08-108/+107
|
* Use 4787c23dce0f5ac856d8d398225828971a93a3ff Guava patch for onlinePlayersWesley Wolfe2014-07-01-3/+1
| | | | | | | | This change improves the quality of life for plugin developers using iterator iteration with side-effects. In the specified Guava patch, the internal iterator no longer relies on the AbstractList iterator which iterates by index, and will instead wrap the provided iterator in a transformer given the Function.
* Implement new getOnlinePlayers. Adds BUKKIt-5668Wesley Wolfe2014-06-25-14/+117
|
* [Bleeding] Ignore damage done by LivingEntity.damage(). Fixes BUKKIT-5666t00thpick12014-06-23-0/+2
| | | | | This matches behavior previous to new damage event API of not throwing events for plugin-triggered damage.
* [Bleeding] Implement new damage api. Fixes BUKKIT-5326, BUKKIT-3878.t00thpick12014-06-22-31/+114
| | | | | | | | | | | | | | This commit centralizes event handling to where damage is actually applied to the entity to avoid bugs that have resulted from nodamageticks, modifications to damage after the event has been called, and similar mishaps. This also implements new API for getting and setting of modifications made to the damage amount actually applied to the entity. This is done by storing the change in the damage amount as each modifier is applied by vanilla code. The method that actually damages the armor worn by an entity has been relocated beneath the event called as to not apply durability loss when the event has been cancelled.
* Avoid checking for loaded chunks for lighting and entity ticking.Travis Watkins2014-06-21-1/+16
| | | | | | | | | | | | | | When a chunk is loaded the server tries to ensure it has its initial light calculations done before sending it to the player. When ticking entities the server tries to ensure the entity does not walk into an unloaded chunk. To accomplish these the server checks a one chunk radius around the chunk to be lit or a two chunk radius around the chunk the entity is in. These lookups happen every tick even though their result is unlikely to change that often. To reduce the cost of these checks we replace them with a system to keep track of what neighbor chunks a chunk has loaded and update it when chunks load or unload which is a much less frequent action. On a server with ten players this change removes about 100,000 calls a tick to LongObjectHashMap's containsKey method.
* Use UUIDs in CraftPlayer equals and hashCode methods. Fixes BUKKIT-5634Daniel Naylor2014-05-26-4/+4
|
* Fix polarity of Bat.isAwake() and Bat.setAwake(boolean). Fixes BUKKIT-5624Wesley Wolfe2014-05-20-2/+2
|
* Update CraftBukkit to use new YamlConfiguration encoding changesWesley Wolfe2014-05-14-6/+7
|
* Implement awake flag for bats. Adds BUKKIT-5606Wesley Wolfe2014-05-13-0/+10
|
* Only set skull profile if it is a player skull. Fixes BUKKIT-5605Travis Watkins2014-05-12-6/+7
|
* Avoid using the user cache in skull meta.Travis Watkins2014-05-03-5/+5
| | | | | | | | | | | | To handle changes in 1.7.9 we changed skull meta to use GameProfile instances instead of strings of player names. This reflects what vanilla is actually storing for skulls now. As skulls still require a name our API was not changed and we instead look up the rest of the profile information from the name. The way this was implemented made it so that deserializing a skull or setting its name potentially involved a network request. As skull meta itself does not actually require a complete profile we now simply create one that only contains a name and leave populating it to the server when it is actually needed.
* Implement inventory creation by type and title. Fixes BUKKIT-4045eueln2014-04-30-0/+13
| | | | | | | | | | | | | With the current API it is possible to create an inventory with a specific type, but it is not possible to give such an inventory a title other than the default. The commit changes that by adding a method to optionally supply the title for the given inventory type and holder, creating the functionality to display any supported inventory type with a 32 character length String. If the inventory title supplied is larger than 32 characters then an IllegalArgumentException is thrown stating so.
* [Bleeding] Allow generation of cocoa trees.GJ2014-04-28-0/+3
|
* [Bleeding] Correct issues with MEGA_REDWOOD trees. Fixes BUKKIT-5568GJ2014-04-28-1/+1
| | | | | | In commit 6efeddfe57, TALL_REDWOOD was used instead of the proper TreeType of MEGA_REDWOOD. Additionally, this fixes an issue in CraftWorld with an improper boolean flag related to the generation of MEGA_REDWOOD trees.
* Refactored BlockPlaceEvent and BlockChangeDelegate. Adds BUKKIT-5558bloodshot2014-04-23-42/+73
| | | | | | | | | | | | | | | | | | | | | | | | | 23 classes have been removed as they are no longer needed using the new capture logic. This should help quite a bit with future MC updates. BlockPlaceEvent Refactor Before calling Item.interactWith, a recording flag is turned on for setTypeAndData to capture a blockstate for each block that attempts to be set. When a block place event is cancelled, the recorded blockstate, stack size, and metadata will revert back to the captured state. If the event is not cancelled, a notification will be sent to clients and block physics will be updated. BlockChangeDelegate Refactor Now that we have the ability to capture blockstates through world, there is no need to modify world gen classes with BlockChangeDelegate. Instead we will simply capture blocks during world generation in order to "replay" all of the captured blockstates to send back to delegates. StructureGrowDelegate and BlockSapling.TreeGenerator have also been removed as part of this change. BlockSapling and BlockMushroom will capture blockstates the same as block placement and revert back any grow events if needed.
* Make AnvilInventory.getItem() use both containers. Fixes BUKKIT-2788Andre LeBlanc2014-04-18-0/+22
| | | | | | | | | The AnvilInventory reports its size as the sum of the ingredient and result inventories, but when trying to access the slots, only the ingredient inventory is used, leading to an ArrayIndexOutOfBounds exception. This change overrides getItem(I) and setItem(I) to use both inventories, with the slot number adjusted based on their size.
* Fix setting entity's target. Fixes BUKKIT-1358PaulBGD2014-04-18-0/+2
| | | | | | Setting the goal target overrides the entity's will to do something else. This makes it so entities like wolves with attack another player with .setTarget(), instead of hanging next to their owner.
* Catch exceptions when abandoning conversions. Fixes BUKKIT-5436Devin Ryan2014-04-18-4/+10
| | | | | | | If a conversation is abandoned due to a player disconnecting and an exception is thrown in a ConversationAbandonedListener, the server will crash. This commit prevents the exception from propagating further up the stack and instead just logs the error.
* Check that item in hand is not null after book event. Fixes BUKKIT-5443Des Herriott2014-04-18-1/+1
|
* [Bleeding] Don't allow null display names. Fixes BUKKIT-5254GJ2014-04-18-1/+1
| | | | | | | | Currently, plugins can set a player's display name to null, which could cause issues for other calls to getDisplayName that aren't expecting a null value. This changes setDisplayName to follow the same logic as setPlayerListName, which sets the player's name back to their unmodified "vanilla" name if it receives a null value as a parameter.
* [Bleeding] Return correct player SlotType. Fixes BUKKIT-3188GJ2014-04-18-2/+6
| | | | | | Previously, the SlotType for the last 4 slots in a player's inventory returned QUICKBAR when it should have returned SlotType.CONTAINER. This updates the code for determining slot type to return the proper value.
* [Bleeding] Return correct furnace SlotType. Fixes BUKKIT-5400GJ2014-04-18-0/+2
| | | | | | Previously, the SlotType for the 0 slot in a furnace returned CONTAINER, when it should have returned SlotType.CRAFTING. This updates the code for determining slot type to return the proper value.
* [Bleeding] Ensure skeletons spawn with equipment. Fixes BUKKIT-2836GJ2014-04-18-0/+4
| | | | | | | Previously, when a skeleton was spawned via the spawn(...) function, the resulting skeleton had no equipped bow and therefore could not properly attack. This fix gives all skeletons the proper equipment and ensures that they are able to attack.
* Handle profiles in SkullMeta, they don't store a string anymore.Travis Watkins2014-04-17-12/+24
|
* Make bans pretend to use names like before 1.7.8.Travis Watkins2014-04-17-19/+28
| | | | | | Bans require a name and UUID but our API only allows for a single string identifier for a ban entry. Until this is sorted out go back to the old name based setup since we can always get a UUID given a name.
* Make skulls pretend to only use names like before 1.7.8.Travis Watkins2014-04-17-15/+8
| | | | | | | Any new API here needs more thought, skulls require a name but OfflinePlayer is not guaranteed to have one. There is a Mojang approved way to get a complete profile from a name but not from a UUID so for now just pretend this still only uses names.
* Fix getting white list, ban list, and op list. Fixes BUKKIT-5538Travis Watkins2014-04-17-28/+55
| | | | | | | | The getEntries methods on these return player names instead of UUIDs. As we need the UUIDs for our API we add a getValues method to get at the data we need. To further ensure we get the most data possible we also add a way to get at the stored GameProfile to ensure we always have both the UUID and the name from the list.
* Don't do a lookup for obviously invalid usernamesTravis Watkins2014-04-17-9/+18
|
* Add methods to use arbitrary entries in scoreboards. Adds BUKKIT-3977Travis Watkins2014-04-13-7/+43
|
* Fix missed diff and other small thingsTravis Watkins2014-04-13-1/+1
|
* Check actual whitelist for CraftOfflinePlayer tooTravis Watkins2014-04-12-1/+1
|
* Check the actual whitelist for Player#isWhitelisted()Travis Watkins2014-04-12-1/+1
| | | | | | | The server's check is for whether or not a player can pass the whitelist not just if the player is on it. That seems like more useful information but the API has always just checked if they are on it so this commit restores that.
* Use fetched GameProfile for getOfflinePlayer(String)Travis Watkins2014-04-12-6/+19
| | | | | | | | When getting an OfflinePlayer by name we lookup their UUID and then use that to fetch the OfflinePlayer. If the player has not played on this server before the resulting OfflinePlayer will return null for getName(). As this is unintuitive we now create the OfflinePlayer directly using the profile we looked up and make OfflinePlayer prefer that data.
* Update CraftBukkit to Minecraft 1.7.8Travis Watkins2014-04-11-172/+403
|
* Add method to send fake sign updates to players. Adds BUKKIT-2300Patrick Seidel2014-04-02-7/+37
|
* Add equals for CraftInventory objects. Adds BUKKIT-4110Jeremy Wood2014-04-02-0/+10
| | | | | | | | | When working with inventories you regularly end up with different Inventory objects that have the same underlying Minecraft inventory. Currently, even those these point to the same thing, they are not considered equal. With this commit comparing any Inventory object that represents the same inventory will result in equals(Object) returning true.
* Store last known player names in preparation for name changingfeildmaster2014-03-31-0/+1
|
* Implement API for dealing with player UUIDs. Adds BUKKIT-5071Travis Watkins2014-03-29-2/+101
|
* Fix PotionEffect removal.Nate Mortensen2014-03-23-1/+1
| | | | | | | | | | | | The method in EntityLiving to remove a potion effect was remapped during the 1.7.5 update. The method invocation in CraftLivingEntity was not updated to invoke the remapped method, which has led to a random method in LivingEntity being called in its place. This commit corrects the behavior of removePotionEffect by changing the method to invoke the remapped method as opposed to EntityLiving#m(float). Thanks to @gabizou for finding this issue.
* Increment loop index whether or not command succeeded. Fixes BUKKIT-5455WolfieMario2014-03-22-2/+1
| | | | | | | | | | | When VanillaCommandWrapper dispatches a command containing a PlayerSelector wtih c>-1 (implicitly true for @a), it loops over the selected players and exectures the command with each player. However, the loop index is only incremented if the command fails. As a result, a successful command is repeated on the same player indefinitely, locking up the server. This commit fixes the issue by incrementing the loop index regardless of whether the command succeeds, ensuring the command is only executed once per player identified by the PlayerSelector.
* Update CraftBukkit to Minecraft 1.7.5Nate Mortensen2014-03-21-71/+73
|
* Remove chunks from queue if we don't need them anymore.Travis Watkins2014-02-12-0/+5
|