Commit Graph

134 Commits

Author SHA1 Message Date
Adrien Prokopowicz
7ccccb2c0e * BUG: Fix map parts items row/column indexing. 2016-07-08 06:34:40 +02:00
Adrien Prokopowicz
a730aab1f1 More minor fixes.
* NEW: GUIs are now translated according to the player's locale.
* BUG: Fix some usage parameters.
* BUG: Fix Map initialisation on startup if the map is invalid.
* BUG: PosterMap: remove a debugging message.
* BUG: Fix the command error message for the french locale.
2016-07-08 04:45:08 +02:00
Adrien Prokopowicz
225c76de7c Better Management for missing maps.
* NEW: Migration now ignores maps that are missing from the save.
* BUG: Fix NPEs being thrown when trying to handle missing maps.
* BUG: Fix some typos in the french translation.
2016-07-08 01:15:02 +02:00
Adrien Prokopowicz
97e62c1a14 * BUG: Fixed splatter maps removing when in survival mode. 2016-07-07 23:28:17 +02:00
Adrien Prokopowicz
7de48ef7ce * BUG: Fixed splatter maps removing when in survival mode. 2016-07-07 23:17:49 +02:00
Adrien Prokopowicz
db8d1d9551 Added proper support for older posters without dimensions.
* NEW: MapDetailGui: Use regular items to represent Single maps, so the
  user can retrieve them.
* NEW: MapDetailGui: Added support for posters without dimensions.
* NEW: MapListGui: Added support for posters without dimensions.
* NEW: MapItemManager: Added support for posters without dimensions.
* BUG: SplatterMapManager: Prevent the use of splatter maps with posters
  without dimensions.
* BUG: PlayerMapStore: Fix the console warning when loading a map store
  that exceeds the quotas.
* BUG: Minor fixes to the french translation.
2016-07-07 02:04:13 +02:00
Adrien Prokopowicz
a90418d3a1 * BUG: Fix item frame events priority and cancellation handling. 2016-07-06 00:03:02 +02:00
Adrien Prokopowicz
3ea55f5fb2 Merge pull request #28 from Brokkonaut/patch-1
Correctly handle cancelled events when autoremoving maps.
2016-07-05 21:02:16 +02:00
Adrien Prokopowicz
b83b8d0818
Merge branch 'indev' of github.com:Coutume/ImageOnMap into indev 2016-07-04 03:46:46 +02:00
Adrien Prokopowicz
68495fb65c Some fixes for the migration tool.
* BUG: Names are now correctly requested for both posters and small maps.
* BUG: Names cannot be requested twice anymore.
2016-07-04 03:45:29 +02:00
Brokkonaut
bd2c5d7a9a Don't remove map if not allowed to damage item frames there
If the EntityDamageByEntityEvent is cancelled (for example by a plugin like WorldGuard) the maps should not be removed. This is on high priority, to allow other plugins to cancel the event first.
2016-05-25 23:50:33 +02:00
Amaury Carrade
bc34f8cda5 Merge pull request #26 from zDevelopers/feature-i18n
Internationalization of the plugin + French translation.
2016-05-21 21:03:29 +02:00
Amaury Carrade
8fd31f298e
Added fr_FR translation. 2016-05-21 20:56:07 +02:00
Amaury Carrade
79004336a0
Fixed some typos in texts.
* BUG: fixed typography errors and things like this.
2016-05-21 20:55:03 +02:00
Amaury Carrade
cd3aeb8cab
Merge branch 'indev' of github.com:zDevelopers/ImageOnMap into feature-i18n
Conflicts:
	src/main/java/fr/moribus/imageonmap/commands/maptool/ListCommand.java
2016-05-21 19:12:25 +02:00
Amaury Carrade
40a35271ae Merge pull request #24 from AmauryCarrade/feature-clickable-mapslist-12
Clickable maps list
2016-05-21 19:08:38 +02:00
Amaury Carrade
706ca5601d
Internationalization of the plugin.
* NEW: the plugin can now be translated.
2016-05-21 18:55:32 +02:00
Amaury Carrade
987efea203
The plugin configuration now uses the zLib config mecanisms.
* NEW: now using the zLib configuration component to manage the configuration.
2016-05-21 13:37:04 +02:00
Amaury Carrade
578ea39479
Improved the splatter maps tooltip.
* NEW: added usage instructions and minimal size of the frames wall in the tooltip of the splatter map.
2016-05-21 01:35:21 +02:00
Amaury Carrade
6568e6e411
Made /maptool list clickable (closes #12)
* NEW: a click on the maps names on /maptool list gives the maps.
* NEW: added a tooltip on this list containing infos about the map.
* NEW: light redesign of the list.
2016-05-21 00:48:40 +02:00
Adrien Prokopowicz
c18202f800
Fix Splatter map deployment.
* NEW: Incomplete splatter maps can now be retreived by shift-clicking.
* NEW: When in creative mode, retreived maps are given back when not
  in the player's inventory.
* BUG: Splatter maps are now deployed correctly.
2016-05-02 17:40:54 +02:00
Adrien Prokopowicz
3bfa1266ad First (and dirty) implementation for Splatter maps. Still WIP.
* NEW: Added splatter maps.
* NEW: Shift-left clicking on a poster map in a frames removes the
  complete map.
* NEW: Placing a splatter map on the bottom-left of an item frame wall
  places the entire map.
* NEW: Map GUIs now give splatter maps instead of all the separate map
  parts.
2016-04-15 17:16:09 +02:00
Adrien Prokopowicz
a285d782be Maps titles are now hidden when placed on an item frame.
* NEW: MapItemManager: now handles item frame events, allowing to hide
  the map's title only when needed.
* NEW: Map files are now all loaded on start, rather than on demand.
* NEW: Rewrote DeleteConfirmCommand using the new RawText API.
* NEW: Use the new ZLib.registerEvents() API.
* OPT: MapManager's and PlayerMapStore's managesMap() methods now return
  early when given a non-map ItemStack.
2016-04-11 22:39:27 +02:00
Adrien Prokopowicz
154c2fde36 * BUG: Fix delete command confirmation message parsing. 2016-04-02 23:09:12 +02:00
Adrien Prokopowicz
b5751f38eb * BUG: Fixes splitting images having multiples of 128 as dimensions. 2016-04-02 22:11:31 +02:00
Adrien Prokopowicz
b5d41b25d0 * NEW: Improved rendering error messages. Fixes #22. 2016-04-02 21:45:03 +02:00
Adrien Prokopowicz
a2cdb02834 Merge pull request #19 from AmauryCarrade/feature-explorer-gui-13 2016-04-02 19:45:38 +02:00
Adrien Prokopowicz
e942aabeda Various fixes and improvements on map GUIs.
* NEW: MapItemManager: new methods to create corresponding map items.
* BUG: MapDetailGui: Picking up a part now gives the player the actual 
  map instead of the display item.
* BUG: ImageRendererExecutor: The worker's name is now the correct one.
* BUG: Picking up a map or putting it in the hand from an inventory now
  correctly initializes the map.
2016-04-02 00:43:09 +02:00
Amaury Carrade
234a81b335 Merge branch 'feature-explorer-gui-13' of github.com:AmauryCarrade/ImageOnMap into feature-explorer-gui-13
Conflicts:
	src/main/java/fr/moribus/imageonmap/gui/ConfirmDeleteMapGui.java
	src/main/java/fr/moribus/imageonmap/gui/MapDetailGui.java
	src/main/java/fr/moribus/imageonmap/gui/list/MapDetailGui.java
	src/main/java/fr/moribus/imageonmap/guiproko/core/ActionGui.java
	src/main/java/fr/moribus/imageonmap/guiproko/core/ExplorerGui.java
	src/main/java/fr/moribus/imageonmap/guiproko/core/Gui.java
	src/main/java/fr/moribus/imageonmap/guiproko/core/GuiUtils.java
	src/main/java/fr/moribus/imageonmap/guiproko/list/MapListGui.java
2015-12-29 19:22:41 +01:00
Amaury Carrade
2443574316 ImageOnMap is now a zLib plugin.
* NEW: added zLib dependency.
* NEW: removed all classes moved to the zLib, and updated the references to these classes to the zLib ones.
* BUG: fixed some GUI navigation problems.
* NEW: implemented the items renaming into the details GUI.
2015-12-29 19:12:36 +01:00
Adrien Prokopowicz
c4a1310847 Introduced GUI relationships.
* NEW: Gui: can now have a parent. If so, a closing GUI will
  open its parent, like a modal dialog.
* NEW: Gui: can now be immune to the next close event, if needed.
* BUG: Gui: getOpenGui() does not throw an NPE anymore if no open
  GUI was found.
* OPT: PromptGui: removed unneeded fields.
2015-10-05 22:35:59 +02:00
Adrien Prokopowicz
96093898c8 New Sign-based Prompt GUI API.
* NEW: Added new Callback class.
* NEW: Added ReflectionUtils module.
* NEW: Added new PromptGui class.
* NEW: MapDetailGui: Implement renaming using new prompt API.
* BUG: ExplorerGUI: Fix a crash when setting null data.
* BUG: InventoryGUI: Fix titles longer than 32 characters.
2015-09-28 16:09:04 +02:00
Adrien Prokopowicz
48dbdbd9d4 Separated the Inventory GUI from the common GUI.
* NEW: Added new InventoryGui class.
  This class only manages inventory-based GUI.
* NEW: Gui: Added the registerListener() method, which allows
  any Gui subclass to lazily register their own GUI Listeners.
2015-09-21 06:37:10 +02:00
Adrien Prokopowicz
f29e972be6 Various GUI & GUI API improvements.
* NEW: ActionGui: Added the GuiAction annotation.
* NEW: ConfirmDeleteMapGui: Updated to use the @GuiAction annotations.
* NEW: ExplorerGui: Added a default empty indicator.
* NEW: ExplorerGui: Updated to use the @GuiAction annotations.
* NEW: ExplorerGui: Added current page getters & setters.
* NEW: MapDetailGui: Updated to use the @GuiAction annotations.
* BUG: ActionGui: Fix event handler call if the method takes an 
  InventoryClickEvent as a parameter.
* BUG: ConfirmDeleteMapGui: Fix exception handling.
* BUG: ExplorerGui: Fix the hasData() method.
* BUG: ExplorerGui: Fix the empty indicator.
* BUG: ExplorerGui: Fix the keep*ScrollingSpace implementation.
* BUG: ExplorerGui: Fix item pickup when using coordinates.
* BUG: ExplorerGui: All callbacks can now take coordinates instead
  of data.
* OPT: ConfirmDeleteMapGui: Messages are now defined as constants.
* OPT: ConfirmDeleteMapGui: GUI's data is now final.
* OPT: MapDetailGui: Cleaned up GUI initialization a bit.
* OPT: MapListGui: Cleaned up ItemStack generation.
* OPT: MapDetailGui: Clarified UI tooltips.
2015-09-19 13:35:33 +02:00
Amaury Carrade
d25bf9bd0e Updated the details GUI and fixed list GUI only opening the details GUI for posters.
* NEW: added icons from the olg details GUI.
* NEW: rewrote the map parts items (from the old GUI).
* BUG: the list GUI don't open the details one when a single map is right-clicked.
2015-09-10 18:17:35 +02:00
Amaury Carrade
e5c7ece41f Updated explorer GUI to support manually placed data sets (with coordinates).
* NEW: updated the way the data emptiness is determined to avoid a GUI with manually placed data being considered as empty.
2015-09-10 18:00:36 +02:00
Amaury Carrade
58abd17205 Renamed /maptool manage to /maptool explore, and added the /maps alias.
* NEW: /maptool manage is now /maptool explore.
* NEW: added /maps as an alias of /maptool explore.
2015-09-10 16:30:29 +02:00
Amaury Carrade
5dbfd8caf9 Updated GUI titles to more clear and breadcrumb ones.
* NEW: using partial breadcrumbs in the GUI titles; also the important part of the title is written in black instead of gray.
2015-09-10 16:29:27 +02:00
Amaury Carrade
48af13118f Reused the old way the maps are displayed in the new GUI, with some tweaks.
* NEW: updated the maps tooltips in the list GUI, using the old display with « Single map » / « Poster map (42×68) » instead of the raw maps count.
2015-09-10 16:08:42 +02:00
Amaury Carrade
34b3a66220 Added an emptiness representation in the explorer GUI.
It's an item displayed on the center of the GUI if there isn't any data to display.

 * NEW: added an item displayed if the explorer GUI is empty.
 * NEW: implementation of this empty item in the list GUI.
 * NEW: small adjustments on the statistics (removed the last empty line from the lore)
 * BUG: the old method was still used to remove the item attributes (the one from the `gui` package).
2015-09-10 16:00:14 +02:00
Amaury Carrade
e7acbb36c4 Implemented the statistic books of the list GUI in the new architecture.
* NEW: added statistics to the new list GUI.
2015-09-10 15:27:09 +02:00
Amaury Carrade
1ddc923b73 Fixed explorer GUI to be able to use getSize() in onUpdate().
* BUG: getSize() always returns 0 in the onUpdate method of explorer GUIs.
2015-09-10 15:26:27 +02:00
Amaury Carrade
a403efcd4e Added an option to the explorer GUI: keep the scrolling area empty even without scrolls.
To be able to place controls, or by style/coherence if the developer wants that.

* NEW: added explicit options to keep the scrolling area empty even without scrolls.
2015-09-10 15:14:18 +02:00
Amaury Carrade
149e1225c1 Improved the pagination buttons of the explorer GUI.
* NEW: updated the pagination button to more clean ones, and through an overrideable method, to allow a more in-depth personalization if needed. The way used to implement this may be improved, but it's not very important.
* NEW: added a version of `ActionGui.updateAction` with only the action and an ItemStack as argument.
2015-09-10 01:40:29 +02:00
Amaury Carrade
e1f25a084d Implemented the deletion confirmation GUI with the new system.
* NEW: migrated the deletion confirmation GUI to the new system.
2015-09-10 01:37:05 +02:00
Amaury Carrade
80089c7bf5 Improved the GUI manager.
* NEW: reformatted the code a little bit to make it more readable.
* NEW: added Javadoc when it was missing.
* NEW: changed the name of the fallback action method in `ActionGui`, from `onAction_unknown` to `unknown_action` (coherence of the methods names).
* NEW: the action methods (both declared and unknown) can now take an extra argument: the triggered InventoryClickEvent. This argument is completely optional, so this will not break any code, and if the event is not needed, it can just be skipped.
* NEW: renamed the setData(int, int) method to setDataShape(int, int), because this method does not actually set any data.
2015-09-10 00:55:10 +02:00
Adrien Prokopowicz
efd62283ea * NEW: ActionGui: Added documentation. 2015-08-31 21:31:57 +02:00
Adrien Prokopowicz
54931ae078 * BUG: Gui: Use Player instead of HumanEntity to track Gui's owners. 2015-08-31 21:31:23 +02:00
Adrien Prokopowicz
a5449899f1 Finally finished the 2D Explorer API !
* NEW: ExplorerGui: Implemented 2D data support.
* NEW: ExplorerGui: Implemented retreiving items using coordinates rather than data.
* NEW: ExplorerGui: Added right-click event support.
* NEW: Gui: Added support for dragging events.
* NEW: Maps given to the player now have their attributes hidden.
* BUG: PluginLogger: Fixed exception handling when logging a message with arguments.
2015-08-31 11:36:24 +02:00
Adrien Prokopowicz
0ad44db92b Keep working on the GUI API.
* NEW: The manage command now opens the MapList GUI.
* NEW: MapListGui: First actual implementation.
* NEW: MapManager/PlayerMapStore: Added the getMaps() method.
* BUG: GuiUtils: The hideAttributes() method does not crash anymore if
  the ItemFlags API is not available.
* OPT: ExplorerGui: Inventory variables are now computed only on data update.
2015-07-30 08:52:18 +02:00