Commit graph

3225 Commits

Autor SHA1 Nachricht Datum
toastedtruth
a721fe8473 Fix BlockCanBuildEvent returning null. Fixes BUKKIT-4972
A Block object is now passed in place of the previous id value, so the
obfuscated name for all subsequent arguments was shifted.  As such,
BlockCanBuildEvent was using the incorrect values for both the material
and the location of the event.

This is corrected by swapping the values into the correct order and
providing an id based upon the Block passed into the method.
2013-12-02 21:03:57 -07:00
toastedtruth
803268867e Fix written books crashing the server. Fixes BUKKIT-4945
CraftBukkit modifies the IRecipe interface, adding new methods, so all
classes that implement IRecipe need to be imported and modified to add the
new methods.

Extending ShapelessRecipes implements the added methods and allows
RecipeBookClone to work with the Recipes API in a way that is consistent
with similar recipes, even if the recipe information present in the API
isn't technically correct.
2013-12-02 21:03:56 -07:00
toastedtruth
579b203347 Added RecipeBookClone from nms for diff visibility 2013-12-02 21:03:56 -07:00
Aikar
9969a86e83 Use strict lookup for op permission refresh. Fixes BUKKIT-4698
Adding or removing operators was mistakenly using a loose player lookup
method, which would cause a permission refreshes on an online player whos
name starts with the name of the (offline) opped player.

Add/Remove op operations are exact name match only and the permission
refresh will behave the same way.
2013-12-02 20:34:01 -06:00
Travis Watkins
c5d8b4393a Use correct packet data for toggling flying. Fixes BUKKIT-4989 2013-12-02 20:13:07 -06:00
feildmaster
8c444f275a Correctly drop BlockBreakEvent experience. Fixes BUKKIT-4942
This was a missed diff from the update.
2013-12-02 17:29:12 -06:00
Travis Watkins
963cd5438a Catch all exceptions in jansi initialization. Fixes BUKKIT-4936
Both log4j and our own jline/jansi initialization attempt to catch
errors caused by jansi's use of native libraries. However both of them use
the Exception type which does not catch all errors. On Windows Server 2008
R2 Enterprise without installing extra software the required C++ libraries
are not available which causes an error that does not extend Exception. To
ensure we catch all errors I've changed both of these to catch Throwable
instead which gets us a working console minus jansi functionality.
2013-12-02 15:46:34 -06:00
Travis Watkins
f3865064f8 Add ConsoleAppender from log4j for diff visibility 2013-12-02 15:43:29 -06:00
Nate Mortensen
5b6f271037 Fix missed doors diff. Fixes BUKKIT-4908
l previously was the block id, however Minecraft's refactoring means that
the method is now passed a Block reference rather than the id.  l is now
the data value of the block, so the block retrieved with that value is not
the correct block to be testing.
2013-12-01 14:54:51 -07:00
feildmaster
f0af95505b Fix fishing ignoring event experience. 2013-12-01 14:46:41 -06:00
mbax
46c11eb83f Handle ChatColor-ending messages FIXES BUKKIT-4924
Now adds the component upon creation, eliminating issues where the
created component was discarded.
2013-12-01 15:24:15 -05:00
feildmaster
72b36b8b07 Correctly send player names for the tab list. Fixes BUKKIT-4925 2013-12-01 14:15:59 -06:00
Travis Watkins
6aafe7c5a1 Make console work on Windows again. Fixes BUKKIT-4956
Something the log4j ConsoleAppender does makes the console work correctly
on Windows. After trying to pull pieces of it out and run them manually
I decided to just put the appender back. We now once again start with the
ConsoleAppender then remove it immediately after starting.
2013-12-01 13:21:22 -06:00
Travis Watkins
d48bcbe642 Handle JUL logger formatting 2013-12-01 12:29:22 -06:00
Travis Watkins
c098854591 Forward exceptions to log4j, cleanup logger handling. Fixes BUKKIT-4948 2013-12-01 11:15:18 -06:00
mbax
2726696652 Update CraftBukkit to Minecraft 1.7.2 2013-11-30 19:26:12 -06:00
EvilSeph
ff8b70fbb7 Updated version to 1.6.4-R2.1-SNAPSHOT for development towards next release. 2013-10-30 19:44:34 -04:00
EvilSeph
bf8865b829 Updated version to 1.6.4-R2.0 in pom.xml for RB. 2013-10-30 19:22:17 -04:00
feildmaster
1c7698fab2 Ensure maps are stored only in the main world. Fixes BUKKIT-4872 2013-10-30 17:00:41 -04:00
Wesley Wolfe
7aabcb2ab3 Don't share WorldMapCollection. Fixes BUKKIT-4871
WorldMapCollection stores scoreboard, map (item), structure, and
village information. Scoreboards are explicitly handled globally,
while villages and structures are erroneously shared.

This commit separates the WorldMapCollections to not be shared among
custom worlds. Maps are special-cased to maintain the previous shared
behavior.
2013-10-30 04:22:00 -05:00
Luke GB
84237bb783 Fix our versioning system. 2013-10-24 05:58:36 -04:00
EvilSeph
641d353106 Updated version to 1.6.4-R1.1-SNAPSHOT for development towards next release. 2013-10-24 02:28:24 -04:00
EvilSeph
6cf9820c70 Updated version to 1.6.4-R1.0 in pom.xml for RB. 2013-10-24 01:50:38 -04:00
Wesley Wolfe
bd1389895b Add auto-save plugin redundancy detection.
This change will print a warning when a plugin induces a forced save. A
player or console forcing a save (via a command) is ignored for purposes
of printing a warning.
2013-10-23 20:22:30 -04:00
EvilSeph
de16ba6eec Re-enable built in auto-save. Fixes BUKKIT-4800
When Minecraft first introduced an auto-save feature, we
were taken by surprise by how much of an impact it actually had on the performance
of the server. After investigating the potential causes of the significant
slow-downs we saw at the time, we came to the conclusion that it was a
combination of the auto-save interval being incredibly frequent and
servers already having an auto-save solution that was conflicting with the
newly added built-in one.

Since we noticed that most servers already had their own auto-save
solution, we decided to completely disable the built in auto-save by
default. In hindsight, however, we were so happy that we discovered and
squashed the cause of the performance issues that we forgot to consider
the future and, as a result, some servers have unfortunately been caught
by surprise when they ran their servers without any auto-save plugins.

Without the auto-save plugin conflict, however, Minecraft's default save
interval of 45 seconds is not suitable for the types of servers that run
Bukkit, to the point where it was negatively impacting performance. As
such, we've decided to re-enable the built in auto-save at an interval of
5 minutes for newly created servers.
2013-10-23 19:29:05 -04:00
Nate Mortensen
6430c868c7 Remove redundant call to worldMaps.a(). Addresses BUKKIT-4828
The WorldMapCollection object for SecondaryWorldServers(Nether, End) is
shared with the main world, so saving it again for each SecondaryWorldServer
is redundant.

This commit removes the redundant call by checking if the WorldServer is an
instanceof SecondaryWorldServer before invoking worldMaps.a().
2013-10-19 20:01:52 -06:00
Wesley Wolfe
42e7fdee92 Update maven compiler to 2.3.2
This change removes a redundant addition of source encoding and makes our
compiler match the current maven default. This amends the commit
4775b25a5932a2a24da2c55356936e2f98bff98c

Upstream issue http://jira.codehaus.org/browse/MCOMPILER-70
2013-10-15 04:09:24 -05:00
feildmaster
f4277d7105 Force item data to use a tag name. Fixes BUKKIT-4809
The recent Minecraft update rendered the
e20e50f85083dc53cb5456254bcf5781ef750daa fix incorrect by adding a
compound name to the base tag in some code. This fix changes all uses
of tag changes to explicitly use a name.
2013-10-12 03:18:45 -05:00
Phil Watson
159403e085 Call BlockFadeEvent for fire on inflammable block. Fixes BUKKIT-4835
This adds a call to fireExtinguished for fire burning out on inflamable
blocks, similar to other causes of fire fading.
2013-10-09 16:34:10 -05:00
Wesley Wolfe
ca5e0c6db0 Add exception-resilience to reading UUID. Fixes BUKKIT-4833
When a "uid.dat" file is corrupt (empty or <16 bytes), WorldNBTStorage
will silently fail to read and return null. Non-null behavior is
expected everywhere that this value is used.

This change will force a random UUID when the previous UUID cannot be
read, and getUUID to no longer silently ignore read/write exceptions.
2013-10-06 22:37:44 -05:00
Wesley Wolfe
cfa5490a58 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.
2013-10-05 13:21:15 -05:00
Wesley Wolfe
90e8aa008a Initialize hostname on handshake. Fixes BUKKIT-4793
This restores a lost CraftBukkit diff that initializes the hostname
field used during login events.
2013-09-20 09:13:48 -05:00
feildmaster
dcb9d6a5ef Update CraftBukkit to 1.6.4 2013-09-19 20:01:02 -05:00
EvilSeph
e20ef1f606 Updated version to 1.6.2-R1.1-SNAPSHOT for development towards next release. 2013-09-11 00:54:59 -04:00
EvilSeph
8656d6917a Updated version to 1.6.2-R1.0 in pom.xml for RB. 2013-09-10 22:59:18 -04:00
EvilSeph
79bc53fe97 Update for 1.6.2_01 renames. 2013-09-10 22:59:18 -04:00
feildmaster
7ad5d6098d Fix villager death sound 2013-09-10 21:55:42 -05:00
feildmaster
ac73522ecf Add missing villager sounds. Addresses BUKKIT-4756 2013-09-10 21:30:36 -05:00
EvilSeph
6d700c3320 Use correct spawn reason for Zombie reinforcements. Fixes BUKKIT-4744 2013-09-10 22:24:00 -04:00
EvilSeph
b8feaf059c Remove unnecessary error logging. Fixes BUKKIT-4406 2013-09-10 22:23:59 -04:00
Phillip Schichtel
ffcd0f4502 Provide a tab completion handler for JLine. Adds BUKKIT-4168 2013-09-10 20:57:31 -05:00
FrozenBrain
5f65cd9a1c 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.
2013-09-10 20:51:35 -05:00
feildmaster
600e1524a9 Update and add new sound mappings. Fixes BUKKIT-4756 2013-09-10 20:24:34 -05:00
Brokkonaut
5f43109c0e Correct location of fire from lightning strikes. Fixes BUKKIT-4707
Previously fires spawned by lightning strikes were in the wrong locations.
This introduced the possibility of having blocks replaced when they should
not be.

EntityLightning now uses the correct locations as defined to spawn the
fires when needed.
2013-09-10 20:53:48 -04:00
feildmaster
8ae8957d15 Properly set persistence flag for bred animals. Fixes BUKKIT-4751 2013-09-10 19:42:08 -05:00
Nate Mortensen
c62375f95e Check that a vehicle is a Vehicle before casting. Fixes BUKKIT-4749
When an entity is being moved as the passenger of an entity from one
entity to another, a VehicleExitEvent is fired, but it is assumed that the
current entity is a Vehicle. However, entities can be passengers of more than
just Vehicles, which causes a ClassCastException to be thrown.

This commit fixes the issue by checking that the current entity's vehicle's
bukkitEntity is an instance of Vehicle before casting it to Vehicle.
2013-09-09 22:07:27 -05:00
Wesley Wolfe
5c861fe864 Fix improperly initialized usernames 2013-09-02 16:51:14 -05:00
T00thpick1
cd593fb1ee Set current recipe to null when a recipe isn't found. Fixes BUKKIT-2311
This commit restores the diff from 84dbc21aa71b96fd1d2ea40d624b536309118cde
that has since been lost.
2013-08-28 08:14:01 -06:00
Wesley Wolfe
4667e9493c 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.
2013-08-28 01:45:58 -05:00
Roger Baumgartner
2e7f66787d 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.
2013-08-26 08:43:51 -06:00