Commit graph

3080 Commits

Autor SHA1 Nachricht Datum
md_5
1fccb89501 Fix completion of multiple arguments in Bukkit commands 2018-07-16 21:03:46 +10:00
md_5
926ea10459 SPIGOT-4017: Increase Team related length limits 2018-07-16 19:15:26 +10:00
md_5
22e5229238 Standardise empty string as null / not set 2018-07-16 16:20:26 +10:00
md_5
b6a757dec8 SPIGOT-4016: Fix clearing custom names 2018-07-16 14:39:01 +10:00
md_5
8fbc72b714 Add ignore-vanilla-permissions option to assist with disabling default commands 2018-07-16 12:06:06 +10:00
md_5
322f2f9518 CraftBanner also needs to use wool data 2018-07-16 10:37:56 +10:00
md_5
3890544e04 SPIGOT-4015: Make CraftTeam tie into backing prefix/suffix 2018-07-16 10:20:53 +10:00
md_5
ee3c26688e SPIGOT-4008: Fix server-icon loading 2018-07-16 10:08:07 +10:00
md_5
43eb8f312c SPIGOT-4011: Clear error for plugin misusing ChunkData 2018-07-16 09:01:23 +10:00
md_5
10261f31d7 Fish / Dolphin should be WaterMob, and WaterMob Creature 2018-07-16 08:51:34 +10:00
md_5
b8ea9ec844 SPIGOT-4004: Fix banner pattern colouring 2018-07-15 23:30:00 +10:00
md_5
60185a5616 Validate world in CraftServer.createChunkData 2018-07-15 19:52:26 +10:00
md_5
764b81ced2 SPIGOT-4003: Fix TropicalFish.getType 2018-07-15 18:52:21 +10:00
Senmori
cfc30bb382 Add javadocs to new CraftBlockData utility methods. 2018-07-15 16:36:02 +10:00
md_5
fe7db9d53b Add EntityToggleSwimEvent and isSwimming / setSwimming API 2018-07-15 16:17:35 +10:00
md_5
72cf620d47 SPIGOT-4002: Fix usage of default: statements in 1.13 plugins compiled w/ Eclipse 2018-07-15 15:00:35 +10:00
md_5
421c1728c8 Update to Minecraft 1.13-pre7 2018-07-15 10:00:00 +10:00
md_5
57ab4cfc6f Player metadata really should be keyed by UUID not name 2018-07-11 20:02:32 +10:00
md_5
ca6d2cf9dc Add validation checks to CraftPlayer.teleport 2018-07-11 09:06:48 +10:00
md_5
6103339c08 SPIGOT-3976: Add some additional toStrings to CraftEntity classes 2018-06-27 20:27:52 +10:00
blablubbabc
fbe3046435 SPIGOT-3619: Improve CraftScheduler#isCurrentlyRunning
* No longer returns opposite of what it should
* Works for sync tasks as well
2018-06-20 13:11:50 +10:00
md_5
2f3ed3b2d0 Remove outdated build delay. 2018-06-17 13:02:54 +10:00
Parker Hawke
d0a3620c2d Implement Arrow tile methods 2018-05-06 14:12:19 +10:00
md_5
61ca7d92c1 SPIGOT-3923: Defer PlayerInventory ItemStack change to 1.13 2018-05-05 08:22:40 +10:00
md_5
ca057a3457 SPIGOT-3920: Make player inventories consistently return null for empty stacks 2018-05-04 17:09:46 +10:00
md_5
21d5f75d6c SPIGOT-3908: Fix signed books incorrect defaulting to unresolved 2018-04-19 08:03:39 +10:00
md_5
bea5a842bc SPIGOT-3904: Consolidate book handling code 2018-04-16 19:19:38 +10:00
md_5
9060bfa9b9 SPIGOT-3886: Plugin exceptions in map rendering should not crash server 2018-04-08 20:03:12 +10:00
Senmori
9f49ad60e7 Remove magic values in scheduler package 2018-03-26 15:34:33 +11:00
Senmori
3a482bdd40 Add setTarget and getTarget to Slime. 2018-03-03 21:50:57 +11:00
md_5
fb414fe101 Add missing WEARABLE EnchantmentTarget 2018-02-19 20:48:27 +11:00
BlackHole
bacaf9274b SPIGOT-3824: Return the direct vehicle of an entity, not the root vehicle 2018-02-16 23:16:48 +01:00
md_5
fd702e4f44 Fix incorrect unit test name 2018-02-16 10:33:36 +11:00
md_5
f4ca1805d6 Fix bad usage of setter in previous commit 2018-02-12 10:38:09 +11:00
Senmori
f8411ea1e5 Expand Structure Block API 2018-02-12 10:33:19 +11:00
md_5
8bb4f6ccc1 SPIGOT-3813: Player.setHealth not reliable in conjunction with attribute API 2018-02-12 08:59:32 +11:00
md_5
49ecc7c7a2 SPIGOT-3812: Workbench from Bukkit.createInventory does not update 2018-02-12 08:43:11 +11:00
md_5
9ab298de7b SPIGOT-3807: Improve getEyeHeight 2018-02-10 12:17:00 +11:00
Senmori
1c40a81828 Expand EnderSignal API 2018-02-03 17:48:41 +11:00
md_5
015bda4b7d SPIGOT-2911: Implement AbstractHorseInventory 2018-01-28 09:56:55 +11:00
Senmori
c7656468e4 Expand CreatureSpawner API 2018-01-24 17:19:41 +11:00
md_5
bdcc7c7b02 Unit tests for Material.isItem 2018-01-16 09:57:47 +11:00
md_5
bd308430b5 SPIGOT-3751: BossBar flag methods reversed 2018-01-10 12:40:38 +11:00
md_5
67b763c5a7 Fix Block PistonMoveReaction 2018-01-10 10:47:26 +11:00
md_5
4119224efe Fix opening shulker inventories 2018-01-08 16:07:18 +11:00
md_5
ab09b27ef4 Remove a bunch of spurious _INVALID_ methods. 2018-01-05 13:04:18 +11:00
md_5
e40c9ef4b9 print -> println in world start region preparation 2018-01-02 20:24:33 +11:00
md_5
595eaaa8be SPIGOT-3724: Make CraftMetaSkull work reliably for player skulls 2018-01-01 12:32:48 +11:00
Senmori
950006003c SPIGOT-355: API for Villager careers 2017-12-31 21:21:03 +11:00
md_5
e1fb9cb640 Send title timings before sending titles 2017-12-30 13:39:54 +11:00
md_5
b5a10a9d6d Remove unused private static final variable 2017-12-28 14:47:57 +11:00
blablubbabc
45c83860e1 SPIGOT-3696: Clearing custom name of some blocks does not work 2017-12-17 11:41:56 +11:00
md_5
04595908e5 Allow unloading all worlds except the main one 2017-12-16 10:19:00 +11:00
md_5
fb4564cc37 SPIGOT-2892: Fix some clone implementations and add unit test 2017-12-16 10:18:34 +11:00
Antony Riley
6cb752ea08 Add ChunkDataTest from PR #157 2017-12-08 19:37:15 +11:00
md_5
e46898a5e8 SPIGOT-3684: Team#setColor does not trigger scoreboard update 2017-12-08 09:31:20 +11:00
md_5
cfd6933002 SPIGOT-3664: Add Material getter to ChunkSnapshot 2017-12-07 10:25:16 +11:00
Chris Cowan
558c5a348c SPIGOT-3663: Add plugin parameter to hidePlayer+showPlayer. 2017-12-05 09:37:47 +11:00
md_5
f46ccd7637 Fix some formatting in CraftEventFactory 2017-11-22 17:05:59 +11:00
Senmori
bdb8822625 SPIGOT-1505: PlayerItemMendEvent 2017-11-21 10:21:20 +11:00
md_5
dccd2763bd SPIGOT-690: Try to make force opened enchant tables work a bit better 2017-11-18 10:48:16 +11:00
Cory Redmond
74cd5fdfc4 Add setSpawnLocation(Location) 2017-11-18 10:27:24 +11:00
md_5
6e0b0a1b55 Don't special case 'invalid' usernames for UUIDs. 2017-11-18 10:12:27 +11:00
md_5
c15d869440 Use generics in health scaling methods 2017-11-17 11:08:26 +11:00
md_5
108fc362c0 CraftMetaFirework: AssertionError -> IllegalArgumentException 2017-11-17 10:23:20 +11:00
md_5
82f3b02c67 SPIGOT-1891: Player.playNote should use RECORDS category
This is what NoteBlock.play etc uses.
2017-11-14 09:57:46 +11:00
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