Commit Graph

2964 Commits

Author SHA1 Message Date
md_5
adbfc1f98a SPIGOT-3649: Backwards check in playEffect 2017-11-13 08:47:04 +11:00
md_5
25959fab20 Add Score.isScoreSet()Z API. 2017-11-10 10:50:58 +11:00
md_5
353964045a Catch all exceptions from plugin conversation handling 2017-11-10 10:46:46 +11:00
md_5
326c2e605f SPIGOT-3644: Fix missed yaw callsite update 2017-11-09 13:07:25 +11:00
Parker Hawke
305df9035f Implement max fuse tick & explosion radius methods to Creeper 2017-11-08 12:33:21 +11:00
md_5
c3047a5df7 SPIGOT-3629: Greatly expand entity effect API 2017-11-07 19:32:24 +11:00
md_5
2fae23c251 SPIGOT-3637: Adjust yaw yet again 2017-11-07 17:21:38 +11:00
md_5
1257322d1f SPIGOT-3622: Issue in some combinations of spawn protection 2017-10-28 16:00:15 +11:00
md_5
31d3159f04 SPIGOT-3613: Success count not reset for exceptions. 2017-10-17 21:08:43 +11:00
md_5
9ab758c7b6 SPIGOT-3605: Spawn eggs not saving internal data 2017-10-09 18:32:45 +11:00
md_5
30da15647f Fix zombie professions 2017-10-09 18:18:11 +11:00
md_5
59fa98bfb7 SPIGOT-3587: Set head rotation when spawning entity 2017-10-01 11:01:49 +11:00
md_5
a3b3a421ac SPIGOT-3565: Head yaw is "more accurate" for living entities 2017-09-28 16:23:14 +10:00
blablubbabc
ee91bce157 Fix active async tasks not cancelled by CraftScheduler#cancelTasks(Plugin) 2017-09-28 16:18:45 +10:00
md_5
9a1f5ee80a Update to Minecraft 1.12.2 2017-09-18 20:00:00 +10:00
md_5
8f472147b7 Remove outdated build delay. 2017-09-14 21:39:04 +10:00
md_5
876d22cd55 SPIGOT-3561: Fix selectors in SuccessCount 2017-09-09 12:51:18 +10:00
md_5
9e3636d82a SPIGOT-3553: Add OfflinePlayer based methods to SkullMeta 2017-09-06 16:14:37 +10:00
md_5
178caf9ac2 SPIGOT-3551: Recursively unrestrict advancements 2017-09-06 16:07:41 +10:00
blablubbabc
bde2a93cfe Add BukkitTask#isCancelled 2017-09-02 17:04:29 +10:00
Jannyboy11
79e55b6dcf SPIGOT-1107: Shift clicking and delegation for custom inventories
PR #398
2017-08-18 18:54:49 +10:00
Lukas Hennig
e1f296d115 Fix CraftBanner initialisation. 2017-08-07 17:55:47 +10:00
md_5
b5878783ad SPIGOT-3491: Add option to bypass permissions in advancements 2017-08-06 09:07:24 +10:00
Lukas Hennig
19507baf8b Improvements to BlockStates
* Actually capture all the data of TileEntities. This is done by creating a copy of the TileEntity. The methods of BlockState which currently directly access the TileEntity reference will modify the data of that TileEntity-snapshot instead.
* With the call to BlockState.update, the captured TileEntity data gets applied to the current TileEntity in the world.
* Methods which trigger block specific actions will use the current TileEntity from the world.
* CraftBlockState does not hand out the wrapped or the snapshot TileEntity directly. Instead, it provides an applyTo method to copy the data to a given TileEntity and a method to directly get a copy of the TileEntity NBT data represented by the BlockState. CraftMetaBlockState was updated to make use of that.
* Added #getSnapshotInventory() to bukkit which allows modifiying the captured inventory snapshots of containers.
* Tried to clarify which methods only work if the BlockState is placed, which methods require the block in the world to still be of the same type (methods which trigger actions), and that .getInventory() directly modifies the inventory of the block in the world if the BlockState is placed and becomes invalid if the block type is changed.

Backwards compatibility

* If the BlockState acts as InventoryHolder, getInventory() will still return the inventory directly backed by the TileEntity in the world (like before), and not the snapshot inventory. This compromise should reduce the potential of these changes to break existing plugins, or craftbukkit's own use of BlockState.
* The snapshot's inventory can be accessed by a new method getSnapshotInventory()
* In case the BlockState is not placed (if it was retrieved from the MetaBlockState of an item), the getInventory() method will however return the snapshot inventory. So that when the BlockState gets applied back to the item, the inventory changes are properly included.
* With the changes to CraftMetaBlockState it is no longer required to call the update method before passing a modified BlockState to the CraftMetaBlockState. For backwards compatibility the update method will simply return true for a non-placed BlockState, without actually doing anything.

Impact on plugins
* Restoring blocks now actually works as expected, properly restoring the TileEntity data, reglardless if the block changed its type in the meantime.
* Plugins are now consistently required to call the update method in order to apply changes to blocks. Though, regarding the Javadoc they should have been required to do so anyways.
* New feature: Plugins can take and modify inventory snapshots.
* Breaking change: If a plugin gets the BlockState of a block in the world, modifies the inventory returned by .getInventory(), and then tries to use the same BlockState to apply the TileEntity data to an ItemStack block meta, the ItemStack will use the snapshot inventory, disregarding the changes made to the inventory returned by .getInventory(). This is the compromise of .getInventory() returning the inventory directly backed by the TileEntity in the world.

Other fixes related to BlockState:
* TileEntityContainer#getLocation() will run into a NPE if the TileEntity is non-placed (ex. when getting the BlockState from a CraftMetaBlockState).
* Beacon.getEntitiesInRange() would previously throw a NPE if called for a non-placed BlockState. It was changed to now require to be placed and use the current TileEntity in the world. If the TileEntity in the world is no longer a beacon, it will return an empty list.
* EndGateway now supports setting and getting the exit location even for non-placed EndGateways (inside BlockStateMeta) by using / returning a location with world being null.
2017-08-05 14:37:19 +10:00
md_5
20ab5d3d10 Add build delay back 2017-08-04 16:09:17 +10:00
md_5
2a927e8638 Update to Minecraft 1.12.1 2017-08-03 23:00:00 +10:00
md_5
9a1fc1e2ee Remove outdated build delay. 2017-08-03 21:10:43 +10:00
md_5
b5dc294d32 SPIGOT-3485: Launch shulker bullets as projectiles 2017-08-03 08:23:27 +10:00
BillyGalbreath
d2aa6845f0 Implement BroadcastMessageEvent 2017-07-28 16:53:43 +10:00
md_5
b1b9ab0df9 SPIGOT-3461: Standardise plugin load timing 2017-07-26 13:20:29 +10:00
md_5
d35483b0e1 Correct scheduler behaviour with intervals of >= Integer.MAX_VALUE (circa 3 years). 2017-07-25 15:36:44 +10:00
md_5
4670a84bd9 SPIGOT-3432: Add playNote support for new sounds 2017-07-24 17:44:44 +10:00
md_5
5a12442f22 SPIGOT-3433: Improve AreaEffectCloud#getSource 2017-07-22 09:51:22 +10:00
md_5
9a82fa7785 SPIGOT-3428: Recover from invalid firework data 2017-07-19 09:56:35 +10:00
md_5
70be90e168 SPIGOT-3425: Correct slot type calculation 2017-07-16 11:03:19 +10:00
md_5
b5df1f59f7 SPIGOT-3423: Don't treat technical piston block as BlockStateMeta 2017-07-16 10:48:21 +10:00
md_5
e03b1a556d SPIGOT-3417: Event for shearing snowman 2017-07-15 09:53:22 +10:00
md_5
6659ddf11a SPIGOT-3416: Cap team prefix / suffix at correct value of 16 2017-07-13 12:42:45 +10:00
md_5
af1c0139f5 SPIGOT-3409: Improve performance of registering stupid amounts of permissions in plugin.yml 2017-07-10 21:05:47 +10:00
md_5
50b75cd65d SPIGOT-3407: Set damager for evoker fangs 2017-07-08 22:40:54 +10:00
md_5
11323bf873 Increase expiration time to two weeks. 2017-07-04 20:52:11 +10:00
BlackHole
d603539842 SPIGOT-3387: Prevent null enchantments in ItemMeta 2017-06-29 10:52:33 +10:00
md_5
477fb2bb72 SPIGOT-3381: Save older serialized enchants 2017-06-26 09:49:28 +10:00
md_5
d7cd7275f2 SPIGOT-3379: Generalise canPickupItems to other entities. 2017-06-26 08:34:52 +10:00
Jeremy Wood
1314229dc2 SPIGOT-3336: HideFlags will now serialize as a List rather than a Set.
HideFlags will be serialized as a list and deserialized as an Iterable.
This will allow maximum flexibility on both the formats it can be
serialized into and formats it can be deserialized from.
2017-06-23 12:48:15 +10:00
md_5
f3356f1074 Treat Vanilla commands as Bukkit Commands 2017-06-21 19:14:51 +10:00
md_5
6aa0fa3206 Increase expire time to 7 days 2017-06-17 17:45:09 +10:00
md_5
885da43758 SPIGOT-3342: Fix invalid usage of null in InventoryWrapper 2017-06-15 20:25:06 +10:00
md_5
2a2d6d6295 Add PistonMoveReaction getters for Entity 2017-06-12 19:23:24 +10:00
md_5
f85977ae6f SPIGOT-3331: New map colours don't display 2017-06-12 19:16:30 +10:00