| Commit message (Collapse) | Author | Age | Lines |
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
A special thanks goes to @aerouk for almost all of the changes found here.
|
|
|
|
|
|
|
|
|
|
| |
This commit adds an additional method to Location to set the direction of
facing. Included are a set of unit tests that ensure the consistency of
getDirection and setDirection using a set of cardinal directions and
arbituary data points.
Javadocs were also added to pitch and yaw methods that explain the unit
and points of origin.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
TimedRegisteredListener uses a reference to the first event fired. This
causes a memory leak in the server for any references that event has. This
changes TimedRegisteredListener to only store a reference to the class of
the event.
This change is intentionally a breaking change, as it is an obscure part
of the API. A non-breaking change would require the leak to be maintained
or an immediate update for any plugins using the method, as it would be an
indirect break.
A unit test is also included to check behavior of shared superclass
functionality.
|
|
|
|
|
|
|
|
|
|
| |
This commit adds a comaptibility layer for use between
ConfigurationSerializable and Java Serializable, such that when using the
Bukkit object streams, any ConfigurationSerializable acts as if it
implements Serializable for purposes of that wrapped stream.
Included are a set of unit tests for the stream with a check for backward
compatibility across versions.
|
|
|
|
|
|
|
|
|
|
|
|
| |
FixedMetadataValue currently just extends LazyMetadataValue with a value
that never changes. While this works it is a lot of unneeded overhead
that causes FixedMetadataValue to be a lot slower and use a lot more
memory than one would expect. To correct this we store the value directly
in FixedMetadataValue and override the the appropriate methods to use it.
Ideally we would modify FixedMetadataValue to no longer extend
LazyMetadataValue as this would give a very large memory savings. However,
this is not currently done for backwards compatibility reasons.
|
|
|
|
|
|
| |
Implementing the MetadataValue interface is significant work due to
having to provide a large amount of conversion stub methods. This commit
adds a new optional abstract base class to aid in implementation.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Static methods are death to testability. However, irrelevant static
methods can be negotiated with until a later time in which they can be
removed. When instantiating a new Permission object, static calls are
made to the Bukkit class during a recalculatePermissibles logic path.
This recalculatePermissibles call should probably be moved
appropriately, but until the time such testing can be accomplished
itself, these tests work around that situation by simply verifying the
static Bukkit server references are satisfied since what is called as
a result is irrelevant currently.
This commit also updates a few other tests for PluginManagerTest to
work towards the standard of using the Hamcrest unit testing library.
|
|
|
|
| |
Negative id values would try to access the array out of bounds and throw an java.lang.ArrayIndexOutOfBoundsException.
|
|
|
|
|
|
|
|
|
|
|
|
| |
DyeColor used the wool data for getData(), which is very misleading based
on class name. The old method has been deprecated and replaced with
getWoolData() and getDyeData() for the appropriate types of data values.
The MaterialData classes Dye and Wool were updated appropriately,
especially Dye innapropriately using a DyeColor data value compensation.
Unit tests were added for the new methods, as well as the getColor on Dye
and Wool.
|
|
|
|
|
|
| |
Included with ItemMeta is a new serializable class Color.
PotionEffects are now serializable.
|
|
|
|
|
|
| |
Reobtaining a constructor is not a trivial operation, this change makes the Material enum store the respective constructors for each MaterialData.
Additionally 'fixed' the material tests to use proper generics.
|
|
|
|
|
|
| |
This implementation provides access to a (mutable) list and the base
message. Also provided is a convenience method for getting the last
'token' in the provided string.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
CommandMap contains a method that will auto-complete commands
appropriately. Before the first space, it searches for commands of which
the sender has permission. After the first space, it delegates to the
individual command.
Vanilla commands contain implementations to mimic vanilla
implementation. Exception would be give, that allows for name matching;
a feature we already allowed as part of the command is now supported for
auto-complete as well.
Plugin commands can get a tab completer set to delegate the completion
for. If no tab completer is set, it can check the executor to see if it
implements the tab completion interface. It will also attempt to chain
calls if null gets returned from these interfaces. Plugins also
implement the new TabCompleter interface, to add ease-of-use for plugin
developers, similar to the onCommand() method.
The default command implementation simply searches for player names.
To help facilitate command completion, a utility class was added with
two functions. One checks two strings, to see if the specified string
starts with (ignoring case) the second. The other method uses the first
to selectively copy elements from one collection to another.
|
| |
|
|
|
|
|
|
| |
BUKKIT-1906
This is the total experience one needs to gain a level.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
ChatColor searches from the start to the end of a string for chat format
characters but this always has to search the entire string. By starting
from the end of the string and working backwards we can stop searching once
we find a color code or a reset code as any previous formatting is wiped
out by these.
|
| |
|
|
|
|
| |
hasMetadata(key) to false. Addresses BUKKIT-1380
|
|
|
|
| |
when computing hasMetadata(). Addresses BUKKIT-1211
|
| |
|
|
|
|
| |
tests. Fixes BUKKIT-1251
|
| |
|
| |
|
|
|
|
| |
Addresses BUKKIT-1159 and addresses BUKKIT-1160
|
|
|
|
| |
the line of text. Fixes BUKKIT-1048
|
|
|
|
| |
Whenever a conversation exits, the ConversationAbandonedEvent is triggered with details about how the conversation ended and what, if anything caused it to end. Fixes BUKKIT-986
|
| |
|
| |
|
|
|
|
| |
flat() one, sharped() and flattened() functions to get a note from an existing note, a toString(), and more tests. Addresses BUKKIT-861
|