Commit graph

1320 commits

Author SHA1 Message Date
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
CraftBukkit/Spigot
6de31b61d5 Store last known player names in preparation for name changing
By: feildmaster <admin@feildmaster.com>
2014-03-31 14:42:33 -05:00
CraftBukkit/Spigot
ca844c146f Implement API for dealing with player UUIDs. Adds BUKKIT-5071
By: Travis Watkins <amaranth@ubuntu.com>
2014-03-28 23:48:15 -05:00
CraftBukkit/Spigot
05cdc26922 Fix PotionEffect removal.
The method in EntityLiving to remove a potion effect was remapped during
the 1.7.5 update.  The method invocation in CraftLivingEntity was not
updated to invoke the remapped method, which has led to a random method in
LivingEntity being called in its place.

This commit corrects the behavior of removePotionEffect by changing the
method to invoke the remapped method as opposed to EntityLiving#m(float).

Thanks to @gabizou for finding this issue.

By: Nate Mortensen <nate.richard.mortensen@gmail.com>
2014-03-23 20:50:43 -06:00
CraftBukkit/Spigot
419ee888cb Increment loop index whether or not command succeeded. Fixes BUKKIT-5455
When VanillaCommandWrapper dispatches a command containing a
PlayerSelector wtih c>-1 (implicitly true for @a), it loops over the
selected players and exectures the command with each player. However, the
loop index is only incremented if the command fails. As a result, a
successful command is repeated on the same player indefinitely, locking up
the server. This commit fixes the issue by incrementing the loop index
regardless of whether the command succeeds, ensuring the command is only
executed once per player identified by the PlayerSelector.

By: WolfieMario <wolfiemario@hotmail.com>
2014-03-22 13:48:04 -06:00
CraftBukkit/Spigot
e6de9aaa17 Update CraftBukkit to Minecraft 1.7.5
By: Nate Mortensen <nate.richard.mortensen@gmail.com>
2014-03-20 22:26:30 -06:00
CraftBukkit/Spigot
d6c0b864b8 Remove chunks from queue if we don't need them anymore.
By: Travis Watkins <amaranth@ubuntu.com>
2014-02-11 20:48:50 -06:00
CraftBukkit/Spigot
ec79a70954 Updated version to 1.7.2-R0.4-SNAPSHOT for development towards next release.
By: EvilSeph <evilseph@gmail.com>
2014-02-12 01:59:10 -05:00
CraftBukkit/Spigot
d0752f2c5d Updated version to 1.7.2-R0.3 in pom.xml for Beta.
By: EvilSeph <evilseph@gmail.com>
2014-02-12 01:33:33 -05:00
CraftBukkit/Spigot
0232a71622 Update/improve configuration documentation.
By: EvilSeph <evilseph@gmail.com>
2014-02-11 00:39:23 -05:00
CraftBukkit/Spigot
8ae3a07ab2 Rename Minecraft command permission nodes to meet fallback spec.
By: EvilSeph <evilseph@gmail.com>
2014-02-11 00:25:03 -05:00
CraftBukkit/Spigot
4c583ab9df Add method to forget callbacks in AsynchronousExecutor
By: Wesley Wolfe <weswolf@aol.com>
2014-02-10 09:33:20 -06:00
CraftBukkit/Spigot
1a1a4f0757 Match old alias behavior when migrating.
Previously the alias system would pass all arguments from the alias
to its command(s) implicitly. The new system requires arguments to be
explicitly passed so server owners can have more control over where and
how they are passed. To ensure this isn't a breaking change during the
migration from bukkit.yml to commands.yml we now add the $1- argument
to the alias commands to match the previous behavior.

By: Travis Watkins <amaranth@ubuntu.com>
2014-02-08 15:02:44 -06:00
CraftBukkit/Spigot
8227c52d3f [Bleeding] Implement Mojang command fallback system. Adds BUKKIT-5385
By: t00thpick1 <t00thpick1dirko@gmail.com>
2014-02-07 18:40:59 -05:00
CraftBukkit/Spigot
f65068829e Implement banning API. Adds BUKKIT-3535
Previously no implementation existed to access various additional
information fields regarding bans. This implementation expands on the
information outlined in the sister Bukkit commit to provide access to
the Minecraft implementation of the ban system.

This implementation of the banning API contains 2 new classes which
provide access to the internal workings of the built-in banning
system within Minecraft.

The CraftBanEntry class simply supports the representation of an internal
Minecraft BanEntry object. The data that may be modified within this new
object must be manually saved to the list contained within the
CraftBanEntry using it's save() method.

The CraftBanList class supports the representation of an internal
Minecraft BanList object through proxy methods. These methods do
validation on the passed objects where needed to ensure safe input to the
backed Minecraft objects.

These changes additionally re-route the existing banning API to the newer,
more detailed, system. Functionality prior to this change still behaves
as documented by the contract defined by the methods changed.

By: mbax <matt@phozop.net>
2014-02-04 20:52:50 -07:00
CraftBukkit/Spigot
7333087027 Update clients when ItemFrame direction is set. Fixes BUKKIT-3371
Hanging entities are placed into the entity tracker and updates are sent
out to clients for the initial placement. Thereafter data watchers are
configured to monitor the item inside the frame. However, if the
direction the ItemFrame facing changes the entity tracker will not send
out updates.

This commit removes and recreates the ItemFrame entity in the same way
that was already done for Painting entities. This causes clients to
be updated appropriately.

By: EdGruberman <ed@rjump.com>
2013-08-30 00:24:26 -07:00
CraftBukkit/Spigot
a216c696e3 Load all already generated chunks via async chunk system
Currently we use the async chunk loading system only when players trigger
chunk loading. If a chunk is loaded for any other reason it goes through
a separate codepath. This means if a player has trigged a chunk load and
before the chunk loads something else wants the same chunk we will load it
twice and throw away the second result. With this change we instead use
the sync processing feature of the AsynchronousExecutor to load the chunk
which will pull it out of the queue if it was already queued to load. This
means we only ever load a chunk once. Because chunk generation is not
thread safe we still fallback to the vanilla chunk loading system if the
chunk does not currently exist.

By: Travis Watkins <amaranth@ubuntu.com>
2014-02-01 17:42:43 -06:00
CraftBukkit/Spigot
4b9b13ab1e Allow AsynchronousExecutor.getSkipQueue() to pull tasks from the queue
By: Wesley Wolfe <weswolf@aol.com>
2014-02-01 17:57:52 -06:00
CraftBukkit/Spigot
145cf2fdde [Bleeding] Fix support for several entities in World.spawn(). Fixes BUKKIT-3284
By: t00thpick1 <t00thpick1dirko@gmail.com>
2014-01-21 22:50:15 -05:00
CraftBukkit/Spigot
eadaffb1b4 [Bleeding] Use correct yaw and pitch when spawning arrows. Fixes BUKKIT-3320
By: t00thpick1 <t00thpick1dirko@gmail.com>
2014-01-21 22:50:15 -05:00
CraftBukkit/Spigot
7179c931c0 [Bleeding] Directly set direction in EntityFireball. Fixes BUKKIT-1154
Because EntityFireball.setDirection() adds a random offset to passed
parameters, it is not appropriate for use in an API method. As such,
the values need to be directly set to remain accurate.

By: t00thpick1 <t00thpick1dirko@gmail.com>
2014-01-21 22:50:15 -05:00
CraftBukkit/Spigot
9b8c0edb02 [Bleeding] Implement setCharged and getCharged for WitherSkull. Addresses BUKKIT-3060
By: t00thpick1 <t00thpick1dirko@gmail.com>
2014-01-21 22:50:15 -05:00
CraftBukkit/Spigot
115d946d7b [Bleeding] Implement ProjectileSource API. Addresses BUKKIT-1038, BUKKIT-1156
By: t00thpick1 <t00thpick1dirko@gmail.com>
2014-01-20 00:03:21 -05:00
CraftBukkit/Spigot
668c2bffdb Add setCritical and isCritical methods to CraftArrow.java. Adds BUKKIT-5113
By: MorphanOne <morphanone@gmail.com>
2013-12-16 22:30:13 -05:00
CraftBukkit/Spigot
616d88c604 Add methods to get and set arrow knockback. Adds BUKKIT-5103
By: Likaos <romain.rosique@gmail.com>
2013-12-16 22:30:13 -05:00
CraftBukkit/Spigot
97b317368b [Bleeding] Add support for ThrownExpBottle and Fish to launchProjectile(...). Fixes BUKKIT-1536
Previously, trying to launch a ThrownExpBottle or Fish projectile would
result in an IllegalArgumentException. This commit adds support for both
ThrownExpBottle and Fish, which means that all current projectiles are
now properly supported by this method.

By: GJ <gjmcferrin@gmail.com>
2013-12-16 22:40:00 -05:00
CraftBukkit/Spigot
36c8e19946 [Bleeding] Instantiate logger earlier in CraftServer. Fixes BUKKIT-4253.
Previously, if an error occurred during CraftServer initialization before the
logger was instantiated, it would cause an NPE and the server would never
finish loading properly. By instantiating the logger before attempting to
load anything else in CraftServer, we ensure that a logger will always be
available in the case of any errors.

By: GJ <gjmcferrin@gmail.com>
2014-01-21 10:47:18 -08:00
CraftBukkit/Spigot
d04ca26007 Fix stacking for items after setting empty meta. Fixes BUKKIT-5331
ItemStacks do not stack if one has null for a tag, while the other has an
empty tag. In CraftItemStack, if you set an item to an empty ItemMeta, it
will create an empty tag for the internal ItemStack.

This changes the setItemMeta function to check for empty meta, and then
use null for the tag instead of an empty NBTTagCompound.

By: Wesley Wolfe <weswolf@aol.com>
2014-01-23 23:02:40 -06:00
CraftBukkit/Spigot
ba1adfb79b [Bleeding] Account for null in EntityDamageEvent handling. Fixes BUKKIT-5317
Damage caused by explosions will return null for the event as of
6588d6f72bbca74bf150de65593ac575b846111b. As such, a null check is
now necessary when handling non-living entity damage events.

By: t00thpick1 <t00thpick1dirko@gmail.com>
2014-01-07 00:25:11 -05:00
CraftBukkit/Spigot
a4b581ad13 [Bleeding] Check that vanilla recipes actually exist. Fixes BUKKIT-5277
When falling back to vanilla recipes in the iteration of recipes,
a check is necessary to ensure that vanilla recipes are present.
RecipeIterator has been modified to account for the multi-map setup.

By: t00thpick1 <t00thpick1dirko@gmail.com>
2014-01-05 00:41:06 -05:00
CraftBukkit/Spigot
e276044e36 [Bleeding] Implement methods for /achievement command. Addresses BUKKIT-4932
By: t00thpick1 <t00thpick1dirko@gmail.com>
2014-01-16 01:48:38 -05:00
CraftBukkit/Spigot
f87c5cd9dd [Bleeding] Fix Achievements and Statistics API. Fixes BUKKIT-5305
By: t00thpick1 <t00thpick1dirko@gmail.com>
2014-01-14 23:42:40 -05:00