Commit graph

1325 commits

Author SHA1 Message Date
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