summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeLines
...
* [Bleeding] Fix stack overflow with Ender Crystals. Fixes BUKKIT-5583GJ2014-05-03-3/+3
|
* 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] Recheck persistence for chicken jockeys each tick. Fixes BUKKIT-5577GJ2014-04-29-0/+5
|
* [Bleeding] Include equipment in EntityDeathEvent loot. Fixes BUKKIT-5566GJ2014-04-29-4/+23
|
* [Bleeding] Allow generation of cocoa trees.GJ2014-04-28-0/+3
|
* [Bleeding] Correct issues with MEGA_REDWOOD trees. Fixes BUKKIT-5568GJ2014-04-28-2/+2
| | | | | | 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-2635/+323
| | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Don't limit anvil stack size.Travis Watkins2014-04-23-1/+0
| | | | | | After the changes in c549609d anvils started incorrectly limiting their inputs to single item stacks. Vanilla allows for full size stacks here and this is useful for using materials to repair items so now we do too.
* Handle inventory max stack sizes better. Fixes BUKKIT-5564Travis Watkins2014-04-23-8/+33
| | | | | | | | Make sure we check the inventory's max stack size where appropriate and don't assume the inventory slot is able to take our entire stack just because it is empty. We also ensure the client is updated with the correct slot contents and cursor contents in cases where the max stack changes result in different behavior than the client expected.
* Faux sleepers wake up normally. Fixes BUKKIT-3667Yariv Livay2014-04-18-1/+1
|
* 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.
* Allow plugins to enchant normally unenchantable items. Adds BUKKIT-1849Andre LeBlanc2014-04-18-1/+7
| | | | | | | | | | It's currently not possible for a plugin to allow enchanting of an otherwise un-enchantable item using the enchanting table. This commit causes EnchantItemEvent to be called with an empty list of enchantments, allowing a plugin to provide it's own set of enchantments when vanilla Minecraft would not allow any. It also bypasses the unsafe enchantment check since a plugin should be permitted to apply any enchantments they like, and vanilla should not generate unsafe enchantments of its own.
* 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.
* Update client stack when block place is cancelled. Fixes BUKKIT-5284bloodshot2014-04-18-1/+3
| | | | | | | | | Currently, whenever a player places a block in a protected area the equipped itemstack size on client is never updated properly since the client thinks the block was placed. The reason this happens is because ItemStack.matches returns true since the server does not decrement stack size if a BlockPlaceEvent is cancelled. To correct this on cancel we set the flag to always update the client regardless of matching.
* Update chest animation after cancelling open event. Fixes BUKKIT-1440bloodshot2014-04-18-12/+44
| | | | | | | Currently if a plugin cancels an InventoryOpenEvent for vanilla chests, the chest animation for clients is stuck in the open state since IInventory's closeContainer method is never called. To fix the issue, closeContainer is called before exiting the display GUI method.
* 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
|
* Call event when boat is destroyed by falling. Fixes BUKKIT-5500Brokkonaut2014-04-18-7/+14
|
* Removing broken chunk caching from World. Fixes BUKKIT-5425Brokkonaut2014-04-18-16/+1
| | | | | | | | Chunk caching in the World class does not know about outdated cache values. This caused various problems when accessing previously unloaded chunks. The caching also did not improve the performance so it is removed. Synchronization is also not necessary, because all accesses to getChunkAt may only come from the main thread.
* [Bleeding] Call EntityTargetEvent in many new places.GJ2014-04-18-11/+48
| | | | | Adds BUKKIT-5388, BUKKIT-5387, BUKKIT-5386, BUKKIT-5483, BUKKIT-5484. Fixes BUKKIT-5389.
* Add files from mc-dev for diff visibility.GJ2014-04-18-0/+99
|
* [Bleeding] Call BlockRedstoneEvent for all rails. Adds BUKKIT-4080GJ2014-04-18-1/+15
| | | | | | Previously, Detector Rails were the only rails that properly called BlockRedstoneEvent when they changed from powered to unpowered. This commit adds BlockRedstoneEvent calls for both Powered Rails and Activator Rails.
* Add BlockPoweredRail.java from mc-dev for diff visibility.GJ2014-04-18-0/+132
|
* [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] Ice in the nether fades to air. Fixes BUKKIT-5373GJ2014-04-18-1/+1
| | | | | | | | Previously, whenever BlockFadeEvent was called for ice melting, it returned the new BlockState with a type of Material.STATIONARY_WATER. However, in the Nether, ice melting does not form water, but is simply replaced by air instead. This changes the event to use the proper BlockState based on whether the block is located in the Nether or not.
* [Bleeding] Fix some inventories not using maxStack. Fixes BUKKIT-2883GJ2014-04-18-3/+9
| | | | | | | CraftBukkit adds the ability to specify the maxStack size for most inventories. However, some inventories were not overriding the getMaxStack method properly, and so the functionality was unavailable. This fixes the maxStack setting for Anvils, Minecarts, PlayerInventory, and Hoppers.
* [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.
* [Bleeding] Add all blocks needed to PortalCreateEvent. Fixes BUKKIT-5464GJ2014-04-18-3/+9
| | | | | | | | | | Due to changes in how portals were created in Minecraft 1.7, the code that was previously used to find the blocks involved in the PortalCreateEvent no longer detected all blocks. Additionally, in the process of updating to 1.7.2, a missed diff resulted in some blocks that were found not being properly added to the blocklist. This commit corrects that missed diff, while also adding a check to ensure that the top and bottom of the portal frame are included in the blocklist.
* [Bleeding] Add many missing SpawnReasons.GJ2014-04-18-11/+14
| | | | | | | | | | Adds BUKKIT-5370, BUKKIT-5377, BUKKIT-5378, BUKKIT-5379, BUKKIT-5380, BUKKIT-5381, BUKKIT-5382. Adds reasons for zombies infecting villagers and zombie villagers being cured. Readds reason for a skeleton being spawned as a spider jockey. Adds reason to distinguish ocelot babies from the parent they spawned with. Adds reasons for chunk generation causing the ender dragon, villagers, and witches to spawn. And finally, adds a reason for spawning a chicken mount for a baby zombie.
* Add files from mc-dev for diff visibility.GJ2014-04-18-0/+622
|
* [Bleeding] Add many missing event calls.GJ2014-04-18-40/+152
|
* Add BlockTallPlant.java from mc-dev for diff visibility.GJ2014-04-18-0/+160
|
* [Bleeding] Add missing HangingBreakEvent. Fixes BUKKIT-3943GJ2014-04-18-4/+17
| | | | | | | The old PaintingBreakByEntityEvent was deprecated and replaced by HangingBreakByEntityEvent. However, in the case of being struck by lightning, only the deprecated event was being called. This fixes that so that both the new and old events are called appropriately.
* Handle profiles in SkullMeta, they don't store a string anymore.Travis Watkins2014-04-17-13/+27
|
* Update CraftBukkit to Minecraft 1.7.9Nate Mortensen2014-04-17-6/+15
|
* Handle expired bans correctly. Fixes BUKKIT-5541Travis Watkins2014-04-17-3/+19
|
* 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-51/+78
| | | | | | | | 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.
* Import files from mc-dev for diff visibilityTravis Watkins2014-04-17-0/+235
|
* [Bleeding] Re-add missed diff in 1.7.5 update. Fixes BUKKIT-5536t00thpick12014-04-17-1/+1
| | | | | | In the 1.7.5 update the diff that called book edit events when editing books was accidentally dropped because of nms changes within the file. This commit re-adds the craftbukkit call to restore event behavior.
* 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-13/+17
|
* Use world-container when finding players to convert. Fixes BUKKIT-5530Travis 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.