Commit graph

1351 commits

Author SHA1 Message Date
CraftBukkit/Spigot
a419776f3c Update to Minecraft 1.8
For more information please see http://www.spigotmc.org/

By: Thinkofdeath <thinkofdeath@spigotmc.org>
2014-11-26 08:32:16 +11:00
CraftBukkit/Spigot
2f44d66966 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.

By: bendude56 <bendude56@gmail.com>
2013-07-07 21:52:41 -06:00
CraftBukkit/Spigot
02fb3fd3d7 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.

By: Jerom van der Sar <jerom.sar@hotmail.com>
2014-07-31 03:05:08 +02:00
CraftBukkit/Spigot
5d8e9e97fd Implement deprecated methods. Adds BUKKIT-5752
By: Wesley Wolfe <wesley.d.wolfe+git@gmail.com>
2014-08-07 19:35:16 -05:00
CraftBukkit/Spigot
82a651c889 Use sensible AssertionError instead of ambiguous RuntimeException
By: Wesley Wolfe <wesley.d.wolfe+git@gmail.com>
2014-08-07 19:29:28 -05:00
CraftBukkit/Spigot
9bf675b0b6 Fix removal of items from Item Frames. Fixes BUKKIT-5736
By: feildmaster <admin@feildmaster.com>
2014-08-02 16:03:50 -05:00
CraftBukkit/Spigot
38f3f4a701 Provide modifier functions to EntityDamageEvent. Fixes BUKKIT-5688
By: Wesley Wolfe <wesley.d.wolfe+git@gmail.com>
2014-07-13 00:04:32 -05:00
CraftBukkit/Spigot
dfb55a6fe4 Put damage modifiers in Functions for event. Fixes BUKKIT-5681
By: Travis Watkins <amaranth@ubuntu.com>
2014-07-09 16:21:06 -05:00
CraftBukkit/Spigot
79e5718f39 Update CraftBukkit to Minecraft 1.7.10
By: Travis Watkins <amaranth@ubuntu.com>
2014-06-26 13:05:08 -05:00
CraftBukkit/Spigot
645fe18f1f 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.

By: Wesley Wolfe <wesley.d.wolfe+git@gmail.com>
2014-07-01 00:47:39 -05:00
CraftBukkit/Spigot
03a390e010 Implement new getOnlinePlayers. Adds BUKKIt-5668
By: Wesley Wolfe <wesley.d.wolfe+git@gmail.com>
2014-06-24 16:11:25 -05:00
CraftBukkit/Spigot
de522b136d [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.

By: t00thpick1 <t00thpick1dirko@gmail.com>
2014-06-22 22:54:05 -04:00
CraftBukkit/Spigot
50c4b76dfa [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.

By: t00thpick1 <t00thpick1dirko@gmail.com>
2014-06-19 14:38:45 -04:00
CraftBukkit/Spigot
520077f254 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.

By: Travis Watkins <amaranth@ubuntu.com>
2014-06-16 19:01:55 -05:00
CraftBukkit/Spigot
3e6636e2b6 Updated version to 1.7.9-R0.3-SNAPSHOT for development towards next release.
By: EvilSeph <evilseph@gmail.com>
2014-06-01 02:36:02 -04:00
CraftBukkit/Spigot
c0343ab5ea Updated version to 1.7.9-R0.2 in pom.xml for Beta.
By: EvilSeph <evilseph@gmail.com>
2014-06-01 01:45:55 -04:00
CraftBukkit/Spigot
151f12627a Use UUIDs in CraftPlayer equals and hashCode methods. Fixes BUKKIT-5634
By: Daniel Naylor <git@drnaylor.co.uk>
2014-05-26 20:33:10 +01:00
CraftBukkit/Spigot
93b3b6a162 Fix polarity of Bat.isAwake() and Bat.setAwake(boolean). Fixes BUKKIT-5624
By: Wesley Wolfe <wesley.d.wolfe+git@gmail.com>
2014-05-20 03:13:35 -05:00
CraftBukkit/Spigot
40a99f5a97 Updated version to 1.7.9-R0.2-SNAPSHOT for development towards next release.
By: EvilSeph <evilseph@gmail.com>
2014-05-14 23:38:50 -04:00
CraftBukkit/Spigot
f0b0b92c39 Updated version to 1.7.9-R0.1 in pom.xml for Beta.
By: EvilSeph <evilseph@gmail.com>
2014-05-14 22:40:51 -04:00
CraftBukkit/Spigot
82a09cfb9f Update CraftBukkit to use new YamlConfiguration encoding changes
By: Wesley Wolfe <wesley.d.wolfe+git@gmail.com>
2014-05-14 05:49:04 -05:00
CraftBukkit/Spigot
f9d2ead6bf Implement awake flag for bats. Adds BUKKIT-5606
By: Wesley Wolfe <wesley.d.wolfe+git@gmail.com>
2014-05-13 20:38:42 -05:00
CraftBukkit/Spigot
5b252941b0 Only set skull profile if it is a player skull. Fixes BUKKIT-5605
By: Travis Watkins <amaranth@ubuntu.com>
2014-05-12 23:19:22 -05:00
CraftBukkit/Spigot
1a9f318959 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.

By: Travis Watkins <amaranth@ubuntu.com>
2014-05-03 17:42:19 -05:00
CraftBukkit/Spigot
0640242e43 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.

By: eueln <euelnd@gmail.com>
2013-04-11 14:20:41 -05:00
CraftBukkit/Spigot
f25a347ccd [Bleeding] Allow generation of cocoa trees.
By: GJ <gjmcferrin@gmail.com>
2014-04-28 10:18:55 -04:00
CraftBukkit/Spigot
56003af2f2 [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.

By: GJ <gjmcferrin@gmail.com>
2014-04-28 09:49:33 -04:00
CraftBukkit/Spigot
741ad9885f 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.

By: bloodshot <jdroque@gmail.com>
2014-01-06 00:17:16 -05:00
CraftBukkit/Spigot
5c9c366ee5 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.

By: Andre LeBlanc <andre@norcode.com>
2013-04-06 12:00:31 -04:00
CraftBukkit/Spigot
39e74188e0 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.

By: PaulBGD <ultimate@burngames.net>
2013-12-11 21:13:04 -06:00
CraftBukkit/Spigot
74050974c8 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.

By: Devin Ryan <devin@forairan.com>
2014-02-22 21:18:44 -06:00
CraftBukkit/Spigot
b76c55a802 Check that item in hand is not null after book event. Fixes BUKKIT-5443
By: Des Herriott <des.herriott@gmail.com>
2014-02-27 12:32:21 +00:00
CraftBukkit/Spigot
25c4255d7c [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.

By: GJ <gjmcferrin@gmail.com>
2014-01-31 09:42:03 -05:00
CraftBukkit/Spigot
c9d41122d1 [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.

By: GJ <gjmcferrin@gmail.com>
2014-02-10 12:12:39 -05:00
CraftBukkit/Spigot
f94f5c576e [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.

By: GJ <gjmcferrin@gmail.com>
2014-02-10 11:26:42 -05:00
CraftBukkit/Spigot
f612d70b0d [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.

By: GJ <gjmcferrin@gmail.com>
2014-02-11 22:22:39 -05:00
CraftBukkit/Spigot
42f39726c3 Handle profiles in SkullMeta, they don't store a string anymore.
By: Travis Watkins <amaranth@ubuntu.com>
2014-04-17 14:04:12 -05:00
CraftBukkit/Spigot
ee803812e0 Update CraftBukkit to Minecraft 1.7.9
By: Nate Mortensen <nate.richard.mortensen@gmail.com>
2014-04-15 20:45:03 -06:00
CraftBukkit/Spigot
dd2b3d22fd 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.

By: Travis Watkins <amaranth@ubuntu.com>
2014-04-17 10:45:10 -05:00
CraftBukkit/Spigot
249924e373 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.

By: Travis Watkins <amaranth@ubuntu.com>
2014-04-17 08:41:29 -05:00
CraftBukkit/Spigot
a546a14bb1 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.

By: Travis Watkins <amaranth@ubuntu.com>
2014-04-17 03:31:49 -05:00
CraftBukkit/Spigot
35ef785bd7 Don't do a lookup for obviously invalid usernames
By: Travis Watkins <amaranth@ubuntu.com>
2014-04-17 01:53:13 -05:00
CraftBukkit/Spigot
402973ffef Add methods to use arbitrary entries in scoreboards. Adds BUKKIT-3977
By: Travis Watkins <amaranth@ubuntu.com>
2014-04-13 10:10:32 -05:00
CraftBukkit/Spigot
ed8072818f Fix missed diff and other small things
By: Travis Watkins <amaranth@ubuntu.com>
2014-04-13 04:29:01 -05:00
CraftBukkit/Spigot
9fee5e6bd7 Check actual whitelist for CraftOfflinePlayer too
By: Travis Watkins <amaranth@ubuntu.com>
2014-04-12 07:45:32 -05:00
CraftBukkit/Spigot
baaca718ce Check the actual whitelist for Player#isWhitelisted()
The server's check is for whether or not a player can pass the whitelist
not just if the player is on it. That seems like more useful information
but the API has always just checked if they are on it so this commit
restores that.

By: Travis Watkins <amaranth@ubuntu.com>
2014-04-12 07:21:01 -05:00
CraftBukkit/Spigot
8553d1d462 Use fetched GameProfile for getOfflinePlayer(String)
When getting an OfflinePlayer by name we lookup their UUID and then
use that to fetch the OfflinePlayer. If the player has not played on
this server before the resulting OfflinePlayer will return null for
getName(). As this is unintuitive we now create the OfflinePlayer directly
using the profile we looked up and make OfflinePlayer prefer that data.

By: Travis Watkins <amaranth@ubuntu.com>
2014-04-12 02:38:53 -05:00
CraftBukkit/Spigot
d24dac2c06 Update CraftBukkit to Minecraft 1.7.8
By: Travis Watkins <amaranth@ubuntu.com>
2014-04-10 20:04:38 -05:00
CraftBukkit/Spigot
db3aa0246f Add method to send fake sign updates to players. Adds BUKKIT-2300
By: Patrick Seidel <psycowithespn1@aim.com>
2013-03-21 16:51:35 -04:00
CraftBukkit/Spigot
ee523c5095 Add equals for CraftInventory objects. Adds BUKKIT-4110
When working with inventories you regularly end up with different
Inventory objects that have the same underlying Minecraft inventory.
Currently, even those these point to the same thing, they are not
considered equal. With this commit comparing any Inventory object that
represents the same inventory will result in equals(Object) returning
true.

By: Jeremy Wood <farachan@gmail.com>
2013-04-18 13:08:16 -04:00