Commit graph

1329 commits

Author SHA1 Message Date
CraftBukkit/Spigot
68620f46d3 Clarify exception message for bad hanging location. Fixes BUKKIT-4824
This change adds the location and a more specific message to the
IllegalArgumentException that gets thrown when a hanging entity is being
spawned in a location that it cannot survive.

By: Wesley Wolfe <weswolf@aol.com>
2013-10-05 13:21:15 -05:00
CraftBukkit/Spigot
46b65df5ae Update CraftBukkit to 1.6.4
By: feildmaster <admin@feildmaster.com>
2013-09-19 13:25:08 -05:00
CraftBukkit/Spigot
278aee6f0d Updated version to 1.6.2-R1.1-SNAPSHOT for development towards next release.
By: EvilSeph <evilseph@gmail.com>
2013-09-11 00:54:59 -04:00
CraftBukkit/Spigot
63fb8c8635 Updated version to 1.6.2-R1.0 in pom.xml for RB.
By: EvilSeph <evilseph@gmail.com>
2013-09-10 22:47:04 -04:00
CraftBukkit/Spigot
36da362790 Update for 1.6.2_01 renames.
By: EvilSeph <evilseph@gmail.com>
2013-09-10 22:46:40 -04:00
CraftBukkit/Spigot
cb0c007ec3 Fix villager death sound
By: feildmaster <admin@feildmaster.com>
2013-09-10 21:51:26 -05:00
CraftBukkit/Spigot
7dc16db513 Add missing villager sounds. Addresses BUKKIT-4756
By: feildmaster <admin@feildmaster.com>
2013-09-10 21:29:58 -05:00
CraftBukkit/Spigot
6a8d0de50c Provide a tab completion handler for JLine. Adds BUKKIT-4168
By: Phillip Schichtel <quick_wango@code-infection.de>
2013-08-17 18:49:27 -06:00
CraftBukkit/Spigot
84e8935a22 Add support for custom Hopper inventories. Fixes BUKKIT-4722
Opening a hopper inventory created by Server.createInventory will
currently have no effect as proper handling code is missing in
CraftEntityHuman for hopper inventories that aren't associated with a tile
entity or minecart. Initialization logic for hoppers is also missing from
CraftContainer, which is necessary for the opening of custom hopper
inventories.

This commit fixes the two aforementioned by adding proper handling to
CraftHumanEntity for opening inventories not associated with a tile
entity, and by adding initialization logic for hoppers to CraftContainer.

By: FrozenBrain <carstenbamsti@googlemail.com>
2013-08-27 00:04:48 +02:00
CraftBukkit/Spigot
441c36767b Update and add new sound mappings. Fixes BUKKIT-4756
By: feildmaster <admin@feildmaster.com>
2013-09-10 20:00:26 -05:00
CraftBukkit/Spigot
35ef74ad46 Add source encoding to the maven compiler plugin.
This change adds the source encoding to the maven compiler plugin, which
will strictly enforce build consistency on multiple platforms and address
possible compilation issues on some of the source files. The source
encoding unintuitively is system-specified by default.

By: Wesley Wolfe <weswolf@aol.com>
2013-08-28 00:51:55 -05:00
CraftBukkit/Spigot
9680b8dcdb Return correct hasLineOfSight value for players. Fixes BUKKIT-4634
Prior to this change when a plugin called Player.hasLineOfSite() the
method would always return false because EntityHuman does not extend
EntityInsentient. This commit changes that by explicitly checking for
line of sight between two entities and returning that value.

By: Roger Baumgartner <rogermarcbaumgartner@hotmail.com>
2013-08-17 16:13:31 +02:00
CraftBukkit/Spigot
2436b7abb8 Make ItemFactoryTest.java platform agnostic. Fixes BUKKIT-4695
Maven paths that include spaces (and possible other characters) get
improperly translated when using a file handle from a URL. This changes
the unit test to open a stream directly from the URL, providing proper
file resolution on multiple platforms.

By: Wesley Wolfe <weswolf@aol.com>
2013-08-14 02:31:18 -05:00
CraftBukkit/Spigot
78dfcd38b3 Return instance of CraftInventoryBeacon for Beacons. Fixes BUKKIT-4521
By: T00thpick1 <t00thpick1dirko@gmail.com>
2013-07-18 18:37:20 -04:00
CraftBukkit/Spigot
71ba627b21 Fix missed diff for chat packets. Fixes BUKKIT-4666
This commit removes chat wrapping. It is no longer needed, as clients
properly render lines with line breaks.

This commit also changes an outgoing chat message to use the vanilla
behavior for indicating a client cannot chat with commands-only setting.

By: Wesley Wolfe <weswolf@aol.com>
2013-08-07 04:05:56 -05:00
CraftBukkit/Spigot
3d604166e8 Wrap plugin.getDefaultWorldGenerator in try-catch. Fixes BUKKIT-4116
If a plugin generates an exception when returning a world generator, the
server will crash. This change adds a try-catch block to keep the server
from crashing on plugin defined world generators.

By: riking <rikingcoding@gmail.com>
2013-04-18 17:50:05 -07:00
CraftBukkit/Spigot
a5280f8caa Fix javac workaround in ItemStackTest
By: Wesley Wolfe <weswolf@aol.com>
2013-08-06 20:09:42 -05:00
CraftBukkit/Spigot
cb196c424a Add BukkitObjectIOStream tests on top of ItemMeta tests
By: Wesley Wolfe <weswolf@aol.com>
2013-05-19 01:17:32 -05:00
CraftBukkit/Spigot
33c7445582 Validate title for custom inventories. Fixes BUKKIT-4616, BUKKIT-4663
Custom inventories currently do not validate the titles provided. Null values
cause NPEs when writing packets. Values longer than 32 characters
disconnect clients.

This change throws and IllegalArgumentException for null titles or titles
longer than 32 characters.

By: Wesley Wolfe <weswolf@aol.com>
2013-08-06 17:11:30 -05:00
CraftBukkit/Spigot
6f3af92b3d Updated version to 1.6.2-R0.2-SNAPSHOT for development towards next release.
By: EvilSeph <evilseph@gmail.com>
2013-08-04 00:44:27 -04:00
CraftBukkit/Spigot
dd04730e8b Updated version to 1.6.2-R0.1 in pom.xml for Beta.
By: EvilSeph <evilseph@gmail.com>
2013-08-03 19:59:29 -04:00
CraftBukkit/Spigot
7ff6d4cf4c Fix off by 1 error for spawn protection. Fixes BUKKIT-4154
By: Jonatan Noponen <jonatan.noponen@gmail.com>
2013-07-31 19:43:10 +03:00
CraftBukkit/Spigot
ed3c404bc3 Fix mistranslation in isPlayerCreated() for IronGolems. Fixes BUKKIT-4543
By: Kai Dederichs <kai.dederichs@gmx.de>
2013-07-13 11:56:59 +02:00
CraftBukkit/Spigot
4cd10145c5 Implement Leash API. Adds BUKKIT-4459, BUKKIT-4583
By: T00thpick1 <t00thpick1dirko@gmail.com>
2013-07-31 17:35:16 -04:00
CraftBukkit/Spigot
cdb0ea7069 Ignore null sound by contract. Fixes BUKKIT-4641
By: Wesley Wolfe <weswolf@aol.com>
2013-08-02 20:05:22 -05:00
CraftBukkit/Spigot
249638ac01 Indicate help is a command. Fixes BUKKIT-4642
By: Wesley Wolfe <weswolf@aol.com>
2013-08-02 19:04:39 -05:00
CraftBukkit/Spigot
1e6a141afb Add raw sound string playSound method. Adds BUKKIT-2443
A method has been added to Player which allows the server to send a sound string to the client. Assuming the client has the specified sound, it will be played. This is needed by the implementation of the /playsound command.

By: h31ix <zero_gravity@outlook.com>
2013-07-19 15:21:50 -04:00
CraftBukkit/Spigot
a933d3f370 Fix NBT token for attribute names. Addresses BUKKIT-4483
By: Wesley Wolfe <weswolf@aol.com>
2013-07-28 14:15:52 -05:00
CraftBukkit/Spigot
59bb6e9030 Store item attributes. Addresses BUKKIT-4523
By: Wesley Wolfe <weswolf@aol.com>
2013-07-23 23:25:04 -05:00
CraftBukkit/Spigot
4af51c2ffb Add API to control scaled health. Adds BUKKIT-4590
This commit implements the ability to set the scale of hearts that the
client renders.  When the Packet44UpdateAttributes packet is sent, the
max health attribute is replaced with a scaled version, to preserve the
scaled health illusion clientside.

In order to accurately display the scaled health for players, a true
health is stored within CraftPlayer, and the datawatcher now stores the
scaled health. The getHealth() method for players still returns their
true health.

Changed setHealth() within EntityLiving to appropriately handle health
for instances of EntityPlayer. Inlined a call to
setHealth(getMaxHealth()) within the EntityLiving constructor to work
around CraftEntity instantiation.

Additionally fixes the health values sent when eating food within
FoodMetaData and ItemFood, which previously sent the unscaled health;
this commit alters them to send the properly scaled health.

Additionally fixes BUKKIT-4535, BUKKIT-4536, and BUKKIT-4127

By: T00thpick1 <t00thpick1dirko@gmail.com>
2013-07-23 21:30:38 -05:00
CraftBukkit/Spigot
701de44fd3 Use ambient setting of potion effects. Fixes BUKKIT-4357 and BUKKIT-3653
This changes livingEntity.addPotionEffect(PotionEffect, boolean) to
construct the MobEffect using the constructor that includes the ambient
setting as supplied by the PotionEffect

This also changes livingEntity.getActivePotionEffects() to construct the
PotionEffects using the ambient setting supplied by the MobEffects.

By: Jim Bilbrey <jb_aero@verizon.net>
2013-06-19 05:38:05 -04:00
CraftBukkit/Spigot
5bd02e83f2 Return inGround when checking Arrow's OnGround state. Fixes BUKKIT-4439
By: EvilSeph <evilseph@gmail.com>
2013-07-10 20:25:34 -04:00
CraftBukkit/Spigot
0bd50eb9fb Missed a mention of Java 5. We build for Java 6, as per the Minecraft spec.
By: EvilSeph <evilseph@gmail.com>
2013-07-10 19:32:31 -04:00
CraftBukkit/Spigot
8524394d06 Implement Horse API. Adds BUKKIT-4424
API has been added to interface with Horses and to modify their inventories. Horse entities will now be recognized with the type EntityType.HORSE, and will no longer be UNKNOWN.

HorseJumpEvent, EntityDamageEvent, and EntityTameEvent are all correctly fired for horses.

This commit fixes BUKKIT-4393.

By: h31ix <zero_gravity@outlook.com>
2013-07-10 11:58:18 -04:00
CraftBukkit/Spigot
69a37fc533 Update CraftBukkit to 1.6.2
By: mbax <matt@phozop.net>
2013-07-08 19:43:37 -04:00
CraftBukkit/Spigot
e05150ef39 Improve maps.yml. Fixes BUKKIT-4419
Additionally fixed Minecart's interface to map INVALID methods.

By: Wesley Wolfe <weswolf@aol.com>
2013-07-03 03:48:53 -05:00
CraftBukkit/Spigot
6addfb0dff Properly clear attributes on remove and death. Fixes BUKKIT-4416
By: EvilSeph <evilseph@gmail.com>
2013-07-03 00:23:34 -04:00
CraftBukkit/Spigot
48a3e72018 Fix scaling for player health. Fixes BUKKIT-4431
By: Wesley Wolfe <weswolf@aol.com>
2013-07-02 23:08:55 -05:00
CraftBukkit/Spigot
92b386ce0b Minecraft spec has changed and we're required to follow. We now build with Java 6.
By: EvilSeph <evilseph@gmail.com>
2013-07-02 23:45:59 -04:00
CraftBukkit/Spigot
4c2d673bd3 Rework max health values. Fixes BUKKIT-4398
By: Wesley Wolfe <weswolf@aol.com>
2013-07-02 12:34:40 -05:00
CraftBukkit/Spigot
a578800a63 Update CraftBukkit to 1.6.1
By: Nate Mortensen <nate.richard.mortensen@gmail.com>
2013-07-01 06:03:00 -05:00
CraftBukkit/Spigot
ac0fa66985 Updated version to 1.5.2-R1.1-SNAPSHOT for development towards next release.
By: EvilSeph <evilseph@gmail.com>
2013-06-14 22:25:24 -04:00
CraftBukkit/Spigot
2dd751468d Updated version to 1.5.2-R1.0 in pom.xml for RB.
By: EvilSeph <evilseph@gmail.com>
2013-06-14 21:54:39 -04:00
CraftBukkit/Spigot
7ddeb4b6df Implement PlayerBookEditEvent. Adds BUKKIT-1995
By: Des Herriott <des.herriott@gmail.com>
2013-01-18 08:56:12 +00:00
CraftBukkit/Spigot
c992bf7959 Update blaze breathe sound. Fixes BUKKIT-4286
By: mbax <matt@phozop.net>
2013-05-30 11:21:16 -04:00
CraftBukkit/Spigot
a0ebc46ebe Updated version to 1.5.2-R0.2-SNAPSHOT for development towards next release.
By: EvilSeph <evilseph@gmail.com>
2013-05-03 18:39:32 -04:00
CraftBukkit/Spigot
6fb0fe529b Updated version to 1.5.2-R0.1 in pom.xml for BETA.
By: EvilSeph <evilseph@gmail.com>
2013-05-03 17:42:59 -04:00
CraftBukkit/Spigot
a42841c9bc Send block updates even when applyPhysics is false. Fixes BUKKIT-3971
The CraftBlock class is setting bit 0x4 of the update flag when bit 0x2
should in fact be set here. Bit 0x2 means "do updates"; bit 0x4 means
"don't do updates if the world is static, even when bit 0x2 is set".

By: Des Herriott <des.herriott@gmail.com>
2013-04-29 08:46:31 +01:00
CraftBukkit/Spigot
5049a112ad Improve InventoryCloseEvent handling. Fixes BUKKIT-3286
Currently there are several cases where a player will have their inventory
screen closed client side but we will not call an event. To correct this
we call the event when the server is the cause of the inventory closing
instead of just when the client is the cause. We also ensure the server is
closing the inventory reliably so we get the events. Additionally this
commit also calls the event when a player disconnects which will handle
kicks, quits, and server shutdown.

By: Travis Watkins <amaranth@ubuntu.com>
2013-05-02 06:05:54 -05:00
CraftBukkit/Spigot
c33c52d7a2 Move world generator warning to CraftBukkit. Fixes BUKKIT-2565
By: Score_Under <seejay.11@gmail.com>
2013-03-21 17:50:58 +00:00
CraftBukkit/Spigot
9fdae1c35b Update CraftBukkit to Minecraft 1.5.2
By: Travis Watkins <amaranth@ubuntu.com>
2013-04-27 04:40:05 -05:00
CraftBukkit/Spigot
f06e7acda5 Rework EntityExplodeEvent. Fixes BUKKIT-4140. Adds BUKKIT-4141
By: Wesley Wolfe <weswolf@aol.com>
2013-04-24 03:03:38 -05:00
CraftBukkit/Spigot
42fab40633 Updated version to 1.5.1-R0.3-SNAPSHOT for development towards next release.
By: EvilSeph <evilseph@gmail.com>
2013-04-13 02:58:41 -04:00
CraftBukkit/Spigot
dc92f110ad Updated version to 1.5.1-R0.2 in pom.xml for BETA.
By: EvilSeph <evilseph@gmail.com>
2013-04-13 02:47:51 -04:00
CraftBukkit/Spigot
e8b9ca83cb Check connection status before setting scoreboard. Fixes BUKKIT-4064
Two connection status checks were added to setting a scoreboard for a
player. The first checks to see if a player has logged in yet, which
implicates the ability to receive packets. The second checks to affirm
that the CraftPlayer reference is still to a logged in player; setting
it while not logged in would maintain a stale player reference in the
scoreboard manager.

By: Wesley Wolfe <weswolf@aol.com>
2013-04-12 21:31:24 -05:00
CraftBukkit/Spigot
1ec94b52c1 Use correct method for getting player's team. Fixes BUKKIT-4050
The method getTeam gets the team from name of, as opposed to getting the
team a player belongs to.

This also addresses BUKKIT-4002 and partially BUKKIT-4044

By: Wesley Wolfe <weswolf@aol.com>
2013-04-11 23:03:37 -05:00
CraftBukkit/Spigot
868456b95f Refactor EntityDamageEvents. Adds BUKKIT-1944 & BUKKIT-3684
By: feildmaster <admin@feildmaster.com>
2013-04-09 22:25:06 -05:00
CraftBukkit/Spigot
76976e4797 Make auxiliary worlds use the main scoreboard. Addresses BUKKIT-3984
When a world is created using our API, it does not use secondary world
server and will maintain a reference to its own scoreboard. In vanilla,
this is not an issue as there is only ever one world.

Similarly to maps, an overwrite to the scoreboard reference has been
added for when another world has been created.

This should also address BUKKIT-3982 and BUKKIT-3985

By: Wesley Wolfe <weswolf@aol.com>
2013-04-04 23:35:16 -05:00
CraftBukkit/Spigot
c8eaad4f3f We compile for 1.5
By: Wesley Wolfe <weswolf@aol.com>
2013-04-04 01:22:50 -05:00
CraftBukkit/Spigot
09f861ef48 Implement Scoreboard API. Adds BUKKIT-3776
This implementation facilitates the correspondence of the Bukkit Scoreboard
API to the internal minecraft implementation.

When the first scoreboard is loaded, the scoreboard manager will be created.
It uses the newly added WeakCollection for handling plugin scoreboard
references to update the respective objectives. When a scoreboard contains no
more active references, it should be garbage collected.

An active reference can be held by a still registered objective, team, and
transitively a score for a still registered objective. An internal reference
will also be kept if a player's specific scoreboard has been set, and will
remain persistent until that player logs out.

A player's specific scoreboard becomes the scoreboard used when determining
team structure for the player's attacking damage and the player's vision.

By: mbax <matt@phozop.net>
2013-03-22 17:21:33 -04:00
CraftBukkit/Spigot
27e7fa2e01 Add a WeakCollection utility class.
This class is designed to be an invisible layer between a normal collection,
and one that silently loses entries because they are only weakly referencable.
Some operations have additional overhead to be semantically correct, but it
maintains the equals contract for all entries, as opposed to identity.

It does not support the equals or hash code method as it cannot easily have
the transitive and commutative properties.

By: Wesley Wolfe <weswolf@aol.com>
2013-04-02 07:52:17 -05:00
CraftBukkit/Spigot
2807928047 Updated version to 1.5.1-R0.2-SNAPSHOT for development towards next release.
By: EvilSeph <evilseph@gmail.com>
2013-04-04 00:18:59 -04:00
CraftBukkit/Spigot
f80357d61e Updated version to 1.5.1-R0.1 in pom.xml for BETA.
By: EvilSeph <evilseph@gmail.com>
2013-04-03 22:40:36 -04:00
CraftBukkit/Spigot
aa06a5ace1 Properly return contents of Inventory. Fixes BUKKIT-3930
When an array of an inventory's contents is requested, we loop through the contents of the NMS inventory's ItemStacks in order to return Bukkit ItemStacks that can be used through the API. However, the NMS ItemStack can, in some cases, be larger than the physical size of the inventory. Using the size of the NMS array as a limit on the loop that follows can result in an ArrayIndexOutOfBoundsException because the Bukkit array's length is the actual size of the inventory, and thus will be smaller.

With this commit we use the smaller of the two arrays' length as the limit in the loop, thus eliminating the possibility that the smaller array will be asked for an index higher than its length.

By: h31ix <zero_gravity@outlook.com>
2013-03-29 22:43:05 -04:00
CraftBukkit/Spigot
94c1d44d57 Don't update physics when block place is cancelled. Fixes BUKKIT-3939
When a block placement happens we currently update physics on the
attempted placement and update again if the placement is cancelled.
To correct the first one we simply set the block without applying
physics. To correct the second we have to add a new method to
BlockState that lets us update without applying physics and use
this method method when putting the block back.

By: Travis Watkins <amaranth@ubuntu.com>
2013-03-31 19:18:42 -05:00
CraftBukkit/Spigot
b845332f14 Correct slot types for brewing stand. Fixes BUKKIT-3937
By: Travis Watkins <amaranth@ubuntu.com>
2013-03-31 18:41:36 -05:00
CraftBukkit/Spigot
2772c52bf3 Throw exception for disabled plugin tasks. Fixes BUKKIT-3951
Without this check, any non-null reference to a plugin is considered
'valid' for registering a task in the scheduler. This is obviously
unintentional behavior and has been changed to throw an
IllegalPluginAccessException. It is now consistent with the
SimplePluginManager event registration contract.

This in affect also addresses BUKKIT-3950 for uninitialized plugin
references (ones without a description).

By: Wesley Wolfe <weswolf@aol.com>
2013-03-31 15:37:17 -05:00
CraftBukkit/Spigot
cd79fecc90 Include anvil result in inventory size. Fixes BUKKIT-3741
By: Travis Watkins <amaranth@ubuntu.com>
2013-03-30 02:51:26 -05:00
CraftBukkit/Spigot
504a6af6e8 Add Beacon block state for hopper events. Fixes BUKKIT-3932
By: Travis Watkins <amaranth@ubuntu.com>
2013-03-29 22:26:27 -05:00
CraftBukkit/Spigot
f84dc2d381 Properly copy collection references in ItemMeta.clone(). Fixes BUKKIT-3913
When cloning an item, all references are copied to the new item. For
collections, this makes internal changes become visible in both the old and
new items.

In CraftMetaItem, clone was not making copies of the appropriate collections
and has been fixed for non-null values.

In CraftMetaEnchantedBook and CraftMetaPotion, clone was using possible empty
collection references and has been changed to explicitly null-check instead.

By: Wesley Wolfe <weswolf@aol.com>
2013-03-28 20:01:01 -05:00
CraftBukkit/Spigot
3c6a12547b Improve calling of ProjectileHitEvent. Fixes BUKKIT-3872
By: Andre LeBlanc <andre@norcode.com>
2013-03-23 12:16:00 -04:00
CraftBukkit/Spigot
10245ce119 Allow fishing success rate to be adjustable. Adds BUKKIT-3837
By: Andre LeBlanc <andre@norcode.com>
2013-03-20 11:48:35 -04:00
CraftBukkit/Spigot
afa8771324 Add methods to check conflicting enchantments. Adds BUKKIT-3830
By: GJ <gjmcferrin@gmail.com>
2013-03-20 01:35:22 -04:00
CraftBukkit/Spigot
56947c94a9 Cleanup comments, formatting, etc
By: Travis Watkins <amaranth@ubuntu.com>
2013-03-24 23:22:32 -05:00
CraftBukkit/Spigot
f0a4f87f80 Add ability to change player item in hand. Adds BUKKIT-3318
By: Patrick Seidel <psycowithespn1@aim.com>
2012-12-27 16:30:08 -05:00
CraftBukkit/Spigot
4f70ebc8b7 Add check for Thorns damage - Fixes BUKKIT-3505
By: riking <rikingcoding@gmail.com>
2013-03-23 19:41:33 -07:00
CraftBukkit/Spigot
329ac32171 Include ThrownPotion in spawn methods. Adds BUKKIT-2542
By: Carlos Cobo <toqueteos@gmail.com>
2013-03-23 15:28:23 +01:00
CraftBukkit/Spigot
6841600fbf Identify outside slot independent of inventory type. Fixes BUKKIT-2768
By: EdGruberman <ed@rjump.com>
2013-02-21 14:22:09 -07:00
CraftBukkit/Spigot
04d0f1b0b5 ANSI color codes now reset text attributes. Fixes BUKKIT-3508
The client resets all formatting after a color code is received, but currently the ANSI codes do not, and so the console does not accurately reflect the appearance of the formatted text. Instead, the ANSI color codes are now set to reset all text attributes.

By: James Clarke <jamesrtclarke@me.com>
2013-01-26 10:39:45 +00:00
CraftBukkit/Spigot
e76d070e9d Implement Dropper interface. Adds BUKKIT-3750
By: Xephi <xephirot59@gmail.com>
2013-03-21 13:43:10 +01:00
CraftBukkit/Spigot
0a6888a54f Stationary lava is also a LAVA ignition cause.
By: Travis Watkins <amaranth@ubuntu.com>
2013-03-21 16:59:45 -05:00
CraftBukkit/Spigot
d9c6b90716 Add ability to modify ThrownPotion properties. Adds BUKKIT-3197
By: Olof Larsson <olof@sylt.nu>
2012-12-17 09:45:30 +01:00
CraftBukkit/Spigot
f60d880814 Add method to get the source of a TNTPrimed. Adds BUKKIT-3815
By: AlphaBlend <whizkid3000@hotmail.com>
2013-03-21 12:47:46 -06:00
CraftBukkit/Spigot
7d58945ede Ignore all .DS_Store files, not just the one in the project root.
By: James Clarke <jamesrtclarke@me.com>
2013-01-26 11:06:26 +00:00
CraftBukkit/Spigot
a553ddbb0b Implement unit test for hasGravity(). Adds BUKKIT-3832
By: nitnelave <nitnelave1@gmail.com>
2013-02-15 02:38:34 +01:00
CraftBukkit/Spigot
062ad22168 Update CraftBukkit to Minecraft 1.5.1
By: Travis Watkins <amaranth@ubuntu.com>
2013-03-20 15:09:23 -05:00
CraftBukkit/Spigot
eabf3db614 BlockState for Command Blocks. Adds BUKKIT-3805.
By: Nate Mortensen <nate.richard.mortensen@gmail.com>
2013-03-18 00:32:11 -06:00
CraftBukkit/Spigot
b9af9ef239 Validate Server method input. Addresses BUKKIT-3687
CraftServer methods that implement the Server interface will throw an
IllegalArgumentException if a method cannot operate on a null input
and given a null pointer.

This causes methods to fail early and identify that a plugin is
responsible for passing in an invalid argument. This will only
change the exception thrown, if there originally was a thrown
exception. This helps with hunting down legitimate problems
with CraftBukkit.

By: Edmond Poon <sagaciouszzzz@gmail.com>
2013-03-18 23:32:10 -06:00
CraftBukkit/Spigot
2481936906 Remove point about squashing commits.
By: Warren <evilseph@gmail.com>
2013-03-18 23:49:15 -03:00
CraftBukkit/Spigot
582e158766 Add link to CONTRIBUTING.md in README
By: Kane York <rikingcoding@gmail.com>
2013-03-18 19:26:15 -07:00
CraftBukkit/Spigot
a804a206e7 Pull Contributing Guidelines and Requirements into CONTRIBUTING.md
By: EvilSeph <evilseph@gmail.com>
2013-03-18 22:09:02 -04:00
CraftBukkit/Spigot
4c1cb5c8a7 Implement per-player Weather API. Adds BUKKIT-812
By: T00thpick1 <t00thpick1dirko@gmail.com>
2012-12-20 16:51:27 -05:00
CraftBukkit/Spigot
206334875b Implement new cause versions of BlockIgniteEvent. Addresses BUKKIT-3609, BUKKIT-3656, BUKKIT-3657
By: Yariv Livay <yarivlivay@gmail.com>
2013-03-17 22:46:48 +02:00
CraftBukkit/Spigot
9262bc5393 Make CraftMinecartHopper work as InventoryHolder. Adds BUKKIT-3796
By: Michael Limiero <mike5713@gmail.com>
2013-03-17 15:50:34 -04:00
CraftBukkit/Spigot
e3356c9896 Implement Entity.isOnGround(). Adds BUKKIT-3787
By: Chad Waters <authorblues@gmail.com>
2013-03-17 11:51:11 -04:00
CraftBukkit/Spigot
2cad34e872 Use name given to command block instead of "@". Fixes BUKKIT-3803
By: Travis Watkins <amaranth@ubuntu.com>
2013-03-17 20:18:11 -05:00
CraftBukkit/Spigot
002dd2b7cd Implement Hopper block state and inventory methods. Adds BUKKIT-3749
By: Michael Limiero <mike5713@gmail.com>
2013-03-16 00:46:35 -04:00
CraftBukkit/Spigot
f48f89f433 Handle double trapped chest inventory. Fixes BUKKIT-3772
By: Travis Watkins <amaranth@ubuntu.com>
2013-03-16 17:14:21 -05:00
CraftBukkit/Spigot
639ef2bd3c Use Chest block state for trapped chests. Fixes BUKKIT-3762
By: Travis Watkins <amaranth@ubuntu.com>
2013-03-16 09:46:32 -05:00
CraftBukkit/Spigot
7e0364660a Limit mob names to 64 chars to avoid client crash. Fixes BUKKIT-3753
By: Travis Watkins <amaranth@ubuntu.com>
2013-03-16 08:31:03 -05:00
CraftBukkit/Spigot
afd0b4899b Handle the newly refactored minecarts.
By: Wesley Wolfe <weswolf@aol.com>
2013-03-15 23:09:04 -05:00
CraftBukkit/Spigot
bb2baf6ba7 Use proper naming convention for boolean methods.
By: Travis Watkins <amaranth@ubuntu.com>
2013-03-15 14:25:37 -05:00
CraftBukkit/Spigot
18164ee949 Update CraftBukkit to Minecraft 1.5
By: Travis Watkins <amaranth@ubuntu.com>
2013-03-13 17:33:27 -05:00
CraftBukkit/Spigot
0d9124396f Close inventory on teleport. FIXES BUKKIT-3021.
By: Andrzej Pomirski <andrzejp@dysleksja.pl>
2013-02-09 23:38:53 +01:00
CraftBukkit/Spigot
d748630f56 Set CraftTravelAgent.DEFAULT to a non-null value. Fixes BUKKIT-3578
Currently, CraftTravelAgent will call s() on the passed-in WorldServer in order to set DEFAULT. However, s() will always return null at this point, because WorldServer.P will still be null, as it is set after the constructor is called. Instead, we set CraftTravelAgent.DEFAULT to the instance that is being constructed.

By: James Clarke <jamesrtclarke@me.com>
2013-02-05 20:34:02 +00:00
CraftBukkit/Spigot
17edfeaed3 Use entity UUID instead of EntityID for metadata. Fixes BUKKIT-3582
The entity id is a non-unique, non-persistent value, and will cause
entities to lose their respective meta data on chunk unloading, and
teleportation.

By: feildmaster <admin@feildmaster.com>
2013-02-06 16:32:19 -06:00
CraftBukkit/Spigot
9250e88d04 Always return a TravelAgent; Fixes BUKKIT-3541
Recent changes caused PlayerPortalEvent to suddenly return null
unexpectedly and could end up in NPEs resulting that did not before.
This commit addresses that situation by always ensuring a TravelAgent
instance is returned.

The TravelAgent for world 0 is returned arbitrarily in an effort to
compensate for plugins that are implementation dependent and expect some
form of a TravelAgent to be accessible in the event at all times.

By: EdGruberman <ed@rjump.com>
2013-02-03 12:55:51 -07:00
CraftBukkit/Spigot
20ddd83f9a Fix players spawning above portals. Fixes BUKKIT-3542.
Vanilla does not check for blocks in which the player could
suffocate when changing dimension, so portals will happily spawn
players in blocks when using a portal under certain
circumstances. However, we currently check for these instances
and move the player up until they will not suffocate. This means
that players can sometimes be taken to above the target portal,
making it seem as if a portal was not created. Instead, we now
disable this suffocation check when moveToWorld is called from
changeDimension, mirroring vanilla behavior more accurately.

By: James Clarke <jamesrtclarke@me.com>
2013-02-03 00:32:07 +00:00
CraftBukkit/Spigot
4c1273e8a6 Updated version to 1.4.7-R1.1-SNAPSHOT for development towards next release.
By: EvilSeph <evilseph@gmail.com>
2013-01-30 23:44:50 -05:00
CraftBukkit/Spigot
9b6db31880 Updated version to 1.4.7-R1.0 in pom.xml for RB.
By: EvilSeph <evilseph@gmail.com>
2013-01-30 23:32:21 -05:00
CraftBukkit/Spigot
067842730b Fix NPE when getting bed spawn location.
By: feildmaster <admin@feildmaster.com>
2013-01-29 17:25:39 -06:00
CraftBukkit/Spigot
88e050668f Fix contract with Player.getBedSpawnLocation. Fixes BUKKIT-3525
Getting the bed spawn location is supposed to check if the bed is
valid, however, it currently did not do so.

By: feildmaster <admin@feildmaster.com>
2013-01-29 10:03:05 -06:00
CraftBukkit/Spigot
2c6b6e11dd Remove erroneous break statement in scheduler. Fixes BUKKIT-3395
By: Wesley Wolfe <weswolf@aol.com>
2013-01-27 23:00:14 -06:00
CraftBukkit/Spigot
552cff7d15 Update Fireballs to account for ExplosionPower. Fixes BUKKIT-3460
Adds BUKKIT-3516

By: feildmaster <admin@feildmaster.com>
2013-01-27 14:46:58 -06:00
CraftBukkit/Spigot
78e16bd8de Compensate for allow-nether/allow-end as false; Fixes BUKKIT-3466
When either of those settings are false, the worlds are not loaded and
therefore will not be targeted for portal exits.  Existing worlds are
iterated directly to avoid defaulting to the first world if a direct
dimension match is not found.

Plugins must also specify exit from custom Bukkit worlds to comply with
original commit: https://github.com/Bukkit/CraftBukkit/commit/2dc2af0

This commit introduces a constant to clarify the dependency on the
CraftBukkit implementation of custom worlds having a dimension offset.

By: EdGruberman <ed@rjump.com>
2013-01-22 18:36:03 -07:00
CraftBukkit/Spigot
2cf54ae100 Reload ban files when reloading the server. Adds BUKKIT-3470
By: feildmaster <admin@feildmaster.com>
2013-01-23 06:24:40 -06:00
CraftBukkit/Spigot
5ff31d3a44 Fix broken null contract with Jukebox.setPlaying, Fixes BUKKIT-3429
The javadocs state that a null may be used to remove the currently
playing sound, however this causes a NullPointerException.

It also doesn't process registering the record correctly, along with
processing non-valid items.

By: feildmaster <admin@feildmaster.com>
2013-01-19 00:39:56 -06:00
CraftBukkit/Spigot
a7602dc993 [Bleeding] Add experimental support for entity portal traveling
By: EdGruberman <ed@rjump.com>
2012-12-22 11:46:24 -07:00
CraftBukkit/Spigot
5948863935 Improve the item meta deserialization code-style
Fixed the ItemMetaFireworkTest

Add set power unit tests for FireworkMeta

By: Wesley Wolfe <weswolf@aol.com>
2013-01-18 02:21:38 -06:00
CraftBukkit/Spigot
41d42b7388 Updated version to 1.4.7-R0.2-SNAPSHOT for development towards next release.
By: EvilSeph <evilseph@gmail.com>
2013-01-17 05:30:48 -05:00
CraftBukkit/Spigot
beefddd3af Updated version to 1.4.7-R0.1 in pom.xml for Beta.
By: EvilSeph <evilseph@gmail.com>
2013-01-17 05:15:55 -05:00
CraftBukkit/Spigot
c529b1d5ec Update CraftBukkit to Minecraft 1.4.7
By: feildmaster <admin@feildmaster.com>
2013-01-17 03:28:44 -06:00
CraftBukkit/Spigot
58a6642ca7 Add ItemStackMapTest
This test was missing from c056293b38cb9a1296937d91746b175252be044a

By: Wesley Wolfe <weswolf@aol.com>
2013-01-15 01:22:53 -06:00
CraftBukkit/Spigot
6a7b6e848a Various ItemMeta fixes.
Fixes BUKKIT-3408, BUKKIT-3190, BUKKIT-3191, BUKKIT-3407

These changes relate mostly to semantical changes for serialization
contract, exception of changing the map scaling value from byte to boolean,
what it should have been in the first place. Appropriate unit tests were
added for CraftMapMeta, as they were missing.

By: Wesley Wolfe <weswolf@aol.com>
2013-01-09 04:45:01 -06:00
CraftBukkit/Spigot
58090423c0 Update unit test to reflect firework color fix. Fixes BUKKIT-3382
The ItemDye color-int array uses dye data values, not wool.

By: Wesley Wolfe <weswolf@aol.com>
2013-01-05 17:00:25 -06:00
CraftBukkit/Spigot
e9c52a3ffc Update calls to DyeColor getData and getByData. Addresses BUKKIT-2786
These two methods are now deprecated and replaced by the strictly
equivalent calls using wool data.

By: Wesley Wolfe <weswolf@aol.com>
2013-01-05 16:45:34 -06:00
CraftBukkit/Spigot
1e7d13dfee Fix "setSitting" on tameable animals. Fixes BUKKIT-1534
This makes it so animals (tame or not) will sit properly and not move
around.

Wild animals that are sitting may override the sitting position if
they are attacking.

By: feildmaster <admin@feildmaster.com>
2012-12-31 14:00:55 -06:00
CraftBukkit/Spigot
6e6615acfa Updated version to 1.4.6-R0.4-SNAPSHOT for development towards next release.
By: EvilSeph <evilseph@gmail.com>
2012-12-31 01:14:07 -05:00
CraftBukkit/Spigot
74d0a068bc Updated version to 1.4.6-R0.3 in pom.xml for Beta.
By: EvilSeph <evilseph@gmail.com>
2012-12-31 01:00:18 -05:00
CraftBukkit/Spigot
f6a5e7a473 Updated version to 1.4.6-R0.3-SNAPSHOT for development towards next release.
By: EvilSeph <evilseph@gmail.com>
2012-12-29 22:27:49 -05:00
CraftBukkit/Spigot
a87401e1b6 Updated version to 1.4.6-R0.2 in pom.xml for Beta.
By: EvilSeph <evilseph@gmail.com>
2012-12-29 22:19:49 -05:00
CraftBukkit/Spigot
0f73c817f9 Return the level, not ID. Fixes BUKKIT-3326
CraftItemStack was erroneously using the enchantment ID instead of level
for the return value of remove enchantment.

By: Wesley Wolfe <weswolf@aol.com>
2012-12-29 20:53:27 -06:00
CraftBukkit/Spigot
ef64b8dd33 Don't teleport entities that are considered dead. Addresses BUKKIT-1331
Teleportation should never be processed on dead entities. If you wish
to teleport an entity, do it on a living entity. If you wish to
teleport a player, set their respawn location in PlayerRespawnEvent.

By: feildmaster <admin@feildmaster.com>
2012-12-27 19:22:28 -06:00
CraftBukkit/Spigot
e895c1e420 [Bleeding] Implement periodic chunk garbage collector
This adds two settings to bukkit.yml, allowing activation and control of
two chunk garbage collection triggering conditions:
chunk-gc/period-in-ticks controls a periodic GC, run once every N ticks
(default is 600); chunk-gc/load-threshold causes the GC to run once
after every N calls to loadChunk() on a given world (this call is an API
call used by plugins, and is distinct from the path taken for routine
player movement-based loading).  In both cases, setting to zero will
disable the given GC scheduling strategy.

In either case, the act of doing the GC is simply one of scanning the
loaded chunks, seeing which are NOT being used by one or more players
(due to view-distance) and which are not already queued for unload, and
queueing them for a normal unload.  Ultimately, the unload is then
processed the same as if the chunk were unloaded due to leaving the
view-distance range of all players, so the impact on plugins should be
no different (and strategies such as handling the ChunkUnloadEvent in
order to prevent unload will still work).

The initial interval for the periodic GC is randomized on a per-world
basis, in order to avoid all world being GCed at the same time -
minimizing potential lag spikes.

By: Mike Primm <mike@primmhome.com>
2012-12-10 09:38:26 -06:00
CraftBukkit/Spigot
be291480fc Fix persistence on tamed pets. Fixes BUKKIT-3300
With the persistence api introduced, pets did not have their
persistence flag updated to reflect their persistence. This caused
tame ocelots to not persist under specific conditions.

By: feildmaster <admin@feildmaster.com>
2012-12-28 20:27:41 -06:00
CraftBukkit/Spigot
2d0ea62fb2 Fix removing enchantments causing the enchantment tag to remain.
By: feildmaster <admin@feildmaster.com>
2012-12-27 20:48:56 -06:00
CraftBukkit/Spigot
4bd54dfd92 Fix discrepancies in NBT and ItemMeta. Fixes BUKKIT-3279
An ItemStack gains the tag name "tag" when the stack is serialized
to NBT, however items don't have a tag *until* they are serialized at
least once. So to solve this, we remove the tag name when loading the
NBT data.

Another problem with NBT are TagLists, when transferring tag lists
between the server and the client the names are lost, and so we
simply don't add a name to the tag.

By: feildmaster <admin@feildmaster.com>
2012-12-27 20:45:21 -06:00
CraftBukkit/Spigot
53d28c0e26 Fix Skull BlockState setting illegal values on owner.
By: feildmaster <admin@feildmaster.com>
2012-12-24 14:32:08 -06:00
CraftBukkit/Spigot
28034e5c5c Fix fireworks being short lived. Fixes BUKKIT-3291
By: feildmaster <admin@feildmaster.com>
2012-12-23 17:06:26 -06:00
CraftBukkit/Spigot
3e4f7af5c8 Properly update fireworks. Fixes BUKKIT-3289
By: feildmaster <admin@feildmaster.com>
2012-12-23 08:59:15 -06:00
CraftBukkit/Spigot
8dcc915237 Implement entity max health methods. Adds BUKKIT-266
By: feildmaster <admin@feildmaster.com>
2012-12-23 05:49:03 -06:00
CraftBukkit/Spigot
f1cc082ee0 Report valid health when getting Entity health. Fixes BUKKIT-3210
By: feildmaster <admin@feildmaster.com>
2012-12-23 07:16:59 -06:00
CraftBukkit/Spigot
eeded7f6fd Remove runner leak on async tasks. Fixes BUKKIT-3288
In some situations, an async task could be cancelled with no tasks
pending. This means the finally {} block from run() never gets executed
properly on the last async task to have run, as it expected to be
executed again.

This fix takes the only spot that the task period is set to cancelled
and will check to see if the task should be purged from the runners
list.

By: Wesley Wolfe <weswolf@aol.com>
2012-12-23 05:13:33 -06:00
CraftBukkit/Spigot
ce8e581ffc Update firework power when modifying meta. Fixes BUKKIT-3272
By: Travis Watkins <amaranth@ubuntu.com>
2012-12-22 13:05:55 -06:00
CraftBukkit/Spigot
2c5dd716bb Allow fireworks to be created. Adds BUKKIT-3262
By: feildmaster <admin@feildmaster.com>
2012-12-22 02:57:28 -06:00
CraftBukkit/Spigot
46b51ce858 Updated version to 1.4.6-R0.2-SNAPSHOT for development towards next release.
By: EvilSeph <evilseph@gmail.com>
2012-12-22 01:24:14 -05:00
CraftBukkit/Spigot
41a65d9a91 Updated version to 1.4.6-R0.1 in pom.xml for Beta.
By: EvilSeph <evilseph@gmail.com>
2012-12-22 01:12:16 -05:00
CraftBukkit/Spigot
d21d3199b9 Implement API to get and set FireworkMeta on Firework entities
By: feildmaster <admin@feildmaster.com>
2012-12-21 23:56:54 -06:00
CraftBukkit/Spigot
01e087c5d5 Implement Skull BlockState. Adds BUKKIT-3259
By: meiskam <meiskam@gmail.com>
2012-12-21 18:44:56 -05:00
CraftBukkit/Spigot
e8a36e2744 Zero is not less than zero. Fixes BUKKIT-3259
By: Wesley Wolfe <weswolf@aol.com>
2012-12-21 21:48:09 -06:00