Commit Graph

2933 Commits

Author SHA1 Message Date
AgentLV
8b69bdd0d1 Add hand used to BlockPlaceEvent. 2016-03-16 07:14:10 +11:00
Matthew
e43b2780a5 SPIGOT-1914: Compare PotionEffectType objects using Object#equals(Object) when searching for a custom effect to remove 2016-03-14 16:54:57 +11:00
Matthew
0c7ae56148 SPIGOT-1856 / SPIGOT-1920: Fix Statistic.DROP not returning value when provided with a Material 2016-03-14 08:00:14 +11:00
md_5
55a85357a6 SPIGOT-1871: Fix wrong argument order in CraftMerchantRecipe 2016-03-13 09:48:23 +11:00
0x277F
1386bd3ddf SPIGOT-1571: Add Entity Glide Events. 2016-03-12 21:01:07 +11:00
md_5
2bf333e0fc SPIGOT-1901: Fix projectile launching. 2016-03-12 20:41:06 +11:00
md_5
0619f0eb3b SPIGOT-1725: Fix dynamic scoreboard criteria on non-main scoreboards 2016-03-12 17:57:40 +11:00
t00thpick1
4a8818c5fd SPIGOT-1638 / SPIGOT-1673: Rework Potions API 2016-03-12 12:38:22 +11:00
Matthew
1fefbf9b98 SPIGOT-1806: Implement HumanEntity#getMainHand 2016-03-12 08:15:43 +11:00
md_5
4c3da3f6e2 SPIGOT-1862: Fix banners withj shields. 2016-03-10 16:34:33 +11:00
md_5
daf45148d1 SPIGOT-1526 / SPIGOT-1809: Expand Inventory API 2016-03-09 16:33:08 +11:00
md_5
3cfd8ca3cb SPIGOT-1828: CraftBanner tile entity return null 2016-03-08 18:01:54 +11:00
md_5
20d9f644a6 SPIGOT-1823: Use fast chunk lookup in CraftWorld also 2016-03-07 15:52:56 +11:00
Thinkofdeath
0cd6711085 Fix regenerating chunks not updating visually 2016-03-06 23:50:19 +00:00
Lukas Hennig
92494d7dba Added a playSound method to World which accepts a String parameter.
Similar to the respective method in Player.
2016-03-06 12:20:38 +11:00
md_5
b6bb6beb63 SPIGOT-1768: Fix Eye of Ender with custom world generators. 2016-03-06 11:45:25 +11:00
md_5
d6a61e3e5d SPIGOT-1776: Replace BossBar.hide/show with visibility. 2016-03-06 09:55:36 +11:00
BlackHole
45171f0864 SPIGOT-1772: Use correct statistics for entities 2016-03-06 08:28:34 +11:00
md_5
94ba824302 SPIGOT-1758: Apply correct ItemMeta to new CommandBlock types 2016-03-05 15:52:44 +11:00
Lukas Hennig
ef13ca4444 SPIGOT-1549: Fix custom String sounds. 2016-03-04 15:55:40 +11:00
md_5
7863085a62 SPIGOT-1721: Handle Enderman.getCarriedMaterial when not carrying. 2016-03-04 15:50:35 +11:00
md_5
6742811d69 SPIGOT-1666: Expand Team option API 2016-03-04 15:24:57 +11:00
md_5
5a3813d7fe SPIGOT-1608: Add a way to get the hand used in PlayerInteract*Events 2016-03-04 15:24:51 +11:00
md_5
3e3516e3b2 Treat ShulkerBullet as Projectile 2016-03-04 07:22:10 +11:00
Melair
9056e66554 Enable support of PotionMeta on SPLASH_POTION, LINGERING_POTION and TIPPED_ARROW. 2016-03-04 07:19:33 +11:00
md_5
23ad72b4c8 SPIGOT-1683: Arrows are not projectiles 2016-03-03 20:59:10 +11:00
md_5
e2c5473e07 SPIGOT-1679: Shulker bullets are not projectiles. 2016-03-03 17:17:42 +11:00
md_5
78578ca517 SPIGOT-1676: Launch projectiles with velocity 2016-03-03 16:52:19 +11:00
md_5
4d3af9c19b SPIGOT-1677: Fix attributes with only single underscore. 2016-03-03 16:38:57 +11:00
Thinkofdeath
bad994e724 Don't round the location of playSound to the center of a block 2016-03-02 16:02:36 +00:00
Thinkofdeath
09b4549a29 SPIGOT-1640: Fix spawning particles that use MaterialData 2016-03-02 14:51:50 +00:00
md_5
b0411e8799 SPIGOT-1622: Add drop chance methods for off hand. 2016-03-02 17:03:20 +11:00
md_5
912dfae454 SPIGOT-1623: Use correct spawnParticle overloads. 2016-03-02 16:51:09 +11:00
Thinkofdeath
92602ad172 SPIGOT-1610: Treat clicking on an inventory window as clicking outside it 2016-03-01 23:44:22 +00:00
Thinkofdeath
1be3bd058f SPIGOT-1607: Fix BlockPlaceEvent and BlockMultiPlaceEvent sometimes showing the wrong item used 2016-03-01 21:37:08 +00:00
md_5
76c04254c1 SPIGOT-1575: Fix PlayerInventory.setArmorContents 2016-03-02 06:58:45 +11:00
md_5
be538b8a2a SPIGOT-1582: Add SkullType.DRAGON 2016-03-02 06:52:52 +11:00
md_5
dcbb2a45ab SPIGOT-1576: Add more new 1.9 enchants. 2016-03-02 06:39:09 +11:00
md_5
69e196f796 SPIGOT-1567: Rework setItems to set slots correctly regardless of array reference. 2016-03-01 19:59:52 +11:00
md_5
4831c56cdb SPIGOT-1523: Add FLY_INTO_WALL DamageCause to fix Elytra crash v2. 2016-03-01 17:35:18 +11:00
md_5
32587ed8e7 SPIGOT-1545: Populate Vanilla villager trades correctly. 2016-03-01 14:13:42 +11:00
md_5
41c02c0efd SPIGOT-1528: Maintain static sound map due to oversight re: underscore :( 2016-03-01 14:04:41 +11:00
md_5
8b5c9c15b0 SPIGOT-1541: Fix firework launching 2016-03-01 13:46:07 +11:00
md_5
fdaa09b23b SPIGOT-1536: Fix playNote 2016-03-01 13:42:54 +11:00
md_5
3879b98ac2 Ignore FROSTED_ICE in meta unit tests. 2016-03-01 13:30:26 +11:00
md_5
ea28c1e478 SPIGOT-1523: Crash when flying Elytra into wall. 2016-03-01 11:27:13 +11:00
md_5
3f5dfeb074 Run Biome test with AbstractTestingBase 2016-03-01 09:49:29 +11:00
md_5
aa008dff0f Update to Minecraft 1.9 2016-03-01 09:32:45 +11:00
BlackHole
e1ebe524a7 [SPIGOT-1494] Really fix player skulls with custom texture but without owner. 2016-02-19 09:22:45 +11:00
md_5
69fe73e7d9 [SPIGOT-1465] Fix skulls with no owner not displaying texture. 2016-02-05 11:44:06 +11:00
Andrew
039621dd44 Strengthen CraftMetaSkull hasOwner method 2016-02-02 16:37:15 +11:00
Thinkofdeath
930a59c68c Remove the length limit on inventory titles
1.8 no longer has a small limit like previous versions
2016-01-29 10:29:12 +00:00
ryanbennitt
07c300164a SPIGOT-1390: Fixed issues with Array.fill upper bound in setRegion 2016-01-03 15:21:05 +11:00
md_5
18fbb24b46 SPIGOT-1235: Correctly validate MaterialData for playEffect.
Thanks Jikoo for the report / fix.
2015-10-18 19:40:00 +11:00
Adam Thomas
f4c67a5c32 SPIGOT-1232: CraftServer.getPlayer(String name) returns incorrect results in some cases.
Use the absolute value of the delta to prevent negative values resulting in a better match.
2015-10-18 19:38:46 +11:00
md_5
12698ea5ad SPIGOT-1230: Normalize null log names in ForwardLogHandler.
Not technically 100% correct since null != "null", but without sacrficing performance this is the best way to fix the issue in the current implementation.
2015-10-10 22:09:31 +11:00
DemonWav
d4e32cef0c SPIGOT-759: Add FireworkExplodeEvent. 2015-09-30 09:02:11 +10:00
BlackyPaw
8cc1683e83 SPIGOT-989: Cap assignment of pickup delays to Short.MAX_VALUE due to storage implementation constraints.
Changed assignment of pickup delays in such a way that they may not be larger than the value actually stored inside the NBT format that is Short.MAX_VALUE. Did not change method signature in order not to produce any shortening cast warnings in existing code. All values larger than 32767 are generally used to indicate that an item should never be picked up. Shortening this to 32767 will actually cause the pickup delay to never decrease, thus resulting in non-pickupable item stacks.
2015-09-30 08:48:28 +10:00
md_5
62a216966f SPIGOT-1076: Add HurtEntities API for FallingBlock. 2015-09-19 09:27:51 +10:00
Thinkofdeath
a0d2928ba4 Add a missing break statement for openInventory, fixes opening dropper inventories 2015-09-18 21:42:40 +01:00
0x277F
2d4f577bbf Fixed how Dropper inventories are shown to players. 2015-09-18 15:16:50 +10:00
md_5
701ae54ffc SPIGOT-1192: Restore some behaviour to entity.getNearbyEntities 2015-09-18 15:15:56 +10:00
md_5
5e9f698fac SPIGOT-1165: Restore getNearbyEntities behaviour to include spectators. 2015-09-06 14:54:41 +10:00
Antony Riley
880a53248e New ChunkGenerator.generate api for block ids and avoiding magic values. 2015-08-01 21:22:29 +10:00
Riccardo Paolo Bestetti
5e85956281 SPIGOT-1080: Added support for opening all inventories implementing Bukkit's Inventory class. 2015-07-31 18:47:09 +10:00
md_5
9935adc4ed Update for minor remapping changes. 2015-07-30 17:13:35 +10:00
Thinkofdeath
2642f9b344 SPIGOT-1068: Limit the number of patterns on banners 2015-07-23 20:50:53 +01:00
Xor Boole
3e9b5c93d6 Prevent an Entity from riding itself. 2015-07-20 16:18:08 +10:00
Antony Riley
87b9f46d72 SPIGOT-1060: Allow custom generators to use block ids > 127 with bytes. 2015-07-19 09:23:48 +10:00
md_5
09ddd9b35e SPIGOT-1051: CraftInventoryPlayer.setItem can cause NPE. 2015-07-18 12:43:33 +10:00
Antony Riley
bf4818b94a Fix ItemStack.isSimilar(CraftItemStack) when HideFlags are set. 2015-07-15 19:47:59 +03:00
md_5
b105298f2e Simplify getPlayerExact / try for exact match first in getPlayer. 2015-07-13 19:00:33 +10:00
md_5
65cd4d79fd Simplify OfflinePlayer.getPlayer() logic. 2015-07-13 18:54:08 +10:00
md_5
1f73bbb56a Simplify isOnline() logic. 2015-07-13 18:30:25 +10:00
Morphan1
2359f6fcb0 Implement ItemMergeEvent 2015-07-12 19:57:38 +10:00
Jofkos
a03743b3b4 Add basic sendTitle / resetTitle API.
More APIs to follow pending feedback of whether this is the preferred implementation. Methods marked as deprecated and subject to change, but work as is.
2015-07-10 16:24:02 +10:00
Thinkofdeath
f27339caf8 SPIGOT-977: Use vanilla's handling for command messages for vanilla commands
Fixes gamerules that control the output of those messages
2015-07-08 23:19:21 +01:00
BlackyPaw
e91aed81b3 SPIGOT-986: Default back to skull ID 0 (SKELETON) whenever an invalid ID is encountered instead of throwing an AssertionError 2015-06-28 08:44:27 +10:00
DoctorDark
d432434fd8 SPIGOT-980: Fix NPE when setting items of offline players 2015-06-27 15:48:22 +10:00
md_5
76c834a849 Clean up World.getPlayers().
Original idea from CyberTiger, PR #150
2015-06-27 15:46:19 +10:00
md_5
994b2aae3f SPIGOT-892: Set chicken egg baby age before adding it to world. 2015-06-21 09:20:07 +10:00
md_5
0dfb243c86 SPIGOT-436: Add accompanying getSpectatorTarget(). 2015-06-21 09:20:07 +10:00
Nathan Wolf
1880a9c0b6 SPIGOT-973: Add marker API to ArmorStand 2015-06-09 09:36:31 +10:00
md_5
f4ecc39ffc SPIGOT-436: Add spectator camera API. 2015-06-09 09:17:54 +10:00
Nathan Wolf
845336b511 Serialize full skull item profile data in internal blob 2015-06-07 20:31:01 +01:00
md_5
e8c64031b1 Update commands.yml headers 2015-06-01 19:23:31 +10:00
md_5
d33f0dd3ba Remove unused bukkit.yml options and update links / info. 2015-05-31 12:11:56 +10:00
Thinkofdeath
8c14eb49ef Handle a missed case with our vanilla permissions override 2015-05-30 00:06:18 +01:00
Matt
55202e1f99 Add ability to add a string to a scoreboard instead of a player 2015-05-29 19:36:14 +10:00
DemonWav
c637b933dc Send the packet for the correct container, rather than just the container that is active at the time. - SPIGOT-932 2015-05-28 17:19:36 +10:00
DemonWav
75f835c07a Send the set item packet to the client when an item is changed or added in a player's inventory - Addresses SPIGOT-883 2015-05-26 18:46:24 +10:00
md_5
25de1e6baf SPIGOT-769: Fix opening custom inventories. 2015-05-24 10:42:53 +10:00
Nathan Wolf
7bc9c08eb4 Default to BlockFace.SELF for null directions in getFacing 2015-05-24 09:25:02 +10:00
Thinkofdeath
a486600749 Update to 1.8.4 2015-05-17 10:32:59 +01:00
Matt
0a645a2726 Remove unneeded Java 1.5 Compat 2015-05-03 09:11:45 +10:00
Cory Redmond
7722428895 Add the ability for commandblocks to be sent messages via the API. 2015-04-19 09:15:15 +10:00
Thinkofdeath
8e5e4c189b SPIGOT-581: Allow for unhandled nbt tags to be serialized to yaml 2015-04-16 11:01:13 +01:00
Thinkofdeath
5b2764148d SPIGOT-798: Allow for CustomPotionEffects to be empty 2015-04-15 15:02:34 +01:00
Thinkofdeath
e4ca2af9c4 Strip events from book pages on signing 2015-04-14 10:28:34 +01:00
Thinkofdeath
a25c96eda7 SPIGOT-742: Throw an exception instead of passing null when the sender cannot be converted 2015-04-13 11:51:04 +01:00
Thinkofdeath
35d953bac8 Replace the two nextTickList sets with a single one that combines both
Should prevent them from going out of sync
2015-04-13 11:04:38 +01:00
Nathan Wolf
96c2c39245 Implement World.getNearbyEntities 2015-04-07 19:08:07 +10:00
Thinkofdeath
61ef214f91 Implement BlockStateMeta which allows creating and editting 1.8's blockEntityTag 2015-03-24 16:02:47 +00:00
Thinkofdeath
3fce0ec0f5 SPIGOT-729: Revert the entity slice move 2015-03-22 19:01:30 +00:00
Thinkofdeath
350cb9927e Update the rename markers 2015-03-19 21:29:33 +00:00
Thinkofdeath
234e60735c SPIGOT-716: Fix regenerating chunks 2015-03-17 21:17:56 +00:00
Thinkofdeath
30d751b362 Move the entity slice loading 2015-03-16 19:44:51 +00:00
Thinkofdeath
7f609b12b9 SPIGOT-705: Fix possible CME 2015-03-15 21:38:05 +00:00
md_5
6e0120a058 SPIGOT-323: Enchanting tables can no longer be force opened. (reverted from commit bbe75338c1) 2015-03-13 17:53:15 +11:00
md_5
bbe75338c1 SPIGOT-323: Enchanting tables can no longer be force opened. 2015-03-13 17:48:57 +11:00
Thinkofdeath
2acb9e4ec3 SPIGOT-370: Remove LOCKED_CHEST
It doesn't exist anymore and has been deprecated for a year
2015-03-11 17:50:32 +00:00
Thinkofdeath
7f52bd6c95 Fix getActivePotionEffects ignoring the particles flag 2015-03-11 13:18:06 +00:00
Thinkofdeath
294d07dcc0 SPIGOT-678: Fix the particles flag being ignored in PotionMeta 2015-03-11 11:54:31 +00:00
Thinkofdeath
4e47c1c393 Add a unit test for map colors 2015-03-07 12:57:59 +00:00
Thinkofdeath
d8a9c7be42 Update to Minecraft 1.8.3 2015-03-04 09:48:58 +00:00
Thinkofdeath
3ee97a30eb SPIGOT-586: Fix a mistake in CraftMetaItem 2015-02-18 10:21:40 +00:00
md_5
726656b864 Fix hashcode / equals / formatting. 2015-02-15 12:54:18 +11:00
md_5
709f95833b API for setting/getting hideFlags. Implementation of the hideFlags to be saved in NBT. 2015-02-15 12:47:07 +11:00
FearThe1337
116514c162 Implement armor stand event. 2015-02-15 12:24:14 +11:00
BillyGalbreath
9648edfa61 Add alternatives for deprecated methods 2015-02-15 12:16:12 +11:00
Thinkofdeath
15e81cf551 SPIGOT-449: Fix the wrong caller being used in chain execute commands 2015-01-25 15:17:48 +00:00
Thinkofdeath
4b6df5adfe SPIGOT-456: Provide equals & hashCode methods for CraftObjective and CraftTeam 2015-01-25 14:39:20 +00:00
Thinkofdeath
df17927d45 Fix PerMaterialTest skipping useful tests for certain blocks 2015-01-25 12:04:21 +00:00
md_5
0d52f683db SPIGOT-469: Increment and print reload count. 2015-01-25 10:31:31 +11:00
BuildTools
17962f66ec SPIGOT-443: Synchronize access to HANDLED_TAGS as Spigot uses it async 2015-01-18 17:33:13 +00:00
Thinkofdeath
59dd2ddb9d SPIGOT-438: Correct CraftScoreboard.getObjective NPEing instead of returning null for missing objectives 2015-01-17 23:10:08 +00:00
md_5
00eba538b0 Fix mismatch between teams and player teams. 2015-01-17 19:59:16 +11:00
md_5
42ebec1f71 SPIGOT-242: Fix scoreboard API.
In particular don't maintain an internal list of state, as this gets out of whack when Minecraft adds or removes scoreboards / teams.
2015-01-17 09:41:52 +11:00
md_5
e6f9fd4dc7 isThundering should just reflect thunder state. 2015-01-13 20:42:33 +11:00
md_5
93e7b199bd Fix the CraftWorld weather methods duplicating events. 2015-01-13 20:40:23 +11:00
Hitoprl
5e6c347daa Fix SPIGOT-260: Item drops don't spill in correct place. 2015-01-11 09:46:54 +11:00
md_5
7658819130 Fix off by one in CraftRabbit. Fixes SPIGOT-392 2015-01-10 14:15:34 +11:00
md_5
4470462a54 SPIGOT-387: Remove redundant custom vehicle handling. 2015-01-09 16:59:40 +11:00
Thinkofdeath
5b92dc3d0a Whoops missed a file 2015-01-04 23:36:55 +00:00
Thinkofdeath
6ac32df219 Redirect execute through our command system and allow entities to be CommandSenders 2015-01-04 23:26:02 +00:00
md_5
dde25d45ef SPIGOT-323: Allow force creating enchant table containers. Usefullness is not guaranteed. 2015-01-05 10:05:01 +11:00
md_5
c99cdafd3f SPIGOT-323: Enchanting tables can no longer be force opened. (reverted from commit 9784338acf) 2015-01-05 10:00:26 +11:00
md_5
9784338acf SPIGOT-323: Enchanting tables can no longer be force opened. 2015-01-05 09:59:31 +11:00
md_5
e5c51c790f Actually return. 2015-01-05 09:25:27 +11:00
md_5
93efa5a803 "Fix" SPIGOT-349 - don't allow + or ! in path. 2015-01-05 09:24:44 +11:00
Xor Boole
e8e3ca29e2 Add null check before iterating over iterator. 2014-12-28 13:57:27 -04:00
Thinkofdeath
eae50b4f2a Remove DEBUG_ALL_BLOCK_STATES due to it being broken 2014-12-28 16:56:54 +00:00
Thinkofdeath
0a0d3aa5a7 SPIGOT-287: Fire a cancelled inventory open event for locked chests 2014-12-28 15:14:53 +00:00
Thinkofdeath
0e2396c22f Remove tile entity tags for signs and command blocks 2014-12-27 22:44:51 +00:00
Thinkofdeath
d51936efb4 SPIGOT-298: Fix book serialization 2014-12-27 12:13:28 +00:00
Thinkofdeath
306b233a40 SPIGOT-279: Fix all metadata being cleared for items that support blockEntityTag on material mis-match 2014-12-27 00:51:59 +00:00
Thinkofdeath
264d479fd8 SPIGOT-136, SPIGOT-267: Store pages as chat component to retain chat events unless a plugin touches them 2014-12-26 21:55:35 +00:00
FearThe137
2db3ea29a6 Implement Rabbit types. 2014-12-24 09:11:25 +11:00
md_5
6dfcbc61ab SPIGOT-204: Add way to set block type without using IDs or updating physics. 2014-12-22 19:48:02 +11:00
Thinkofdeath
40aaa31c49 Fix EntityEquipment for armor stands and redirect the getters/setters to use it 2014-12-21 23:26:42 +00:00
FearThe1337
53fc3cf74f Fix custom chunk generators. Fixes SPIGOT-193. 2014-12-21 17:38:42 +00:00
FearThe1337
89944c09c9 SPIGOT-231 and SPIGOT-229. Fix itemframe behaviour.
Confirmed fix for itemframes not showing up. Based on the code in
CraftPainting.
Besids this fix we now pass null itemstacks directly to the
EntityItemFrame to allow the removal of items in ItemFrames.
2014-12-21 09:59:45 +11:00
Fabian Faßbender
ce7dd34b5c aW() does re register Attributes which causes a IllegalArgumentException. This fixes it and sets the Guardian back to a normal Guardian without any problem. 2014-12-21 08:52:20 +11:00
Adam Thomas
606cf0eea4 Implement NameTag visibility API for Teams. 2014-12-18 21:27:46 +11:00
0x277F
dadb43af92 Use value from new potion effect particle visibility API. 2014-12-18 21:20:51 +11:00
FrozenBrain
618abf7a36 SPIGOT-228: Don't deserialize meta of written books twice 2014-12-18 09:47:10 +11:00
FearThe1337
6fab8fe51e SPIGOT-236 - fix notes playing wrongly.
Formula is from BlockNote (NMS), slightly formatted different to be smaller.
2014-12-18 09:47:10 +11:00
Thinkofdeath
20c65caae7 SPIGOT-210: Remove the exception when dropping a non-existant task
If the server crashes during chunk generation then the chunk would have never
been added to the executor, this caused a second exception to be thrown when
the server shutdown from the first exception
2014-12-16 10:53:29 +00:00
Thinkofdeath
6b061e2581 SPIGOT-152, SPIGOT-197: Add a system to handle new tags before an api is ready for them 2014-12-15 15:44:57 +00:00
Stefan
e1070b9fbb SPIGOT-206 Further checks and fixes for Hanging entities.
Adds an check for existing entities before selecting the location allowing
for hanging entities to be spawned in blocks where there already is an
hanging entity at the default rotation.
Fixes the CraftHanging setRotation function to use the new 1.8 logic.
2014-12-15 14:42:00 +00:00
Thinkofdeath
28f37a113c Fix entities freezing when a chunk is regenerated 2014-12-15 13:46:41 +00:00
TheCutter
07c2162118 Implement WorldBorder API 2014-12-14 10:02:33 +11:00
Stefan
01f0122a9e Fix the spawning of HangingEntities by picking the right direction
Related to SPIGOT-206.
Currently HangingEntities should be located next to the block they are
hanging on. With the direction set to the opposite of the block they
are hanging from.
This code is modified to find the correct direction.
2014-12-13 19:15:29 +01:00
Thinkofdeath
d5ede3bd6d Rework the vanilla link fix so that hover/click events aren't lost 2014-12-13 10:27:26 +00:00
Thinkofdeath
5f2a9eadde SPIGOT-199: Default to white instead of black for chat messages 2014-12-13 09:37:47 +00:00
Thinkofdeath
64157d1de5 SPIGOT-189: Remove ListenerWrapper in favour of just doing it in EntityPlayer 2014-12-12 19:27:37 +00:00
Thinkofdeath
54888dfafb Wrap player's ICommandListener so that our permission system can handle permission
for vanilla commands
2014-12-12 10:33:54 +00:00
Thinkofdeath
81db41b4d2 Ignore errors when parsing books and treat them as old books
In previous versions there was a mistake with book handled which
may leave books in a broken state, this tries to handle that
2014-12-12 09:46:31 +00:00
zreed
45be36a7b8 Update JLine
Later releases include the TerminalLineSettings patch. Also move call to AnsiConsole.systemInstall() to avoid patching AnsiWindowsTerminal.
2014-12-12 11:06:13 +11:00
FearThe1337
c13e6e69a2 Implement displayblocks for minecarts (SPIGOT-14). 2014-12-12 11:01:47 +11:00
TheCutter
fe8d20e376 using generator settings from WorldCreator to specify presets for FLAT or CUSTOMIZED world types 2014-12-12 11:00:41 +11:00
md_5
9fa497cd55 Add implementation of the elder Guardian API 2014-12-12 10:57:00 +11:00
Thinkofdeath
6575597292 Merge pull request #43 in SPIGOT/craftbukkit from ~FEARTHE1337/craftbukkit:perm to master
* commit '33af6fbbbf1c1a8fee3ecc8d4cf79b4a2ba17c16':
  Add the new minecraft command permission nodes.
2014-12-11 21:43:19 +01:00
FearThe1337
33af6fbbbf Add the new minecraft command permission nodes.
Previously bukkit ones were in bukkit. Moved to CraftBukkit with new prefixes.
2014-12-11 21:36:02 +01:00
Thinkofdeath
b13fd35165 Re-enable selectors for players and the console using vanilla commands 2014-12-11 20:05:48 +00:00
Thinkofdeath
84699b36a8 Rewrite book handling, Fixes SPIGOT-182 and part of SPIGOT-164 2014-12-11 19:38:09 +00:00
Thinkofdeath
14d69f1513 Remove old dev comments 2014-12-11 00:40:25 +00:00
Thinkofdeath
a6465002bf Add some missing Tile Entities 2014-12-07 13:38:16 +00:00
Thinkofdeath
44ea9d88c2 Add CraftMetaTileEntity, fixes the previously broken tests 2014-12-07 13:22:56 +00:00
Thinkofdeath
fb445e5337 Minor bug fixes 2014-12-07 12:18:50 +00:00
Thinkofdeath
c571bbe590 Disable some tests whilst issues with them are looked into 2014-12-07 11:50:45 +00:00
Thinkofdeath
6880e5277f Fix isEmpty and hashCode for CraftMetaItem 2014-12-07 11:42:37 +00:00
Thinkofdeath
6268eb5a3e Fix BlockEntityTag being stripped from items 2014-12-07 11:36:31 +00:00
Thinkofdeath
1227934d57 Make CraftMetaItem's attribute handling less strict on types 2014-12-07 10:48:14 +00:00
Thinkofdeath
cc2b09de09 Add basic support for executing commands from signs
TODO: Wrap the player in to allow for plugins to handle it better
2014-12-05 23:10:47 +00:00
zreed
9e04f2f765 Use PlayerList's UUID->EntityPlayer map in CraftServer.getPlayer(UUID) 2014-12-05 02:03:49 -05:00
Thinkofdeath
e2c4f20ed1 Serialize baseColor as a string 2014-12-04 10:10:24 +00:00
Thinkofdeath
2ba7357b4a Merge pull request #27 in SPIGOT/craftbukkit from ~AIKAR/craftbukkit:fixWorldSaveEvent to master
* commit '64492523a761fb37d2b73f4aad8b8041f7a30d83':
  Move WorldSaveEvent to proper location
2014-12-03 20:37:32 +01:00
Aikar
64492523a7 Move WorldSaveEvent to proper location
calling CraftWorld.save() currently does not call WorldSaveEvent, and WorldSaveEvent could fire on worlds that have saving disabled.

New location will always fire during a world save and only during an actual save.
2014-12-03 14:35:33 -05:00
Thinkofdeath
200ae2b6ac Fix a issue with skulls that have a blank owner 2014-12-03 19:04:19 +00:00
Thinkofdeath
4c02ffcaf3 Merge pull request #5 in SPIGOT/craftbukkit from ~DMCK2B/craftbukkit:feature/implementDepthStrider to master
* commit 'cce45591f624c915e87ce132b508adf8e0d7961b':
  Implement the Depth Strider enchantment for the API
2014-12-03 17:41:27 +01:00
Fabian Faßbender
497a7b4cfb Add ANVIL and BEACON custom inventories. Also handle a few special cases for inventory sizes 2014-12-03 16:20:55 +00:00
Thinkofdeath
8110f51b50 Minor formatting fixes 2014-12-03 11:08:35 +00:00
Thinkofdeath
a972ddfc74 Missed a case 2014-12-02 23:57:29 +00:00
Thinkofdeath
1613d09138 Don't wrap the y coordinate in World.getBlockAt 2014-12-02 23:54:38 +00:00
BuildTools
351edbf4e5 Fix CraftMetaBanner serialization. 2014-12-02 15:29:04 +01:00
Thinkofdeath
275603d37a Merge pull request #21 in SPIGOT/craftbukkit from ~GENAZT/craftbukkit:bugfix/SPIGOT-93 to master
* commit '7371301edb1c44ab9153e1fba3722ba2f4e3c411':
  Forgot that i work in Bukkit... Screw sun conventions
  Implementation for the new rotation values. Fixes SPIGOT-93
2014-12-02 13:23:46 +01:00
Thinkofdeath
733e4290d8 [Slightly breaking] setType(Id) will not longer reuse the previous data value
of the block and instead reset the the data value to the block's default
2014-12-02 12:03:02 +00:00
Thinkofdeath
b58808d54d Fix tree related crashes due to lazy BlockState updating 2014-12-02 11:51:49 +00:00
Fabian Faßbender
7371301edb Forgot that i work in Bukkit... Screw sun conventions 2014-12-02 00:20:31 +01:00
Fabian Faßbender
0d5693dec5 Implementation for the new rotation values. Fixes SPIGOT-93 2014-12-02 00:13:25 +01:00
Adam Thomas
cc9b479fe6 Fix show player 2014-11-30 20:12:54 +00:00
Thinkofdeath
22df292258 Add a somewhat hacky fix for plugins converting between book types 2014-11-30 15:06:14 +00:00
Thinkofdeath
6eb0c79271 Fix Chunk.getTileEntities() (Fixes SPIGOT-62) 2014-11-30 12:15:56 +00:00
Thinkofdeath
20207a0124 Correct the return value of getPlayerListName 2014-11-30 10:30:32 +00:00
Fabian Faßbender
b08f233fe1 Rewrite the level.dat properly. This fixes SPIGOT-46 2014-11-29 20:33:33 +01:00
Mike Primm
4692204921 SPIGOT-30: Fix restoring of WorldData when loading worlds 2014-11-29 09:34:54 -06:00
Suddenly
cce45591f6 Implement the Depth Strider enchantment for the API 2014-11-29 15:13:43 +00:00
Thinkofdeath
f498585ecc Ignore invalid blocks in ChunkSnapshots 2014-11-29 15:05:28 +00:00
Mike Primm
dd33bcf6a5 Fix chunk snapshot generation (needed for Dynmap) 2014-11-28 18:30:59 -06:00
Thinkofdeath
585a827dcd Fix setAge and related methods 2014-11-29 00:17:45 +00:00
Thinkofdeath
923b375d8e Fix missed case in CraftBlock 2014-11-29 00:14:46 +00:00
Thinkofdeath
2575b3f9c0 Remove extra color codes at the start from converted json chat 2014-11-28 19:59:41 +00:00
Thinkofdeath
24557bc2b3 Update to Minecraft 1.8
For more information please see http://www.spigotmc.org/
2014-11-28 17:16:30 +11:00
bendude56
a4805dbd77 Allow teleportation of entities on vehicles. Fixes BUKKIT-4210
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.
2014-08-17 11:49:27 -06:00
Jerom van der Sar
80e8f2ab87 Implement ability to keep items on death via plugins. Adds BUKKIT-5724
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.
2014-08-17 11:41:40 -06:00
Starbuck Johnson
3626720d53 Modify the invalid item set to permit command blocks. Fixes BUKKIT-4342
When using a "vanilla" Minecraft server using the "pick block" key on a
command block yields the invoker with a command block within their
inventory while in creative mode. Implications of the invalid items set
containing the command block also include having a "ghost" item that
cannot be placed due to it not actually existing.

This commit resolves the problem and brings Craftbukkit closer to vanilla
behaviour by removing the command block item ID, 137, from the invalid
items set.
2014-08-17 11:23:28 -06:00
myiume
4507cec090 Fix PlayerFishEvent not correctly cancelling. Fixes BUKKIT-5396
Prior to this commit cancelling the PlayerFishEvent would cause various
states of the fishing routine to be incorrectly or wrongly fired. This
incorrect behaviour was due to the miscommunication between the server and
client regarding the fishing state. When the event was cancelled, the
bobber entity was removed and caused the client to incorrectly determine
what the "next state" was to logically be.

This commit resolves the issue by ensuring the client is made aware of the
correct changes at the correct time regarding the bobber entity, therefore
keeping the logical steps of "fishing" proper and in-tact.
2014-08-17 00:17:02 -06:00
Wesley Wolfe
b3e83b00fc Implement deprecated methods. Adds BUKKIT-5752 2014-08-07 19:35:16 -05:00
Wesley Wolfe
1f0c791444 Use sensible AssertionError instead of ambiguous RuntimeException 2014-08-07 19:29:35 -05:00
ase34
87f6fa7bc9 Fix cancelling PlayerDropItemEvent. Fixes BUKKIT-3313
Up until this commit the PlayerDropItemEvent, if cancelled, would return
items to the first available slot in the inventory - which is clearly
undesirable as a player and plugin author to deal with.

This commit changes that by ensuring that the item is returned to where
it came from in the player's inventory. This still supports modifying the
drop from the player and will default to "first available slot" if the
item has changed since the event was fired. Other remaining behaviour of
the event is still in tact and has not been modified.
2014-08-04 12:27:50 -06:00
feildmaster
971329c42b Fix removal of items from Item Frames. Fixes BUKKIT-5736 2014-08-02 16:12:03 -05:00
Travis Watkins
594d7cb8c9 Don't confuse client with sound coordinates outside view distance. 2014-07-15 21:28:10 -05:00
Wesley Wolfe
c7398b9fdf Provide modifier functions to EntityDamageEvent. Fixes BUKKIT-5688 2014-07-13 00:07:38 -05:00
Travis Watkins
319a9c20eb Handle uniform block ids greater than 127. Fixes BUKKIT-5686 2014-07-10 19:19:48 -05:00
Travis Watkins
13482ac7f6 Put damage modifiers in Functions for event. Fixes BUKKIT-5681 2014-07-09 18:21:59 -05:00
Travis Watkins
dbb5e6e3cd Update CraftBukkit to Minecraft 1.7.10 2014-07-08 14:31:10 -05:00
Wesley Wolfe
a8628fd645 Use 4787c23dce0f5ac856d8d398225828971a93a3ff Guava patch for onlinePlayers
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.
2014-07-01 00:48:07 -05:00
Wesley Wolfe
b602b5efa4 Implement new getOnlinePlayers. Adds BUKKIt-5668 2014-06-25 15:59:58 -05:00
t00thpick1
83e934b3bd [Bleeding] Fix checks for non-living entities. Fixes BUKKIT-5667 2014-06-24 18:24:29 -05:00
t00thpick1
9099e48e74 [Bleeding] Ignore damage done by LivingEntity.damage(). Fixes BUKKIT-5666
This matches behavior previous to new damage event API of not throwing
events for plugin-triggered damage.
2014-06-23 16:42:31 -05:00
Travis Watkins
6364f59ac4 Use compact memory format for uniform chunk section data.
Many chunk sections contain parts of their data that are the same for
every block they contain. In these cases we can save memory by saving
a single value instead of an array of 4096 copies of that value. Block light
and block data are most likely to be uniform followed closely by sky light
data. Block ids are far less likely to be uniform but give the largest
saving when they are. Because of this we use a compact format for every
part of the chunk. Memory saved from this technique will vary based on the
world but seems to be about 50% on normal Minecraft generated chunks.
2014-06-23 16:24:39 -05:00
t00thpick1
5adbab524d [Bleeding] Set projectile source for reflected fireballs. Fixes BUKKIT-5661 2014-06-22 16:52:52 -05:00
t00thpick1
6f21d3ca8f [Bleeding] Implement new damage api. Fixes BUKKIT-5326, BUKKIT-3878.
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.
2014-06-22 15:23:16 -05:00
t00thpick1
bed3f7f8f5 [Bleeding] Repair missing diff in Explosion. Fixes BUKKIT-5662
The blast protection enchantment dampers explosions, however
the functionality was only added to block explosions, and not
entity explosions.
2014-06-22 15:23:15 -05:00
Travis Watkins
5b9950b5f7 Avoid checking for loaded chunks for lighting and entity ticking.
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.
2014-06-21 21:12:46 -05:00
Travis Watkins
ea126f98ad Don't check unload queue before ticking things anymore.
In commits 71a238ee and c8591397 we added checks while ticking to ensure
we never ticked anything in a chunk meant to be unloaded. We did this to
prevent these chunks being removed from the unload queue and leaked.
However, this causes a ridiculously large number of lookups on the queue
for a somewhat rare occurance. We also now have the chunk GC which will
take care of these leaked chunks when they do happen. With this in mind
we now remove these checks which removes almost all uses of the
LongHashSet backing the unload queue.
2014-06-21 21:03:00 -05:00
bloodshot
1b48298d25 Add special case for handling place event with lilies. Fixes BUKKIT-5641 2014-06-01 00:23:06 -05:00
Travis Watkins
1c13d076af Improve ItemStack filtering. 2014-06-01 00:23:06 -05:00
Nate Mortensen
47b57e6bcf Some assumptions are better than others. 2014-06-01 00:22:58 -05:00
Daniel Naylor
0a45c3ebf7 Use UUIDs in CraftPlayer equals and hashCode methods. Fixes BUKKIT-5634 2014-05-26 19:45:07 -05:00
Travis Watkins
38fbe60d46 Handle null targets in target event. Fixes BUKKIT-5635 2014-05-26 19:34:45 -05:00
Nate Mortensen
3fbf4d3b5f Fix ItemStack state during BlockPlaceEvent. Fixes BUKKIT-5632 2014-05-26 17:54:51 -06:00
Travis Watkins
e080bafa58 Rework mob item dropping on death. Fixes BUKKIT-5625
After the changes in d611cff2 we started including a mob's equipment when
calling EntityDeathEvent so plugins can access this data. However, the
changes to enable this triggered a bug that makes skeletons and pig zombies
no longer drop equipment because they handle this differently than the rest.
On top of this we don't handle dropping equipment for mobs that cannot
pick up items in vanilla even though vanilla does drop equipment for them
if you summon them with it. We also do not include a horse's inventory
in the event so they drop their saddle, armor, chest, and chest contents
with no way for a plugin to control this.

To solve this issues we revert mob item dropping back to vanilla logic
and instead just capture all their drops in the method they all call to
spawn them into the world. We also move horse inventory dropping so it
happens at a time when we're capturing these drops. With these changes
all items mobs drop on death should now be included in the event and
we have less diff to worry about for future updates.
2014-05-26 18:42:47 -05:00
Wesley Wolfe
4ab4fa5bb1 Fix polarity of Bat.isAwake() and Bat.setAwake(boolean). Fixes BUKKIT-5624 2014-05-20 03:18:26 -05:00
Travis Watkins
89d5265da6 Ensure we always log commands and log the right thing.
Waiting to log until after PlayerCommandPreprocessEvent makes the server
not log anything if the event is cancelled. It also makes the server log
what a plugin changed the command to instead of what the player actually
tried to run. As the point of the log is to have a record of every command
a player attempts to run these are both not desirable.
2014-05-14 14:28:52 -05:00
Wesley Wolfe
fa1b6ba834 Update CraftBukkit to use new YamlConfiguration encoding changes 2014-05-14 05:49:04 -05:00
Wesley Wolfe
8daacb9017 Implement awake flag for bats. Adds BUKKIT-5606 2014-05-13 20:38:42 -05:00
Wesley Wolfe
730a62c96a Handle chat packets correctly 2014-05-13 20:13:16 -05:00
Travis Watkins
65a6e97785 Handle inventory max stack sizes even better. Fixes BUKKIT-5595
In 7e37cf96 we modified the container logic to handle custom max stack
sizes better and ensure the client stays in sync with this scenario. This
had the effect of sending an extra set slot packet for every inventory
click a player did which was not wanted. These extra packets also cause the
client to recalculate recipes which breaks the result slot for custom
recipes. To avoid the extra packets in general we now only send them if the
max stack is not the one we started with. In the case of a setting a custom
max stack size on a workbench this is still not enough so we also now send
another extra packet to make sure the result slot is always correct.
2014-05-13 00:01:23 -05:00
Travis Watkins
5610337b4f Only set skull profile if it is a player skull. Fixes BUKKIT-5605 2014-05-12 23:22:04 -05:00
Travis Watkins
690a908b97 Avoid using the user cache in skull meta.
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.
2014-05-03 17:49:59 -05:00
GJ
33e472229e [Bleeding] Fix stack overflow with Ender Crystals. Fixes BUKKIT-5583 2014-05-03 10:59:32 -05:00
eueln
2bf22a9c49 Implement inventory creation by type and title. Fixes BUKKIT-4045
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.
2014-04-30 22:50:58 -06:00
GJ
c3e4767a79 [Bleeding] Recheck persistence for chicken jockeys each tick. Fixes BUKKIT-5577 2014-04-29 17:29:07 -06:00
GJ
5195513866 [Bleeding] Include equipment in EntityDeathEvent loot. Fixes BUKKIT-5566 2014-04-29 17:28:47 -06:00
GJ
76e6277175 [Bleeding] Allow generation of cocoa trees. 2014-04-28 10:18:55 -04:00
GJ
d91ee7d7ab [Bleeding] Correct issues with MEGA_REDWOOD trees. Fixes BUKKIT-5568
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.
2014-04-28 09:49:33 -04:00
bloodshot
576758bc55 Refactored BlockPlaceEvent and BlockChangeDelegate. Adds BUKKIT-5558
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.
2014-04-23 21:25:55 -06:00
Travis Watkins
de97b62b89 Don't limit anvil stack size.
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.
2014-04-23 20:48:37 -05:00
Travis Watkins
5dfb74032c Handle inventory max stack sizes better. Fixes BUKKIT-5564
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.
2014-04-23 20:48:32 -05:00
Yariv Livay
c99de378c6 Faux sleepers wake up normally. Fixes BUKKIT-3667 2014-04-18 13:24:28 -05:00
Andre LeBlanc
5d24f2b9c0 Make AnvilInventory.getItem() use both containers. Fixes BUKKIT-2788
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.
2014-04-18 13:21:21 -05:00
Andre LeBlanc
47367210f3 Allow plugins to enchant normally unenchantable items. Adds BUKKIT-1849
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.
2014-04-18 13:13:01 -05:00
PaulBGD
941650b9b2 Fix setting entity's target. Fixes BUKKIT-1358
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.
2014-04-18 12:55:07 -05:00
bloodshot
4c9bf34bf3 Update client stack when block place is cancelled. Fixes BUKKIT-5284
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.
2014-04-18 12:52:13 -05:00
bloodshot
5c115116ef Update chest animation after cancelling open event. Fixes BUKKIT-1440
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.
2014-04-18 12:47:32 -05:00
Devin Ryan
d0be633ed9 Catch exceptions when abandoning conversions. Fixes BUKKIT-5436
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.
2014-04-18 12:33:56 -05:00
Des Herriott
8a6ed3a88b Check that item in hand is not null after book event. Fixes BUKKIT-5443 2014-04-18 12:30:53 -05:00
Brokkonaut
a86bc7aeb3 Call event when boat is destroyed by falling. Fixes BUKKIT-5500 2014-04-18 12:25:41 -05:00
Brokkonaut
0092460086 Removing broken chunk caching from World. Fixes BUKKIT-5425
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.
2014-04-18 12:17:48 -05:00
GJ
890a4af12f [Bleeding] Call EntityTargetEvent in many new places.
Adds BUKKIT-5388, BUKKIT-5387, BUKKIT-5386, BUKKIT-5483, BUKKIT-5484.
Fixes BUKKIT-5389.
2014-04-18 10:43:06 -05:00
GJ
3abba82315 Add files from mc-dev for diff visibility. 2014-04-18 10:42:54 -05:00
GJ
7df7778ccb [Bleeding] Call BlockRedstoneEvent for all rails. Adds BUKKIT-4080
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.
2014-04-18 10:29:07 -05:00
GJ
610c58c733 Add BlockPoweredRail.java from mc-dev for diff visibility. 2014-04-18 10:28:58 -05:00
GJ
730adbbf42 [Bleeding] Don't allow null display names. Fixes BUKKIT-5254
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.
2014-04-18 10:21:33 -05:00
GJ
2a2cdd4885 [Bleeding] Ice in the nether fades to air. Fixes BUKKIT-5373
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.
2014-04-18 10:18:52 -05:00
GJ
0a179711aa [Bleeding] Fix some inventories not using maxStack. Fixes BUKKIT-2883
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.
2014-04-18 10:11:23 -05:00
GJ
a4fe7cd3c4 [Bleeding] Return correct player SlotType. Fixes BUKKIT-3188
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.
2014-04-18 10:01:31 -05:00
GJ
9c251595d4 [Bleeding] Return correct furnace SlotType. Fixes BUKKIT-5400
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.
2014-04-18 10:01:24 -05:00
GJ
ec41228fb5 [Bleeding] Ensure skeletons spawn with equipment. Fixes BUKKIT-2836
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.
2014-04-18 09:52:04 -05:00
GJ
81e560621f [Bleeding] Add all blocks needed to PortalCreateEvent. Fixes BUKKIT-5464
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.
2014-04-18 09:42:02 -05:00
GJ
729df1a734 [Bleeding] Add many missing SpawnReasons.
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.
2014-04-18 09:34:08 -05:00
GJ
b6831792ec Add files from mc-dev for diff visibility. 2014-04-18 09:28:18 -05:00
GJ
d4fe10394a [Bleeding] Add many missing event calls. 2014-04-18 09:01:11 -05:00
GJ
286c71329d Add BlockTallPlant.java from mc-dev for diff visibility. 2014-04-18 09:01:04 -05:00
GJ
eb43d0637c [Bleeding] Add missing HangingBreakEvent. Fixes BUKKIT-3943
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.
2014-04-18 08:45:35 -05:00
Travis Watkins
a81f26716d Handle profiles in SkullMeta, they don't store a string anymore. 2014-04-17 14:09:53 -05:00
Nate Mortensen
7e54acc8bd Update CraftBukkit to Minecraft 1.7.9 2014-04-17 13:44:03 -05:00
Travis Watkins
98555224aa Handle expired bans correctly. Fixes BUKKIT-5541 2014-04-17 11:03:51 -05:00
Travis Watkins
3e911dba54 Make bans pretend to use names like before 1.7.8.
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.
2014-04-17 10:45:10 -05:00
Travis Watkins
a8d5c1224f Make skulls pretend to only use names like before 1.7.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.
2014-04-17 08:41:29 -05:00
Travis Watkins
6ad36f09e5 Fix getting white list, ban list, and op list. Fixes BUKKIT-5538
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.
2014-04-17 03:31:49 -05:00
Travis Watkins
5cbbcae9a9 Import files from mc-dev for diff visibility 2014-04-17 03:17:55 -05:00
t00thpick1
dc194a97bb [Bleeding] Re-add missed diff in 1.7.5 update. Fixes BUKKIT-5536
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.
2014-04-17 02:17:25 -05:00
Travis Watkins
fc39b27d7c Don't do a lookup for obviously invalid usernames 2014-04-17 01:57:35 -05:00
Travis Watkins
5557856144 Add methods to use arbitrary entries in scoreboards. Adds BUKKIT-3977 2014-04-13 23:21:36 -05:00
Travis Watkins
3dcf159ec1 Fix missed diff and other small things 2014-04-13 04:29:21 -05:00
Travis Watkins
d82e34da59 Use world-container when finding players to convert. Fixes BUKKIT-5530 2014-04-13 00:13:42 -05:00
Travis Watkins
b689cfa83a Check actual whitelist for CraftOfflinePlayer too 2014-04-12 07:45:32 -05:00