| Commit message (Collapse) | Author | Age | Lines |
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Two checks to argument length were changed to properly consider if the
sender is a player instead of an off-by-one logical error.
|
|
|
|
|
| |
The method to make a string from a collection of strings already exists
and should be used when adding multiple players to a team.
|
|
|
|
|
|
|
| |
Metadata values keep strong reference to plugins and they are not
cleared out when plugins are unloaded. This system adds weak reference
logic to allow these values to fall out of scope. In addition we get
some operations turning to O(1) "for free."
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The metadata system generates unique keys for metadata entries based on
the subject metadata is being applied to and the name of the metadata
being applied. It was assumed this would be an expensive operation so a
cache was put in place to ensure this was done as little as possible.
In reality this cache only has a benefit when you have a hit rate above
~90% and is otherwise much slower. As the implementation of the cache is
a hashmap of hashmaps it also uses a significant amount of memory which
is not worth it even for the performance increase with a high hit rate.
This commit simply removes the cache which results in speedups for most
cases and large memory savings.
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
| |
The implementation is designed around having both a main scoreboard and
numberous plugin managed scoreboards that can be displayed to specific
players.
Plugin managed scoreboards are active so long as a reference is kept by a
plugin, or it has been registered as a player's active scoreboard. Objects
specific to a scoreboard remain active until unregistered (which remove a
reference to the owning scoreboard), but quickly fail if accessed
post-unregistration.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
This event is being called whenever a block or entity (e.g. hopper) tries to
move an item from one inventory to another inventory (one inventory may be
the hopper itself).
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
This command only functions in command blocks so the bukkit command for it
simply spits out an error message.
|
| |
|
|
|
|
| |
BUKKIT-3656, BUKKIT-3657
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change is breaking for the new API for 1.5, including the interfaces for
the three new Minecart types and the name of the previously TNT_MINECART
material.
This change also deprecates the two previous specific minecart types located
in the org.bukkit.entity package. This deprecation is not a breaking change
and will still be internally supported.
Each minecart type has new javadoc to be slightly more descriptive. Included
with this are specific references to the interface for each respective
EntityType entry. Another package-info.java file has been included as well.
All specific minecart types extend minecart, each with a more descriptive
name. The naming will also follow the old convention. In addition, the
minecart with no specific designation is now more closely referred to as a
rideable minecart.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
The permission attachment interface provides two methods each for setting
and unsetting permissions. Each one also provides an extra call to the
recalculatePermissions() method on the permissible, which degrades
performance.
This commit removes the duplicate call to recalculate permissions.
|
|
|
|
|
|
|
| |
Permissions are stored as lower case names and referenced as such in all
appropriate methods but removePermission. This changes removePermission
to also convert names to lower case to be consistent with the rest of
the API.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|