| Commit message (Collapse) | Author | Age | Lines |
|
|
|
|
|
| |
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
|
|
|
|
| |
Fixed Tests, moved TestPlugin out of messaging
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
New events:
- InventoryOpenEvent
- InventoryClickEvent - detects any clicks on a slot or outside the window
- In the creative inventory view, only clicks on the quickbar are detected
- InventoryCloseEvent
- BrewEvent - when a potion finishes brewing
- CraftItemEvent (a subevent of InventoryClickEvent) - fired when taking the crafted item
- PrepareItemCraftEvent - fired just before updating the result slot
Changes to existing events:
- EnchantItemEvent extends InventoryEvent and also has a new whichButton() method
- PrepareItemEnchantEvent also extends InventoryEvent
- FurnaceBurnEvent and FurnaceSmeltEvent now extend BlockEvent (as does BrewEvent)
- PlayerInventoryEvent is deprecated (though it never did anything anyway)
New subclasses of Inventory:
- BrewerInventory
- CraftingInventory
- DoubleChestInventory
- EnchantingInventory
- FurnaceInventory
New methods in Inventory:
- getViewers()
- getTitle()
- getType()
- getHolder()
- iterator() - Yes, inventories are now iterable!
- The iterator is a ListIterator that does not support add or remove
New methods in Player:
- getOpenInventory()
- openInventory()
- openWorkbench()
- openEnchanting()
- closeInventory()
- setWindowProperty()
- getItemOnCursor()
- setItemOnCursor()
Other changes:
- createInventory() methods in Server to make inventories not linked to an object
- ContainerBlock is deprecated in favour of InventoryHolder
- New InventoryView class gives direct access to an inventory window!
- Removed the Slot class which did nothing and was used nowhere
Some small credit goes to Afforess (initial conception of openInventory() methods) and Drakia (initial conception of InventoryOpenEvent and InventoryCloseEvent).
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This metadata implementation has the following features:
- All metadata is lazy. Metadata values are not actually computed until another plugin requests them. Memory and CPU are conserved by not computing and storing unnecessary metadata values.
- All metadata is cached. Once a metadata value is computed its value is cached in the metadata store to prevent further unnecessary computation. An invalidation mechanism is provided to flush the cache and force recompilation of metadata values.
- All metadata is stored in basic data types. Convenience methods in the MetadataValue class allow for the conversion of metadata data types when possible. Restricting metadata to basic data types prevents the accidental linking of large object graphs into metadata. Metadata is persistent across the lifetime of the application and adding large object graphs would damage garbage collector performance.
- Metadata access is thread safe. Care has been taken to protect the internal data structures and access them in a thread safe manner.
- Metadata is exposed for all objects that descend from Entity, Block, and World. All Entity and World metadata is stored at the Server level and all Block metadata is stored at the World level.
- Metadata is NOT keyed on references to original objects - instead metadata is keyed off of unique fields within those objects. Doing this allows metadata to exist for blocks that are in chunks not currently in memory. Additionally, Player objects are keyed off of player name so that Player metadata remains consistent between logins.
- Metadata convenience methods have been added to all Entities, Players, Blocks, BlockStates, and World allowing direct access to an individual instance's metadata.
- Players and OfflinePlayers share a single metadata store, allowing player metadata to be manipulated regardless of the player's current online status.
|
|
|
|
|
|
|
|
|
|
| |
Removed internal collection leaks from PluginDescriptionFile
BREAKING: PluginDescriptionFile.getAuthors() now returns List instead of
ArrayList
Various places with unsafe generics, notably List<Object> getList() in
Configurations are now referenced as <?>. This is nonbreaking, but
sourcecode will need to be revised when compiled.
|
| |
|
|
|
|
| |
add a junit test to ensure both these problems will be caught in future.
|
|
|
|
| |
Use launchProjectile in place of individual throwSnowball, throwEgg, and shootArrow methods
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
Adds Player.hidePlayer, Player.showPlayer, and Player.canSee for managing
what players are hidden from a player. When someone is hidden from a player
the player cannot see them in the user list or /list and they cannot /tell
them so they appear to be completely gone from the server.
|
| |
|
| |
|
|
|
|
| |
to @zml2008 & @lahwran.
|
|
|
|
|
|
| |
prefixes messages with the plugin name.
Note: the server when enabling or disabling a plugin will now by default log this.
|
|
|
|
| |
methods. Added unit tests for ChatColor
|
| |
|
|
|
|
| |
ItemStack is properly serializable. Big thanks to GICodeWarrior for the PR. This fixes BUKKIT-425
|
| |
|
| |
|
| |
|
|
|
|
| |
http://dinnerbone.com/blog/2012/01/13/minecraft-plugin-channels-messaging/
|
|
|
|
| |
contents, and made it trim the initial newlines of any existing config header
|
| |
|
|
|
|
| |
where possible. This fixes BUKKIT-290
|