diff --git a/icon.png b/icon.png
new file mode 100644
index 0000000..1ba7aad
Binary files /dev/null and b/icon.png differ
diff --git a/pom.xml b/pom.xml
index 5794457..f013a4c 100644
--- a/pom.xml
+++ b/pom.xml
@@ -3,7 +3,7 @@
4.0.0
fr.moribus
ImageOnMap
- 2.99
+ 3.0
jar
diff --git a/src/main/java/fr/moribus/imageonmap/gui/ConfirmDeleteMapGui.java b/src/main/java/fr/moribus/imageonmap/gui/ConfirmDeleteMapGui.java
index 184ea90..83c5890 100644
--- a/src/main/java/fr/moribus/imageonmap/gui/ConfirmDeleteMapGui.java
+++ b/src/main/java/fr/moribus/imageonmap/gui/ConfirmDeleteMapGui.java
@@ -99,7 +99,7 @@ public class ConfirmDeleteMapGui extends ActionGui
protected void onUpdate()
{
/// The title of the map deletion GUI. {0}: map name.
- setTitle(I.t("{0} » {black}Confirm deletion", mapToDelete.getName()));
+ setTitle(I.t(getPlayerLocale(), "{0} » {black}Confirm deletion", mapToDelete.getName()));
setSize(6 * 9);
@@ -107,13 +107,13 @@ public class ConfirmDeleteMapGui extends ActionGui
action("", 13, new ItemStackBuilder(Material.EMPTY_MAP)
/// The title of the map deletion item
- .title(I.t("{red}You're about to destroy this map..."))
+ .title(I.t(getPlayerLocale(), "{red}You're about to destroy this map..."))
/// The end, in the lore, of a title starting with “You're about to destroy this map...”.
- .lore(I.t("{red}...{italic}forever{red}."))
+ .lore(I.t(getPlayerLocale(), "{red}...{italic}forever{red}."))
.loreLine()
- .lore(I.t("{gray}Name: {white}{0}",mapToDelete.getName()))
- .lore(I.t("{gray}Map ID: {white}{0}", mapToDelete.getId()))
- .lore(I.t("{gray}Maps inside: {white}{0}", mapToDelete.getMapsIDs().length))
+ .lore(I.t(getPlayerLocale(), "{gray}Name: {white}{0}",mapToDelete.getName()))
+ .lore(I.t(getPlayerLocale(), "{gray}Map ID: {white}{0}", mapToDelete.getId()))
+ .lore(I.t(getPlayerLocale(), "{gray}Maps inside: {white}{0}", mapToDelete.getMapsIDs().length))
.hideAttributes()
);
diff --git a/src/main/java/fr/moribus/imageonmap/gui/MapDetailGui.java b/src/main/java/fr/moribus/imageonmap/gui/MapDetailGui.java
index ecbadaf..57b9e1d 100644
--- a/src/main/java/fr/moribus/imageonmap/gui/MapDetailGui.java
+++ b/src/main/java/fr/moribus/imageonmap/gui/MapDetailGui.java
@@ -29,11 +29,12 @@ import fr.zcraft.zlib.components.gui.PromptGui;
import fr.zcraft.zlib.components.i18n.I;
import fr.zcraft.zlib.tools.Callback;
import fr.zcraft.zlib.tools.items.ItemStackBuilder;
+import org.apache.commons.lang.ArrayUtils;
import org.bukkit.Material;
import org.bukkit.inventory.ItemStack;
-public class MapDetailGui extends ExplorerGui
+public class MapDetailGui extends ExplorerGui
{
private final ImageMap map;
@@ -50,11 +51,27 @@ public class MapDetailGui extends ExplorerGui
partMaterial = Material.EMPTY_MAP;
return new ItemStackBuilder(partMaterial)
- .title(I.t("{green}Map part"))
- .lore(I.t("{gray}Column: {white}{0}", y + 1))
- .lore(I.t("{gray}Row: {white}{0}", x + 1))
+ .title(I.t(getPlayerLocale(), "{green}Map part"))
+ .lore(I.t(getPlayerLocale(), "{gray}Row: {white}{0}", y + 1))
+ .lore(I.t(getPlayerLocale(), "{gray}Column: {white}{0}", x + 1))
.loreLine()
- .lore(I.t("{gray}» {white}Click{gray} to get only this part"))
+ .lore(I.t(getPlayerLocale(), "{gray}» {white}Click{gray} to get only this part"))
+ .item();
+ }
+
+ @Override
+ protected ItemStack getViewItem(Short mapId)
+ {
+ int index = ((PosterMap) map).getIndex(mapId);
+ Material partMaterial = Material.PAPER;
+ if(index % 2 == 0)
+ partMaterial = Material.EMPTY_MAP;
+
+ return new ItemStackBuilder(partMaterial)
+ .title(I.t(getPlayerLocale(), "{green}Map part"))
+ .lore(I.t(getPlayerLocale(), "{gray}Part: {white}{0}", index + 1))
+ .loreLine()
+ .lore(I.t(getPlayerLocale(), "{gray}» {white}Click{gray} to get only this part"))
.item();
}
@@ -73,6 +90,13 @@ public class MapDetailGui extends ExplorerGui
throw new IllegalStateException("Unsupported map type: " + map.getType());
}
+ @Override
+ protected ItemStack getPickedUpItem(Short mapId)
+ {
+ PosterMap poster = (PosterMap) map;
+ return MapItemManager.createMapItem(poster, poster.getIndex(mapId));
+ }
+
@Override
protected ItemStack getEmptyViewItem()
{
@@ -87,25 +111,37 @@ public class MapDetailGui extends ExplorerGui
protected void onUpdate()
{
/// Title of the map details GUI
- setTitle(I.t("Your maps » {black}{0}", map.getName()));
+ setTitle(I.t(getPlayerLocale(), "Your maps » {black}{0}", map.getName()));
setKeepHorizontalScrollingSpace(true);
if(map instanceof PosterMap)
- setDataShape(((PosterMap) map).getColumnCount(), ((PosterMap) map).getRowCount());
+ {
+ PosterMap poster = (PosterMap) map;
+ if(poster.hasColumnData())
+ {
+ setDataShape(poster.getColumnCount(), poster.getRowCount());
+ }
+ else
+ {
+ setData(ArrayUtils.toObject(poster.getMapsIDs()));
+ }
+ }
else
- setData(null); // Fallback to the empty view item.
+ {
+ setDataShape(1,1);
+ }
action("rename", getSize() - 7, new ItemStackBuilder(Material.BOOK_AND_QUILL)
- .title(I.t("{blue}Rename this image"))
- .longLore(I.t("{gray}Click here to rename this image; this is used for your own organization."))
+ .title(I.t(getPlayerLocale(), "{blue}Rename this image"))
+ .longLore(I.t(getPlayerLocale(), "{gray}Click here to rename this image; this is used for your own organization."))
);
action("delete", getSize() - 6, new ItemStackBuilder(Material.BARRIER)
- .title(I.t("{red}Delete this image"))
- .longLore(I.t("{gray}Deletes this map {white}forever{gray}. This action cannot be undone!"))
+ .title(I.t(getPlayerLocale(), "{red}Delete this image"))
+ .longLore(I.t(getPlayerLocale(), "{gray}Deletes this map {white}forever{gray}. This action cannot be undone!"))
.loreLine()
- .longLore(I.t("{gray}You will be asked to confirm your choice if you click here."))
+ .longLore(I.t(getPlayerLocale(), "{gray}You will be asked to confirm your choice if you click here."))
);
@@ -117,8 +153,8 @@ public class MapDetailGui extends ExplorerGui
backSlot++;
action("back", backSlot, new ItemStackBuilder(Material.EMERALD)
- .title(I.t("{green}« Back"))
- .lore(I.t("{gray}Go back to the list."))
+ .title(I.t(getPlayerLocale(), "{green}« Back"))
+ .lore(I.t(getPlayerLocale(), "{gray}Go back to the list."))
);
}
@@ -133,12 +169,12 @@ public class MapDetailGui extends ExplorerGui
{
if (newName == null || newName.isEmpty())
{
- getPlayer().sendMessage(I.t("{ce}Map names can't be empty."));
+ I.sendT(getPlayer(), "{ce}Map names can't be empty.");
return;
}
map.rename(newName);
- getPlayer().sendMessage(I.t("{cs}Map successfully renamed."));
+ I.sendT(getPlayer(), "{cs}Map successfully renamed.");
}
}, map.getName(), this);
}
diff --git a/src/main/java/fr/moribus/imageonmap/gui/MapListGui.java b/src/main/java/fr/moribus/imageonmap/gui/MapListGui.java
index f8b70a7..c8e50ea 100644
--- a/src/main/java/fr/moribus/imageonmap/gui/MapListGui.java
+++ b/src/main/java/fr/moribus/imageonmap/gui/MapListGui.java
@@ -39,23 +39,35 @@ public class MapListGui extends ExplorerGui
{
String mapDescription;
if (map instanceof SingleMap)
+ {
/// Displayed subtitle description of a single map on the list GUI
- mapDescription = I.t("{white}Single map");
+ mapDescription = I.t(getPlayerLocale(), "{white}Single map");
+ }
else
- /// Displayed subtitle description of a poster map on the list GUI (columns × rows in english)
- mapDescription = I.t("{white}Poster map ({0} × {1})", ((PosterMap) map).getColumnCount(), ((PosterMap) map).getRowCount());
-
+ {
+ PosterMap poster = (PosterMap) map;
+ if(poster.hasColumnData())
+ {
+ /// Displayed subtitle description of a poster map on the list GUI (columns × rows in english)
+ mapDescription = I.t(getPlayerLocale(), "{white}Poster map ({0} × {1})", poster.getColumnCount(), poster.getRowCount());
+ }
+ else
+ {
+ /// Displayed subtitle description of a poster map without column data on the list GUI
+ mapDescription = I.t(getPlayerLocale(), "{white}Poster map ({0} parts)", poster.getMapCount());
+ }
+ }
return new ItemStackBuilder(Material.MAP)
/// Displayed title of a map on the list GUI
- .title(I.t("{green}{bold}{0}", map.getName()))
+ .title(I.t(getPlayerLocale(), "{green}{bold}{0}", map.getName()))
.lore(mapDescription)
.loreLine()
/// Map ID displayed in the tooltip of a map on the list GUI
- .lore(I.t("{gray}Map ID: {0}", map.getId()))
+ .lore(I.t(getPlayerLocale(), "{gray}Map ID: {0}", map.getId()))
.loreLine()
- .lore(I.t("{gray}» {white}Left-click{gray} to get this map"))
- .lore(I.t("{gray}» {white}Right-click{gray} for details and options"))
+ .lore(I.t(getPlayerLocale(), "{gray}» {white}Left-click{gray} to get this map"))
+ .lore(I.t(getPlayerLocale(), "{gray}» {white}Right-click{gray} for details and options"))
.item();
}
@@ -64,8 +76,8 @@ public class MapListGui extends ExplorerGui
protected ItemStack getEmptyViewItem()
{
return new ItemStackBuilder(Material.BARRIER)
- .title(I.t("{red}You don't have any map."))
- .longLore(I.t("{gray}Get started by creating a new one using {white}/tomap [resize]{gray}!"))
+ .title(I.t(getPlayerLocale(), "{red}You don't have any map."))
+ .longLore(I.t(getPlayerLocale(), "{gray}Get started by creating a new one using {white}/tomap [resize]{gray}!"))
.item();
}
@@ -84,7 +96,13 @@ public class MapListGui extends ExplorerGui
}
else if (map instanceof PosterMap)
{
- return SplatterMapManager.makeSplatterMap((PosterMap) map);
+ PosterMap poster = (PosterMap) map;
+
+ if(poster.hasColumnData())
+ return SplatterMapManager.makeSplatterMap((PosterMap) map);
+
+ MapItemManager.giveParts(getPlayer(), poster);
+ return null;
}
MapItemManager.give(getPlayer(), map);
@@ -97,7 +115,7 @@ public class MapListGui extends ExplorerGui
ImageMap[] maps = MapManager.getMaps(getPlayer().getUniqueId());
setData(maps);
/// The maps list GUI title
- setTitle(I.t("{black}Your maps {reset}({0})", maps.length));
+ setTitle(I.t(getPlayerLocale(), "{black}Your maps {reset}({0})", maps.length));
setKeepHorizontalScrollingSpace(true);
@@ -126,24 +144,24 @@ public class MapListGui extends ExplorerGui
double percentageUsed = mapPartLeft < 0 ? 0 : ((double) mapPartCount) / ((double) (mapPartCount + mapPartLeft)) * 100;
ItemStackBuilder statistics = new ItemStackBuilder(Material.ENCHANTED_BOOK)
- .title(I.t("{blue}Usage statistics"))
+ .title(I.t(getPlayerLocale(), "{blue}Usage statistics"))
.loreLine()
- .lore(I.tn("{white}{0}{gray} image rendered", "{white}{0}{gray} images rendered", imagesCount))
- .lore(I.tn("{white}{0}{gray} Minecraft map used", "{white}{0}{gray} Minecraft maps used", mapPartCount));
+ .lore(I.tn(getPlayerLocale(), "{white}{0}{gray} image rendered", "{white}{0}{gray} images rendered", imagesCount))
+ .lore(I.tn(getPlayerLocale(), "{white}{0}{gray} Minecraft map used", "{white}{0}{gray} Minecraft maps used", mapPartCount));
if(mapPartLeft >= 0)
{
statistics
- .lore("", I.t("{blue}Minecraft maps limits"), "")
+ .lore("", I.t(getPlayerLocale(), "{blue}Minecraft maps limits"), "")
.lore(mapGlobalLimit == 0
- ? I.t("{gray}Server-wide limit: {white}unlimited")
- : I.t("{gray}Server-wide limit: {white}{0}", mapGlobalLimit))
+ ? I.t(getPlayerLocale(), "{gray}Server-wide limit: {white}unlimited")
+ : I.t(getPlayerLocale(), "{gray}Server-wide limit: {white}{0}", mapGlobalLimit))
.lore(mapPersonalLimit == 0
- ? I.t("{gray}Per-player limit: {white}unlimited")
- : I.t("{gray}Per-player limit: {white}{0}", mapPersonalLimit))
+ ? I.t(getPlayerLocale(), "{gray}Per-player limit: {white}unlimited")
+ : I.t(getPlayerLocale(), "{gray}Per-player limit: {white}{0}", mapPersonalLimit))
.loreLine()
- .lore(I.t("{white}{0} %{gray} of your quota used", (int) Math.rint(percentageUsed)))
- .lore(I.tn("{white}{0}{gray} map left", "{white}{0}{gray} maps left", mapPartLeft));
+ .lore(I.t(getPlayerLocale(), "{white}{0} %{gray} of your quota used", (int) Math.rint(percentageUsed)))
+ .lore(I.tn(getPlayerLocale(), "{white}{0}{gray} map left", "{white}{0}{gray} maps left", mapPartLeft));
}
statistics.hideAttributes();
diff --git a/src/main/java/fr/moribus/imageonmap/image/MapInitEvent.java b/src/main/java/fr/moribus/imageonmap/image/MapInitEvent.java
index 4c83978..ca8e078 100644
--- a/src/main/java/fr/moribus/imageonmap/image/MapInitEvent.java
+++ b/src/main/java/fr/moribus/imageonmap/image/MapInitEvent.java
@@ -28,8 +28,10 @@ import org.bukkit.entity.Entity;
import org.bukkit.entity.ItemFrame;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
+import org.bukkit.event.EventPriority;
import org.bukkit.event.Listener;
import org.bukkit.event.inventory.InventoryClickEvent;
+import org.bukkit.event.player.PlayerInteractEntityEvent;
import org.bukkit.event.player.PlayerItemHeldEvent;
import org.bukkit.event.player.PlayerPickupItemEvent;
import org.bukkit.event.world.ChunkLoadEvent;
@@ -95,17 +97,22 @@ public class MapInitEvent implements Listener
}
}
- static protected void initMap(ItemStack item)
+ static public void initMap(ItemStack item)
{
if (item != null && item.getType() == Material.MAP)
{
- MapView map = Bukkit.getMap(item.getDurability());
- initMap(map);
+ initMap(item.getDurability());
}
}
- static protected void initMap(MapView map)
+ static public void initMap(short id)
{
+ initMap(Bukkit.getMap(id));
+ }
+
+ static public void initMap(MapView map)
+ {
+ if(map == null) return;
if(Renderer.isHandled(map)) return;
File imageFile = ImageOnMap.getPlugin().getImageFile(map.getId());
diff --git a/src/main/java/fr/moribus/imageonmap/image/Renderer.java b/src/main/java/fr/moribus/imageonmap/image/Renderer.java
index 8cf4d8a..1aa306f 100644
--- a/src/main/java/fr/moribus/imageonmap/image/Renderer.java
+++ b/src/main/java/fr/moribus/imageonmap/image/Renderer.java
@@ -18,6 +18,7 @@
package fr.moribus.imageonmap.image;
+import fr.zcraft.zlib.tools.PluginLogger;
import java.awt.image.BufferedImage;
import org.bukkit.Bukkit;
import org.bukkit.entity.Player;
@@ -29,6 +30,7 @@ public class Renderer extends MapRenderer
{
static public boolean isHandled(MapView map)
{
+ if(map == null) return false;
for(MapRenderer renderer : map.getRenderers())
{
if(renderer instanceof Renderer) return true;
@@ -46,7 +48,15 @@ public class Renderer extends MapRenderer
static public void installRenderer(BufferedImage image, short mapID)
{
- installRenderer(Bukkit.getMap(mapID)).setImage(image);
+ MapView map = Bukkit.getMap(mapID);
+ if(map == null)
+ {
+ PluginLogger.warning("Could not install renderer for map {0} : the Minecraft map does not exist", mapID);
+ }
+ else
+ {
+ installRenderer(map).setImage(image);
+ }
}
static public Renderer installRenderer(MapView map)
diff --git a/src/main/java/fr/moribus/imageonmap/map/MapManager.java b/src/main/java/fr/moribus/imageonmap/map/MapManager.java
index eb59656..fa58f99 100644
--- a/src/main/java/fr/moribus/imageonmap/map/MapManager.java
+++ b/src/main/java/fr/moribus/imageonmap/map/MapManager.java
@@ -307,6 +307,23 @@ abstract public class MapManager
return mapCount;
}
+ /**
+ * Returns if the given map ID is valid and exists in the current save.
+ * @param mapId the map ID.
+ * @return true if the given map ID is valid and exists in the current save, false otherwise.
+ */
+ static public boolean mapIdExists(short mapId)
+ {
+ try
+ {
+ return Bukkit.getMap(mapId) != null;
+ }
+ catch(Throwable ex)
+ {
+ return false;
+ }
+ }
+
static private PlayerMapStore getPlayerMapStore(UUID playerUUID)
{
PlayerMapStore store;
diff --git a/src/main/java/fr/moribus/imageonmap/map/PlayerMapStore.java b/src/main/java/fr/moribus/imageonmap/map/PlayerMapStore.java
index 54e1f6b..0c8d531 100644
--- a/src/main/java/fr/moribus/imageonmap/map/PlayerMapStore.java
+++ b/src/main/java/fr/moribus/imageonmap/map/PlayerMapStore.java
@@ -223,7 +223,7 @@ public class PlayerMapStore implements ConfigurationSerializable
try { checkMapLimit(0); }
catch(MapManagerException ex)
{
- PluginLogger.warning("Map limit exceeded for player '{0}' ({1} maps loaded)",
+ PluginLogger.warning("Map limit exceeded for player {0} ({1} maps loaded)",
playerUUID.toString(),mapList.size());
}
}
diff --git a/src/main/java/fr/moribus/imageonmap/map/PosterMap.java b/src/main/java/fr/moribus/imageonmap/map/PosterMap.java
index 7b4d17b..37199ef 100644
--- a/src/main/java/fr/moribus/imageonmap/map/PosterMap.java
+++ b/src/main/java/fr/moribus/imageonmap/map/PosterMap.java
@@ -108,13 +108,13 @@ public class PosterMap extends ImageMap
public int getColumnAt(int i)
{
if(columnCount == 0) return 0;
- return (i % columnCount) + 1;
+ return (i % columnCount);
}
public int getRowAt(int i)
{
if(columnCount == 0) return 0;
- return (i / columnCount) + 1;
+ return (i / columnCount);
}
public int getIndexAt(int col, int row)
@@ -140,7 +140,6 @@ public class PosterMap extends ImageMap
{
int x = index % (columnCount);
int y = index / (columnCount);
- System.out.println(x + " : " + (rowCount - y - 1) + " (" + index);
return getMapIdAt(x, rowCount - y - 1);
}
diff --git a/src/main/java/fr/moribus/imageonmap/migration/OldSavedMap.java b/src/main/java/fr/moribus/imageonmap/migration/OldSavedMap.java
index 39d99f3..6751aa9 100644
--- a/src/main/java/fr/moribus/imageonmap/migration/OldSavedMap.java
+++ b/src/main/java/fr/moribus/imageonmap/migration/OldSavedMap.java
@@ -19,6 +19,7 @@
package fr.moribus.imageonmap.migration;
import fr.moribus.imageonmap.map.ImageMap;
+import fr.moribus.imageonmap.map.MapManager;
import fr.moribus.imageonmap.map.SingleMap;
import java.util.ArrayList;
import java.util.List;
@@ -73,6 +74,11 @@ class OldSavedMap
configuration.set(mapName, data);
}
+ public boolean isMapValid()
+ {
+ return MapManager.mapIdExists(mapId);
+ }
+
public short getMapId() {return mapId;}
public String getUserName() {return userName;}
}
diff --git a/src/main/java/fr/moribus/imageonmap/migration/OldSavedPoster.java b/src/main/java/fr/moribus/imageonmap/migration/OldSavedPoster.java
index df7b47c..0c1b7d5 100644
--- a/src/main/java/fr/moribus/imageonmap/migration/OldSavedPoster.java
+++ b/src/main/java/fr/moribus/imageonmap/migration/OldSavedPoster.java
@@ -19,6 +19,7 @@
package fr.moribus.imageonmap.migration;
import fr.moribus.imageonmap.map.ImageMap;
+import fr.moribus.imageonmap.map.MapManager;
import fr.moribus.imageonmap.map.PosterMap;
import java.util.ArrayList;
import java.util.List;
@@ -94,5 +95,16 @@ class OldSavedPoster
}
+ public boolean isMapValid()
+ {
+ for(short mapId : mapsIds)
+ {
+ if(!MapManager.mapIdExists(mapId))
+ return false;
+ }
+ return true;
+ }
+
public String getUserName() {return userName;}
+ public short[] getMapsIds() {return mapsIds;}
}
diff --git a/src/main/java/fr/moribus/imageonmap/migration/V3Migrator.java b/src/main/java/fr/moribus/imageonmap/migration/V3Migrator.java
index ffee2d2..3c37e97 100644
--- a/src/main/java/fr/moribus/imageonmap/migration/V3Migrator.java
+++ b/src/main/java/fr/moribus/imageonmap/migration/V3Migrator.java
@@ -39,9 +39,12 @@ import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.util.ArrayDeque;
import java.util.ArrayList;
+import java.util.Arrays;
import java.util.HashSet;
import java.util.Map;
import java.util.UUID;
+import org.apache.commons.lang.ArrayUtils;
+import org.apache.commons.lang.StringUtils;
/**
* This class represents and executes the ImageOnMap v3.x migration process
@@ -241,7 +244,7 @@ public class V3Migrator implements Runnable
*/
private void backupMapData() throws IOException
{
- PluginLogger.info("Backing up map data before migrating...");
+ PluginLogger.info(I.t("Backing up map data before migrating..."));
if(!backupsPrev3Directory.exists()) backupsPrev3Directory.mkdirs();
if(!backupsPostv3Directory.exists()) backupsPostv3Directory.mkdirs();
@@ -265,7 +268,7 @@ public class V3Migrator implements Runnable
verifiedBackupCopy(mapFile, backupFile);
}
- PluginLogger.info("Backup complete.");
+ PluginLogger.info(I.t("Backup complete."));
}
/**
@@ -301,12 +304,13 @@ public class V3Migrator implements Runnable
try
{
oldPoster = new OldSavedPoster(oldPosters.get(key), key);
- userNamesToFetch.add(oldPoster.getUserName());
postersToMigrate.add(oldPoster);
+ if(!userNamesToFetch.contains(oldPoster.getUserName()))
+ userNamesToFetch.add(oldPoster.getUserName());
}
catch(InvalidConfigurationException ex)
{
- PluginLogger.warning("Could not read poster data for key '{0}'", ex, key);
+ PluginLogger.warning("Could not read poster data for key {0}", ex, key);
}
}
}
@@ -324,6 +328,9 @@ public class V3Migrator implements Runnable
oldMap = new OldSavedMap(oldMaps.get(key));
if(!posterContains(oldMap)) mapsToMigrate.add(oldMap);
+
+ if(!userNamesToFetch.contains(oldMap.getUserName()))
+ userNamesToFetch.add(oldMap.getUserName());
}
catch(InvalidConfigurationException ex)
{
@@ -420,6 +427,8 @@ public class V3Migrator implements Runnable
ArrayDeque remainingMaps = new ArrayDeque<>();
ArrayDeque remainingPosters = new ArrayDeque<>();
+ ArrayDeque missingMapIds = new ArrayDeque<>();
+
UUID playerUUID;
OldSavedMap map;
while(!mapsToMigrate.isEmpty())
@@ -430,6 +439,10 @@ public class V3Migrator implements Runnable
{
remainingMaps.add(map);
}
+ else if(!map.isMapValid())
+ {
+ missingMapIds.add(map.getMapId());
+ }
else
{
MapManager.insertMap(map.toImageMap(playerUUID));
@@ -446,12 +459,23 @@ public class V3Migrator implements Runnable
{
remainingPosters.add(poster);
}
+ else if(!poster.isMapValid())
+ {
+ missingMapIds.addAll(Arrays.asList(ArrayUtils.toObject(poster.getMapsIds())));
+ }
else
{
MapManager.insertMap(poster.toImageMap(playerUUID));
}
}
postersToMigrate.addAll(remainingPosters);
+
+ if(!missingMapIds.isEmpty())
+ {
+ PluginLogger.warning(I.tn("{0} registered minecraft map is missing from the save.", "{0} registered minecraft maps are missing from the save.", missingMapIds.size()));
+ PluginLogger.warning(I.t("These maps will not be migrated, but this could mean the save has been altered or corrupted."));
+ PluginLogger.warning(I.t("The following maps are missing : {0} ", StringUtils.join(missingMapIds, ',')));
+ }
}
private void saveChanges()
diff --git a/src/main/java/fr/moribus/imageonmap/ui/MapItemManager.java b/src/main/java/fr/moribus/imageonmap/ui/MapItemManager.java
index 9131539..6f9309b 100644
--- a/src/main/java/fr/moribus/imageonmap/ui/MapItemManager.java
+++ b/src/main/java/fr/moribus/imageonmap/ui/MapItemManager.java
@@ -31,6 +31,7 @@ import org.bukkit.Material;
import org.bukkit.entity.ItemFrame;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
+import org.bukkit.event.EventPriority;
import org.bukkit.event.Listener;
import org.bukkit.event.entity.EntityDamageByEntityEvent;
import org.bukkit.event.player.PlayerInteractEntityEvent;
@@ -72,9 +73,32 @@ public class MapItemManager implements Listener
static public boolean give(Player player, PosterMap map)
{
+ if(!map.hasColumnData())
+ return giveParts(player, map);
return give(player, SplatterMapManager.makeSplatterMap(map));
}
+ static public boolean giveParts(Player player, PosterMap map)
+ {
+ boolean inventoryFull = false;
+
+ ItemStack mapPartItem;
+ for(int i = 0, c = map.getMapCount(); i < c; i++)
+ {
+ if(map.hasColumnData())
+ {
+ mapPartItem = createMapItem(map, map.getColumnAt(i), map.getRowAt(i));
+ }
+ else
+ {
+ mapPartItem = createMapItem(map, i);
+ }
+ inventoryFull = give(player, mapPartItem) || inventoryFull;
+ }
+
+ return inventoryFull;
+ }
+
static public int giveCache(Player player)
{
Queue cache = getCache(player);
@@ -109,19 +133,26 @@ public class MapItemManager implements Listener
return createMapItem(map.getMapsIDs()[0], map.getName());
}
+ static public ItemStack createMapItem(PosterMap map, int index)
+ {
+ /// The name of a map item given to a player, if splatter maps are not used. 0 = map name; 1 = index.
+ return createMapItem(map.getMapIdAt(index), getMapTitle(map, index));
+ }
+
static public ItemStack createMapItem(PosterMap map, int x, int y)
{
- String mapName;
- if(map.hasColumnData())
- {
- /// The name of a map item given to a player, if splatter maps are not used. 0 = map name; 1 = row; 2 = column.
- mapName = I.t("{0} (row {1}, column {2})", map.getName(), x, y);
- }
- else
- {
- mapName = map.getName();
- }
- return createMapItem(map.getMapIdAt(x, y), mapName);
+ /// The name of a map item given to a player, if splatter maps are not used. 0 = map name; 1 = row; 2 = column.
+ return createMapItem(map.getMapIdAt(x, y), getMapTitle(map, y, x));
+ }
+
+ static public String getMapTitle(PosterMap map, int row, int column)
+ {
+ return I.t("{0} (row {1}, column {2})", map.getName(), row + 1, column + 1);
+ }
+
+ static public String getMapTitle(PosterMap map, int index)
+ {
+ return I.t("{0} (part {1})", map.getName(), index + 1);
}
static public ItemStack createMapItem(short mapID, String text)
@@ -148,10 +179,7 @@ public class MapItemManager implements Listener
{
if(map instanceof PosterMap && ((PosterMap) map).hasColumnData())
{
- return MapItemManager.createMapItem(
- ((PosterMap) map).getMapIdAt(x, y),
- I.t("{0} (row {1}, column {2})", map.getName(), y + 1, x + 1)
- );
+ return MapItemManager.createMapItem((PosterMap) map, x, y);
}
else
{
@@ -191,7 +219,10 @@ public class MapItemManager implements Listener
{
PosterMap poster = (PosterMap) map;
int index = poster.getIndex(item.getDurability());
- return I.t("{0} (row {1}, column {2})", map.getName(), poster.getRowAt(index), poster.getColumnAt(index));
+ if(poster.hasColumnData())
+ return getMapTitle(poster, poster.getRowAt(index), poster.getColumnAt(index));
+
+ return getMapTitle(poster, index);
}
}
@@ -199,10 +230,12 @@ public class MapItemManager implements Listener
{
if(frame.getItem().getType() != Material.AIR) return;
if(!MapManager.managesMap(player.getItemInHand())) return;
+ event.setCancelled(true);
if(SplatterMapManager.hasSplatterAttributes(player.getItemInHand()))
{
- SplatterMapManager.placeSplatterMap(frame, player);
+ if(!SplatterMapManager.placeSplatterMap(frame, player))
+ return;
}
else
{
@@ -210,7 +243,6 @@ public class MapItemManager implements Listener
frame.setItem(is);
}
- event.setCancelled(true);
ItemUtils.consumeItem(player);
}
@@ -225,32 +257,37 @@ public class MapItemManager implements Listener
if(poster != null)
{
event.setCancelled(true);
- if(player.getGameMode() == GameMode.CREATIVE)
- {
- if(!SplatterMapManager.hasSplatterMap(player, poster))
- poster.give(player);
- }
+
+ if(player.getGameMode() != GameMode.CREATIVE || !SplatterMapManager.hasSplatterMap(player, poster))
+ poster.give(player);
+
return;
}
}
if(!MapManager.managesMap(frame.getItem())) return;
- frame.setItem(ItemUtils.setDisplayName(item, getMapTitle(item)));
+
+ frame.setItem(new ItemStackBuilder(item)
+ .title(getMapTitle(item))
+ .hideAttributes()
+ .item());
}
- @EventHandler
+ @EventHandler(priority = EventPriority.HIGHEST)
static public void onEntityDamage(EntityDamageByEntityEvent event)
{
+ if(event.isCancelled()) return;
if(!(event.getEntity() instanceof ItemFrame)) return;
if(!(event.getDamager() instanceof Player)) return;
onItemFrameRemove((ItemFrame)event.getEntity(), (Player)event.getDamager(), event);
}
- @EventHandler
+ @EventHandler(priority = EventPriority.HIGHEST)
static public void onEntityInteract(PlayerInteractEntityEvent event)
{
+ if(event.isCancelled()) return;
if(!(event.getRightClicked() instanceof ItemFrame)) return;
onItemFramePlace((ItemFrame)event.getRightClicked(), event.getPlayer(), event);
diff --git a/src/main/java/fr/moribus/imageonmap/ui/PosterWall.java b/src/main/java/fr/moribus/imageonmap/ui/PosterWall.java
index 4d48812..8db4630 100644
--- a/src/main/java/fr/moribus/imageonmap/ui/PosterWall.java
+++ b/src/main/java/fr/moribus/imageonmap/ui/PosterWall.java
@@ -75,7 +75,7 @@ public class PosterWall
int mapIndex = map.getIndex(mapId);
int x = map.getColumnAt(mapIndex), y = map.getRowAt(mapIndex);
- return getMatchingMapFrames(map, location.clone().add(-x + 1, y - 1));
+ return getMatchingMapFrames(map, location.clone().add(-x, y));
}
static public ItemFrame[] getMatchingMapFrames(PosterMap map, FlatLocation location)
@@ -87,8 +87,6 @@ public class PosterWall
{
for(int x = 0; x < map.getColumnCount(); ++x)
{
- //Location newLocation = WorldUtils.addToLocation(topLeftLocation, x, -y, facing);
- //System.out.println("Checking : " + loc);
int mapIndex = map.getIndexAt(x, y);
ItemFrame frame = getMapFrameAt(loc, map);
if(frame != null) frames[mapIndex] = frame;
diff --git a/src/main/java/fr/moribus/imageonmap/ui/SplatterMapManager.java b/src/main/java/fr/moribus/imageonmap/ui/SplatterMapManager.java
index 9b4c335..ba7b930 100644
--- a/src/main/java/fr/moribus/imageonmap/ui/SplatterMapManager.java
+++ b/src/main/java/fr/moribus/imageonmap/ui/SplatterMapManager.java
@@ -18,6 +18,7 @@
package fr.moribus.imageonmap.ui;
+import fr.moribus.imageonmap.image.MapInitEvent;
import fr.moribus.imageonmap.map.ImageMap;
import fr.moribus.imageonmap.map.MapManager;
import fr.moribus.imageonmap.map.PosterMap;
@@ -105,7 +106,9 @@ abstract public class SplatterMapManager
int i = 0;
for(ItemFrame frame : wall.frames)
{
- frame.setItem(new ItemStack(Material.MAP, 1, poster.getMapIdAtReverseY(i)));
+ short id = poster.getMapIdAtReverseY(i);
+ frame.setItem(new ItemStack(Material.MAP, 1, id));
+ MapInitEvent.initMap(id);
++i;
}
@@ -117,6 +120,7 @@ abstract public class SplatterMapManager
ImageMap map = MapManager.getMap(startFrame.getItem());
if(map == null || !(map instanceof PosterMap)) return null;
PosterMap poster = (PosterMap) map;
+ if(!poster.hasColumnData()) return null;
FlatLocation loc = new FlatLocation(startFrame.getLocation(), startFrame.getFacing());
ItemFrame[] matchingFrames = PosterWall.getMatchingMapFrames(poster, loc, startFrame.getItem().getDurability());
if(matchingFrames == null) return null;
diff --git a/src/main/resources/i18n/en_US.po b/src/main/resources/i18n/en_US.po
new file mode 100644
index 0000000..3a09331
--- /dev/null
+++ b/src/main/resources/i18n/en_US.po
@@ -0,0 +1,589 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR , YEAR.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: \n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2016-07-10 03:07+0200\n"
+"PO-Revision-Date: 2016-07-10 03:08+0200\n"
+"Last-Translator: Adrien Prokopowicz\n"
+"Language-Team: \n"
+"Language: en_US\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n < 1 || n > 1);\n"
+"X-Generator: Poedit 1.8.7.1\n"
+
+#: src/main/java/fr/moribus/imageonmap/commands/IoMCommand.java:40
+msgid "You need to give a map name."
+msgstr "You need to give a map name."
+
+#: src/main/java/fr/moribus/imageonmap/commands/IoMCommand.java:57
+#: src/main/java/fr/moribus/imageonmap/commands/maptool/DeleteNoConfirmCommand.java:51
+msgid "This map does not exist."
+msgstr "This map does not exist."
+
+#: src/main/java/fr/moribus/imageonmap/commands/maptool/DeleteConfirmCommand.java:39
+msgid "You are going to delete"
+msgstr "You are going to delete"
+
+#: src/main/java/fr/moribus/imageonmap/commands/maptool/DeleteConfirmCommand.java:42
+msgid "Are you sure ? "
+msgstr "Are you sure ? "
+
+#: src/main/java/fr/moribus/imageonmap/commands/maptool/DeleteConfirmCommand.java:44
+msgid "[Confirm]"
+msgstr "[Confirm]"
+
+#: src/main/java/fr/moribus/imageonmap/commands/maptool/DeleteConfirmCommand.java:46
+msgid "{red}This map will be deleted {bold}forever{red}!"
+msgstr "{red}This map will be deleted {bold}forever{red}!"
+
+#: src/main/java/fr/moribus/imageonmap/commands/maptool/DeleteNoConfirmCommand.java:46
+msgid "Map successfully deleted."
+msgstr "Map successfully deleted."
+
+#: src/main/java/fr/moribus/imageonmap/commands/maptool/GetCommand.java:38
+msgid "The requested map was too big to fit in your inventory."
+msgstr "The requested map was too big to fit in your inventory."
+
+#: src/main/java/fr/moribus/imageonmap/commands/maptool/GetCommand.java:39
+#: src/main/java/fr/moribus/imageonmap/commands/maptool/NewCommand.java:71
+msgid "Use '/maptool getremaining' to get the remaining maps."
+msgstr "Use '/maptool getremaining' to get the remaining maps."
+
+#: src/main/java/fr/moribus/imageonmap/commands/maptool/GetRemainingCommand.java:38
+msgid "You have no remaining map."
+msgstr "You have no remaining map."
+
+#: src/main/java/fr/moribus/imageonmap/commands/maptool/GetRemainingCommand.java:46
+msgid ""
+"Your inventory is full! Make some space before requesting the remaining maps."
+msgstr ""
+"Your inventory is full! Make some space before requesting the remaining maps."
+
+#: src/main/java/fr/moribus/imageonmap/commands/maptool/GetRemainingCommand.java:50
+#, java-format
+msgid "There is {0} map remaining."
+msgid_plural "There are {0} maps remaining."
+msgstr[0] "There is {0} map remaining."
+msgstr[1] "There are {0} maps remaining."
+
+#: src/main/java/fr/moribus/imageonmap/commands/maptool/ListCommand.java:49
+msgid "No map found."
+msgstr "No map found."
+
+#: src/main/java/fr/moribus/imageonmap/commands/maptool/ListCommand.java:53
+msgid "{white}{bold}{0} map found."
+msgid_plural "{white}{bold}{0} maps found."
+msgstr[0] "{white}{bold}{0} map found."
+msgstr[1] "{white}{bold}{0} maps found."
+
+#: src/main/java/fr/moribus/imageonmap/commands/maptool/ListCommand.java:79
+msgid "{white}Click{gray} to get this map"
+msgstr "{white}Click{gray} to get this map"
+
+#: src/main/java/fr/moribus/imageonmap/commands/maptool/MigrateCommand.java:36
+msgid "A migration process is already running. Check console for details."
+msgstr "A migration process is already running. Check console for details."
+
+#: src/main/java/fr/moribus/imageonmap/commands/maptool/MigrateCommand.java:40
+msgid "Migration started. See console for details."
+msgstr "Migration started. See console for details."
+
+#: src/main/java/fr/moribus/imageonmap/commands/maptool/NewCommand.java:44
+msgid "You must give an URL to take the image from."
+msgstr "You must give an URL to take the image from."
+
+#: src/main/java/fr/moribus/imageonmap/commands/maptool/NewCommand.java:52
+msgid "Invalid URL."
+msgstr "Invalid URL."
+
+#: src/main/java/fr/moribus/imageonmap/commands/maptool/NewCommand.java:61
+msgid "Rendering..."
+msgstr "Rendering..."
+
+#: src/main/java/fr/moribus/imageonmap/commands/maptool/NewCommand.java:67
+msgid "{cst}Rendering finished!"
+msgstr "{cst}Rendering finished!"
+
+#: src/main/java/fr/moribus/imageonmap/commands/maptool/NewCommand.java:70
+msgid "The rendered map was too big to fit in your inventory."
+msgstr "The rendered map was too big to fit in your inventory."
+
+#: src/main/java/fr/moribus/imageonmap/commands/maptool/NewCommand.java:78
+msgid "{ce}Map rendering failed: {0}"
+msgstr "{ce}Map rendering failed: {0}"
+
+#. The title of the map deletion GUI. {0}: map name.
+#: src/main/java/fr/moribus/imageonmap/gui/ConfirmDeleteMapGui.java:102
+msgid "{0} » {black}Confirm deletion"
+msgstr "{0} » {black}Confirm deletion"
+
+#. The title of the map deletion item
+#: src/main/java/fr/moribus/imageonmap/gui/ConfirmDeleteMapGui.java:110
+msgid "{red}You're about to destroy this map..."
+msgstr "{red}You're about to destroy this map..."
+
+#. The end, in the lore, of a title starting with “You're about to destroy this map...”.
+#: src/main/java/fr/moribus/imageonmap/gui/ConfirmDeleteMapGui.java:112
+msgid "{red}...{italic}forever{red}."
+msgstr "{red}...{italic}forever{red}."
+
+#: src/main/java/fr/moribus/imageonmap/gui/ConfirmDeleteMapGui.java:114
+msgid "{gray}Name: {white}{0}"
+msgstr "{gray}Name: {white}{0}"
+
+#: src/main/java/fr/moribus/imageonmap/gui/ConfirmDeleteMapGui.java:115
+msgid "{gray}Map ID: {white}{0}"
+msgstr "{gray}Map ID: {white}{0}"
+
+#: src/main/java/fr/moribus/imageonmap/gui/ConfirmDeleteMapGui.java:116
+msgid "{gray}Maps inside: {white}{0}"
+msgstr "{gray}Maps inside: {white}{0}"
+
+#: src/main/java/fr/moribus/imageonmap/gui/ConfirmDeleteMapGui.java:178
+msgid "{gray}Map successfully deleted."
+msgstr "{gray}Map successfully deleted."
+
+#: src/main/java/fr/moribus/imageonmap/gui/MapDetailGui.java:54
+#: src/main/java/fr/moribus/imageonmap/gui/MapDetailGui.java:71
+msgid "{green}Map part"
+msgstr "{green}Map part"
+
+#: src/main/java/fr/moribus/imageonmap/gui/MapDetailGui.java:55
+msgid "{gray}Column: {white}{0}"
+msgstr "{gray}Column: {white}{0}"
+
+#: src/main/java/fr/moribus/imageonmap/gui/MapDetailGui.java:56
+msgid "{gray}Row: {white}{0}"
+msgstr "{gray}Row: {white}{0}"
+
+#: src/main/java/fr/moribus/imageonmap/gui/MapDetailGui.java:58
+#: src/main/java/fr/moribus/imageonmap/gui/MapDetailGui.java:74
+msgid "{gray}» {white}Click{gray} to get only this part"
+msgstr "{gray}» {white}Click{gray} to get only this part"
+
+#: src/main/java/fr/moribus/imageonmap/gui/MapDetailGui.java:72
+msgid "{gray}Part: {white}{0}"
+msgstr "{gray}Part: {white}{0}"
+
+#. Title of the map details GUI
+#: src/main/java/fr/moribus/imageonmap/gui/MapDetailGui.java:114
+msgid "Your maps » {black}{0}"
+msgstr "Your maps » {black}{0}"
+
+#: src/main/java/fr/moribus/imageonmap/gui/MapDetailGui.java:136
+msgid "{blue}Rename this image"
+msgstr "{blue}Rename this image"
+
+#: src/main/java/fr/moribus/imageonmap/gui/MapDetailGui.java:137
+msgid ""
+"{gray}Click here to rename this image; this is used for your own "
+"organization."
+msgstr ""
+"{gray}Click here to rename this image; this is used for your own "
+"organization."
+
+#: src/main/java/fr/moribus/imageonmap/gui/MapDetailGui.java:141
+msgid "{red}Delete this image"
+msgstr "{red}Delete this image"
+
+#: src/main/java/fr/moribus/imageonmap/gui/MapDetailGui.java:142
+msgid ""
+"{gray}Deletes this map {white}forever{gray}. This action cannot be undone!"
+msgstr ""
+"{gray}Deletes this map {white}forever{gray}. This action cannot be undone!"
+
+#: src/main/java/fr/moribus/imageonmap/gui/MapDetailGui.java:144
+msgid "{gray}You will be asked to confirm your choice if you click here."
+msgstr "{gray}You will be asked to confirm your choice if you click here."
+
+#: src/main/java/fr/moribus/imageonmap/gui/MapDetailGui.java:156
+msgid "{green}« Back"
+msgstr "{green}« Back"
+
+#: src/main/java/fr/moribus/imageonmap/gui/MapDetailGui.java:157
+msgid "{gray}Go back to the list."
+msgstr "{gray}Go back to the list."
+
+#. Displayed subtitle description of a single map on the list GUI
+#: src/main/java/fr/moribus/imageonmap/gui/MapListGui.java:44
+msgid "{white}Single map"
+msgstr "{white}Single map"
+
+#. Displayed subtitle description of a poster map on the list GUI (columns × rows in english)
+#: src/main/java/fr/moribus/imageonmap/gui/MapListGui.java:52
+msgid "{white}Poster map ({0} × {1})"
+msgstr "{white}Poster map ({0} × {1})"
+
+#. Displayed subtitle description of a poster map without column data on the list GUI
+#: src/main/java/fr/moribus/imageonmap/gui/MapListGui.java:57
+msgid "{white}Poster map ({0} parts)"
+msgstr "{white}Poster map ({0} parts)"
+
+#. Displayed title of a map on the list GUI
+#: src/main/java/fr/moribus/imageonmap/gui/MapListGui.java:62
+msgid "{green}{bold}{0}"
+msgstr "{green}{bold}{0}"
+
+#. Map ID displayed in the tooltip of a map on the list GUI
+#: src/main/java/fr/moribus/imageonmap/gui/MapListGui.java:67
+msgid "{gray}Map ID: {0}"
+msgstr "{gray}Map ID: {0}"
+
+#: src/main/java/fr/moribus/imageonmap/gui/MapListGui.java:69
+msgid "{gray}» {white}Left-click{gray} to get this map"
+msgstr "{gray}» {white}Left-click{gray} to get this map"
+
+#: src/main/java/fr/moribus/imageonmap/gui/MapListGui.java:70
+msgid "{gray}» {white}Right-click{gray} for details and options"
+msgstr "{gray}» {white}Right-click{gray} for details and options"
+
+#: src/main/java/fr/moribus/imageonmap/gui/MapListGui.java:79
+msgid "{red}You don't have any map."
+msgstr "{red}You don't have any map."
+
+#: src/main/java/fr/moribus/imageonmap/gui/MapListGui.java:80
+msgid ""
+"{gray}Get started by creating a new one using {white}/tomap [resize]"
+"{gray}!"
+msgstr ""
+"{gray}Get started by creating a new one using {white}/tomap [resize]"
+"{gray}!"
+
+#. The maps list GUI title
+#: src/main/java/fr/moribus/imageonmap/gui/MapListGui.java:119
+msgid "{black}Your maps {reset}({0})"
+msgstr "{black}Your maps {reset}({0})"
+
+#: src/main/java/fr/moribus/imageonmap/gui/MapListGui.java:148
+msgid "{blue}Usage statistics"
+msgstr "{blue}Usage statistics"
+
+#: src/main/java/fr/moribus/imageonmap/gui/MapListGui.java:150
+msgid "{white}{0}{gray} image rendered"
+msgid_plural "{white}{0}{gray} images rendered"
+msgstr[0] "{white}{0}{gray} image rendered"
+msgstr[1] "{white}{0}{gray} images rendered"
+
+#: src/main/java/fr/moribus/imageonmap/gui/MapListGui.java:151
+msgid "{white}{0}{gray} Minecraft map used"
+msgid_plural "{white}{0}{gray} Minecraft maps used"
+msgstr[0] "{white}{0}{gray} Minecraft map used"
+msgstr[1] "{white}{0}{gray} Minecraft maps used"
+
+#: src/main/java/fr/moribus/imageonmap/gui/MapListGui.java:156
+msgid "{blue}Minecraft maps limits"
+msgstr "{blue}Minecraft maps limits"
+
+#: src/main/java/fr/moribus/imageonmap/gui/MapListGui.java:158
+msgid "{gray}Server-wide limit: {white}unlimited"
+msgstr "{gray}Server-wide limit: {white}unlimited"
+
+#: src/main/java/fr/moribus/imageonmap/gui/MapListGui.java:159
+msgid "{gray}Server-wide limit: {white}{0}"
+msgstr "{gray}Server-wide limit: {white}{0}"
+
+#: src/main/java/fr/moribus/imageonmap/gui/MapListGui.java:161
+msgid "{gray}Per-player limit: {white}unlimited"
+msgstr "{gray}Per-player limit: {white}unlimited"
+
+#: src/main/java/fr/moribus/imageonmap/gui/MapListGui.java:162
+msgid "{gray}Per-player limit: {white}{0}"
+msgstr "{gray}Per-player limit: {white}{0}"
+
+#: src/main/java/fr/moribus/imageonmap/gui/MapListGui.java:164
+msgid "{white}{0} %{gray} of your quota used"
+msgstr "{white}{0} %{gray} of your quota used"
+
+#: src/main/java/fr/moribus/imageonmap/gui/MapListGui.java:165
+msgid "{white}{0}{gray} map left"
+msgid_plural "{white}{0}{gray} maps left"
+msgstr[0] "{white}{0}{gray} map left"
+msgstr[1] "{white}{0}{gray} maps left"
+
+#: src/main/java/fr/moribus/imageonmap/image/ImageRendererExecutor.java:73
+#, java-format
+msgid "HTTP error : {0} {1}"
+msgstr "HTTP error : {0} {1}"
+
+#: src/main/java/fr/moribus/imageonmap/image/ImageRendererExecutor.java:79
+msgid "The given URL is not a valid image"
+msgstr "The given URL is not a valid image"
+
+#. The default display name of a map
+#: src/main/java/fr/moribus/imageonmap/map/ImageMap.java:44
+msgid "Map"
+msgstr "Map"
+
+#: src/main/java/fr/moribus/imageonmap/map/MapManagerException.java:29
+#, java-format
+msgid "You have too many maps (maximum : {0})."
+msgstr "You have too many maps (maximum : {0})."
+
+#: src/main/java/fr/moribus/imageonmap/map/MapManagerException.java:30
+msgid "The server ImageOnMap limit has been reached."
+msgstr "The server ImageOnMap limit has been reached."
+
+#: src/main/java/fr/moribus/imageonmap/map/MapManagerException.java:31
+msgid "The given map does not exist."
+msgstr "The given map does not exist."
+
+#: src/main/java/fr/moribus/imageonmap/migration/MigratorExecutor.java:34
+msgid "Migration is already running."
+msgstr "Migration is already running."
+
+#: src/main/java/fr/moribus/imageonmap/migration/MigratorExecutor.java:50
+msgid "Waiting for migration to finish..."
+msgstr "Waiting for migration to finish..."
+
+#: src/main/java/fr/moribus/imageonmap/migration/MigratorExecutor.java:58
+msgid ""
+"Migration thread has been interrupted while waiting to finish. It may not "
+"have ended correctly."
+msgstr ""
+"Migration thread has been interrupted while waiting to finish. It may not "
+"have ended correctly."
+
+#: src/main/java/fr/moribus/imageonmap/migration/V3Migrator.java:176
+msgid "Error while preparing migration"
+msgstr "Error while preparing migration"
+
+#: src/main/java/fr/moribus/imageonmap/migration/V3Migrator.java:177
+msgid "Aborting migration. No change has been made."
+msgstr "Aborting migration. No change has been made."
+
+#: src/main/java/fr/moribus/imageonmap/migration/V3Migrator.java:189
+msgid "Error while migrating"
+msgstr "Error while migrating"
+
+#: src/main/java/fr/moribus/imageonmap/migration/V3Migrator.java:190
+msgid "Aborting migration. Some changes may already have been made."
+msgstr "Aborting migration. Some changes may already have been made."
+
+#: src/main/java/fr/moribus/imageonmap/migration/V3Migrator.java:191
+msgid ""
+"Before trying to migrate again, you must recover player files from the "
+"backups, and then move the backups away from the plugin directory to avoid "
+"overwriting them."
+msgstr ""
+"Before trying to migrate again, you must recover player files from the "
+"backups, and then move the backups away from the plugin directory to avoid "
+"overwriting them."
+
+#: src/main/java/fr/moribus/imageonmap/migration/V3Migrator.java:203
+msgid "Looking for configuration files to migrate..."
+msgstr "Looking for configuration files to migrate..."
+
+#: src/main/java/fr/moribus/imageonmap/migration/V3Migrator.java:206
+#, java-format
+msgid "Detected former posters file {0}"
+msgstr "Detected former posters file {0}"
+
+#: src/main/java/fr/moribus/imageonmap/migration/V3Migrator.java:209
+#, java-format
+msgid "Detected former maps file {0}"
+msgstr "Detected former maps file {0}"
+
+#: src/main/java/fr/moribus/imageonmap/migration/V3Migrator.java:213
+#: src/main/java/fr/moribus/imageonmap/migration/V3Migrator.java:416
+msgid "There is nothing to migrate. Stopping."
+msgstr "There is nothing to migrate. Stopping."
+
+#: src/main/java/fr/moribus/imageonmap/migration/V3Migrator.java:218
+msgid "Done."
+msgstr "Done."
+
+#: src/main/java/fr/moribus/imageonmap/migration/V3Migrator.java:232
+msgid "Backup directories already exists."
+msgstr "Backup directories already exists."
+
+#: src/main/java/fr/moribus/imageonmap/migration/V3Migrator.java:233
+msgid ""
+"This means that a migration has already been done, or may not have ended "
+"well."
+msgstr ""
+"This means that a migration has already been done, or may not have ended "
+"well."
+
+#: src/main/java/fr/moribus/imageonmap/migration/V3Migrator.java:234
+msgid ""
+"To start a new migration, you must move away the backup directories so they "
+"are not overwritten."
+msgstr ""
+"To start a new migration, you must move away the backup directories so they "
+"are not overwritten."
+
+#: src/main/java/fr/moribus/imageonmap/migration/V3Migrator.java:247
+msgid "Backing up map data before migrating..."
+msgstr "Backing up map data before migrating..."
+
+#: src/main/java/fr/moribus/imageonmap/migration/V3Migrator.java:271
+msgid "Backup complete."
+msgstr "Backup complete."
+
+#: src/main/java/fr/moribus/imageonmap/migration/V3Migrator.java:352
+msgid "Fetching UUIDs from Mojang..."
+msgstr "Fetching UUIDs from Mojang..."
+
+#: src/main/java/fr/moribus/imageonmap/migration/V3Migrator.java:359
+#: src/main/java/fr/moribus/imageonmap/migration/V3Migrator.java:387
+msgid "An error occurred while fetching the UUIDs from Mojang"
+msgstr "An error occurred while fetching the UUIDs from Mojang"
+
+#: src/main/java/fr/moribus/imageonmap/migration/V3Migrator.java:364
+#: src/main/java/fr/moribus/imageonmap/migration/V3Migrator.java:392
+msgid "The migration worker has been interrupted"
+msgstr "The migration worker has been interrupted"
+
+#: src/main/java/fr/moribus/imageonmap/migration/V3Migrator.java:367
+#, java-format
+msgid "Fetching done. {0} UUID have been retrieved."
+msgid_plural "Fetching done. {0} UUIDs have been retrieved."
+msgstr[0] "Fetching done. {0} UUID have been retrieved."
+msgstr[1] "Fetching done. {0} UUIDs have been retrieved."
+
+#: src/main/java/fr/moribus/imageonmap/migration/V3Migrator.java:378
+#, java-format
+msgid "Mojang did not find UUIDs for {0} player at the current time."
+msgid_plural "Mojang did not find UUIDs for {0} players at the current time."
+msgstr[0] "Mojang did not find UUIDs for {0} player at the current time."
+msgstr[1] "Mojang did not find UUIDs for {0} players at the current time."
+
+#: src/main/java/fr/moribus/imageonmap/migration/V3Migrator.java:379
+msgid ""
+"The Mojang servers limit requests rate at one per second, this may take some "
+"time..."
+msgstr ""
+"The Mojang servers limit requests rate at one per second, this may take some "
+"time..."
+
+#: src/main/java/fr/moribus/imageonmap/migration/V3Migrator.java:398
+#, java-format
+msgid "Mojang did not find player data for {0} player"
+msgid_plural "Mojang did not find player data for {0} players"
+msgstr[0] "Mojang did not find player data for {0} player"
+msgstr[1] "Mojang did not find player data for {0} players"
+
+#: src/main/java/fr/moribus/imageonmap/migration/V3Migrator.java:400
+msgid "The following players do not exist or do not have paid accounts :"
+msgstr "The following players do not exist or do not have paid accounts :"
+
+#: src/main/java/fr/moribus/imageonmap/migration/V3Migrator.java:415
+msgid "Mojang could not find any of the registered players."
+msgstr "Mojang could not find any of the registered players."
+
+#: src/main/java/fr/moribus/imageonmap/migration/V3Migrator.java:425
+msgid "Merging map data..."
+msgstr "Merging map data..."
+
+#: src/main/java/fr/moribus/imageonmap/migration/V3Migrator.java:475
+#, java-format
+msgid "{0} registered minecraft map is missing from the save."
+msgid_plural "{0} registered minecraft maps are missing from the save."
+msgstr[0] "{0} registered minecraft map is missing from the save."
+msgstr[1] "{0} registered minecraft maps are missing from the save."
+
+#: src/main/java/fr/moribus/imageonmap/migration/V3Migrator.java:476
+msgid ""
+"These maps will not be migrated, but this could mean the save has been "
+"altered or corrupted."
+msgstr ""
+"These maps will not be migrated, but this could mean the save has been "
+"altered or corrupted."
+
+#: src/main/java/fr/moribus/imageonmap/migration/V3Migrator.java:477
+#, java-format
+msgid "The following maps are missing : {0} "
+msgstr "The following maps are missing : {0} "
+
+#: src/main/java/fr/moribus/imageonmap/migration/V3Migrator.java:483
+msgid "Saving changes..."
+msgstr "Saving changes..."
+
+#: src/main/java/fr/moribus/imageonmap/migration/V3Migrator.java:489
+msgid "Cleaning up old data files..."
+msgstr "Cleaning up old data files..."
+
+#: src/main/java/fr/moribus/imageonmap/migration/V3Migrator.java:496
+msgid "Deleting old map data file..."
+msgstr "Deleting old map data file..."
+
+#: src/main/java/fr/moribus/imageonmap/migration/V3Migrator.java:501
+#, java-format
+msgid "{0} map could not be migrated."
+msgid_plural "{0} maps could not be migrated."
+msgstr[0] "{0} map could not be migrated."
+msgstr[1] "{0} maps could not be migrated."
+
+#: src/main/java/fr/moribus/imageonmap/migration/V3Migrator.java:519
+msgid "Deleting old poster data file..."
+msgstr "Deleting old poster data file..."
+
+#: src/main/java/fr/moribus/imageonmap/migration/V3Migrator.java:524
+#, java-format
+msgid "{0} poster could not be migrated."
+msgid_plural "{0} posters could not be migrated."
+msgstr[0] "{0} poster could not be migrated."
+msgstr[1] "{0} posters could not be migrated."
+
+#: src/main/java/fr/moribus/imageonmap/migration/V3Migrator.java:537
+msgid "Data that has not been migrated will be kept in the old data files."
+msgstr "Data that has not been migrated will be kept in the old data files."
+
+#. The name of a map item given to a player, if splatter maps are not used. 0 = map name; 1 = index.
+#: src/main/java/fr/moribus/imageonmap/ui/MapItemManager.java:139
+#: src/main/java/fr/moribus/imageonmap/ui/MapItemManager.java:215
+#, java-format
+msgid "{0} (part {1})"
+msgstr "{0} (part {1})"
+
+#. The name of a map item given to a player, if splatter maps are not used. 0 = map name; 1 = row; 2 = column.
+#: src/main/java/fr/moribus/imageonmap/ui/MapItemManager.java:145
+#: src/main/java/fr/moribus/imageonmap/ui/MapItemManager.java:213
+#, java-format
+msgid "{0} (row {1}, column {2})"
+msgstr "{0} (row {1}, column {2})"
+
+#: src/main/java/fr/moribus/imageonmap/ui/SplatterMapManager.java:44
+msgid "Splatter Map"
+msgstr "Splatter Map"
+
+#. Title in a splatter map tooltip
+#: src/main/java/fr/moribus/imageonmap/ui/SplatterMapManager.java:48
+msgid "Item frames needed"
+msgstr "Item frames needed"
+
+#. Size of a map stored in a splatter map
+#: src/main/java/fr/moribus/imageonmap/ui/SplatterMapManager.java:50
+#, java-format
+msgid "{0} × {1}"
+msgstr "{0} × {1}"
+
+#. Title in a splatter map tooltip
+#: src/main/java/fr/moribus/imageonmap/ui/SplatterMapManager.java:53
+msgid "How to use this?"
+msgstr "How to use this?"
+
+#: src/main/java/fr/moribus/imageonmap/ui/SplatterMapManager.java:54
+msgid ""
+"Place empty item frames on a wall, enough to host the whole map. Then, right-"
+"click on the bottom-left frame with this map."
+msgstr ""
+"Place empty item frames on a wall, enough to host the whole map. Then, right-"
+"click on the bottom-left frame with this map."
+
+#: src/main/java/fr/moribus/imageonmap/ui/SplatterMapManager.java:56
+msgid ""
+"Shift-click one of the placed maps to remove the whole poster in one shot."
+msgstr ""
+"Shift-click one of the placed maps to remove the whole poster in one shot."
+
+#: src/main/java/fr/moribus/imageonmap/ui/SplatterMapManager.java:101
+msgid "{ce}There is not enough space to place this map ({0} × {1})."
+msgstr "{ce}There is not enough space to place this map ({0} × {1})."
diff --git a/src/main/resources/i18n/fr_FR.po b/src/main/resources/i18n/fr_FR.po
index 643ae82..b4ab74b 100644
--- a/src/main/resources/i18n/fr_FR.po
+++ b/src/main/resources/i18n/fr_FR.po
@@ -7,8 +7,8 @@ msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2016-05-21 20:34+0200\n"
-"PO-Revision-Date: 2016-05-21 20:38+0100\n"
+"POT-Creation-Date: 2016-07-10 00:59+0200\n"
+"PO-Revision-Date: 2016-07-19 16:15+0200\n"
"Last-Translator: Amaury Carrade\n"
"Language-Team: \n"
"Language: fr_FR\n"
@@ -16,11 +16,11 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
-"X-Generator: Poedit 1.7.5\n"
+"X-Generator: Poedit 1.8.8\n"
#: src/main/java/fr/moribus/imageonmap/commands/IoMCommand.java:40
msgid "You need to give a map name."
-msgstr "Vous devez donner un nom à la carte."
+msgstr "Vous devez donner le nom d'une carte."
#: src/main/java/fr/moribus/imageonmap/commands/IoMCommand.java:57
#: src/main/java/fr/moribus/imageonmap/commands/maptool/DeleteNoConfirmCommand.java:51
@@ -33,7 +33,7 @@ msgstr "Vous êtes sur le point de supprimer"
#: src/main/java/fr/moribus/imageonmap/commands/maptool/DeleteConfirmCommand.java:42
msgid "Are you sure ? "
-msgstr "Êtes-vous sûr ?"
+msgstr "Êtes-vous sûr(e) ?"
#: src/main/java/fr/moribus/imageonmap/commands/maptool/DeleteConfirmCommand.java:44
msgid "[Confirm]"
@@ -50,7 +50,7 @@ msgstr "Carte supprimée avec succès."
#: src/main/java/fr/moribus/imageonmap/commands/maptool/GetCommand.java:38
msgid "The requested map was too big to fit in your inventory."
msgstr ""
-"La carte demandée est trop grosse et ne rentre pas dans votre inventaire."
+"La carte demandée est trop grande et ne rentre pas dans votre inventaire."
#: src/main/java/fr/moribus/imageonmap/commands/maptool/GetCommand.java:39
#: src/main/java/fr/moribus/imageonmap/commands/maptool/NewCommand.java:71
@@ -77,13 +77,13 @@ msgstr[1] "Il y a {0} cartes restantes."
#: src/main/java/fr/moribus/imageonmap/commands/maptool/ListCommand.java:49
msgid "No map found."
-msgstr "Aucune carte."
+msgstr "Aucune carte trouvée."
#: src/main/java/fr/moribus/imageonmap/commands/maptool/ListCommand.java:53
msgid "{white}{bold}{0} map found."
msgid_plural "{white}{bold}{0} maps found."
-msgstr[0] "{white}{bold}{0} carte."
-msgstr[1] "{white}{bold}{0} cartes."
+msgstr[0] "{white}{bold}{0} carte trouvée."
+msgstr[1] "{white}{bold}{0} cartes trouvées."
#: src/main/java/fr/moribus/imageonmap/commands/maptool/ListCommand.java:79
msgid "{white}Click{gray} to get this map"
@@ -127,7 +127,7 @@ msgstr "{ce}Impossible de faire le rendu de la carte : {0}"
#. The title of the map deletion GUI. {0}: map name.
#: src/main/java/fr/moribus/imageonmap/gui/ConfirmDeleteMapGui.java:102
msgid "{0} » {black}Confirm deletion"
-msgstr "{0} » {black}Confirmation de suppression"
+msgstr "{0} » {black}Confirmez la suppression"
#. The title of the map deletion item
#: src/main/java/fr/moribus/imageonmap/gui/ConfirmDeleteMapGui.java:110
@@ -155,32 +155,38 @@ msgstr "{gray}Cartes : {white}{0}"
msgid "{gray}Map successfully deleted."
msgstr "{gray}Carte supprimée avec succès."
-#: src/main/java/fr/moribus/imageonmap/gui/MapDetailGui.java:53
+#: src/main/java/fr/moribus/imageonmap/gui/MapDetailGui.java:54
+#: src/main/java/fr/moribus/imageonmap/gui/MapDetailGui.java:71
msgid "{green}Map part"
msgstr "{green}Extrait de carte"
-#: src/main/java/fr/moribus/imageonmap/gui/MapDetailGui.java:54
+#: src/main/java/fr/moribus/imageonmap/gui/MapDetailGui.java:55
msgid "{gray}Column: {white}{0}"
msgstr "{gray}Colonne : {white}{0}"
-#: src/main/java/fr/moribus/imageonmap/gui/MapDetailGui.java:55
+#: src/main/java/fr/moribus/imageonmap/gui/MapDetailGui.java:56
msgid "{gray}Row: {white}{0}"
msgstr "{gray}Ligne : {white}{0}"
-#: src/main/java/fr/moribus/imageonmap/gui/MapDetailGui.java:57
+#: src/main/java/fr/moribus/imageonmap/gui/MapDetailGui.java:58
+#: src/main/java/fr/moribus/imageonmap/gui/MapDetailGui.java:74
msgid "{gray}» {white}Click{gray} to get only this part"
msgstr "{gray}» {white}Cliquez{gray} pour récupérer cette partie"
+#: src/main/java/fr/moribus/imageonmap/gui/MapDetailGui.java:72
+msgid "{gray}Part: {white}{0}"
+msgstr "{gray}Partie : {white}{0}"
+
#. Title of the map details GUI
-#: src/main/java/fr/moribus/imageonmap/gui/MapDetailGui.java:90
+#: src/main/java/fr/moribus/imageonmap/gui/MapDetailGui.java:114
msgid "Your maps » {black}{0}"
msgstr "Vos cartes » {black}{0}"
-#: src/main/java/fr/moribus/imageonmap/gui/MapDetailGui.java:100
+#: src/main/java/fr/moribus/imageonmap/gui/MapDetailGui.java:136
msgid "{blue}Rename this image"
msgstr "{blue}Renommer cette image"
-#: src/main/java/fr/moribus/imageonmap/gui/MapDetailGui.java:101
+#: src/main/java/fr/moribus/imageonmap/gui/MapDetailGui.java:137
msgid ""
"{gray}Click here to rename this image; this is used for your own "
"organization."
@@ -199,59 +205,56 @@ msgstr ""
"{gray}Supprime cette carte {white}pour toujours{gray}. Cette action ne peut "
"être annulée !"
-#: src/main/java/fr/moribus/imageonmap/gui/MapDetailGui.java:108
+#: src/main/java/fr/moribus/imageonmap/gui/MapDetailGui.java:144
msgid "{gray}You will be asked to confirm your choice if you click here."
-msgstr "{gray}Une confirmation sera demandée si vous cliquez ici."
+msgstr "{gray}Une confirmation vous sera demandée si vous cliquez ici."
-#: src/main/java/fr/moribus/imageonmap/gui/MapDetailGui.java:120
+#: src/main/java/fr/moribus/imageonmap/gui/MapDetailGui.java:156
msgid "{green}« Back"
msgstr "{green}« Retour"
-#: src/main/java/fr/moribus/imageonmap/gui/MapDetailGui.java:121
+#: src/main/java/fr/moribus/imageonmap/gui/MapDetailGui.java:157
msgid "{gray}Go back to the list."
msgstr "{gray}Retourner à la liste."
-#: src/main/java/fr/moribus/imageonmap/gui/MapDetailGui.java:136
-msgid "{ce}Map names can't be empty."
-msgstr "{ce}Les noms de cartes ne peuvent être vide."
-
-#: src/main/java/fr/moribus/imageonmap/gui/MapDetailGui.java:141
-msgid "{cs}Map successfully renamed."
-msgstr "{cs}Carte renommée avec succès."
-
#. Displayed subtitle description of a single map on the list GUI
-#: src/main/java/fr/moribus/imageonmap/gui/MapListGui.java:43
+#: src/main/java/fr/moribus/imageonmap/gui/MapListGui.java:44
msgid "{white}Single map"
msgstr "{white}Carte unique"
#. Displayed subtitle description of a poster map on the list GUI (columns × rows in english)
-#: src/main/java/fr/moribus/imageonmap/gui/MapListGui.java:46
+#: src/main/java/fr/moribus/imageonmap/gui/MapListGui.java:52
msgid "{white}Poster map ({0} × {1})"
msgstr "{white}Poster ({0} × {1})"
+#. Displayed subtitle description of a poster map without column data on the list GUI
+#: src/main/java/fr/moribus/imageonmap/gui/MapListGui.java:57
+msgid "{white}Poster map ({0} parts)"
+msgstr "{white}Poster ({0} parties)"
+
#. Displayed title of a map on the list GUI
-#: src/main/java/fr/moribus/imageonmap/gui/MapListGui.java:50
+#: src/main/java/fr/moribus/imageonmap/gui/MapListGui.java:62
msgid "{green}{bold}{0}"
msgstr "{green}{bold}{0}"
#. Map ID displayed in the tooltip of a map on the list GUI
-#: src/main/java/fr/moribus/imageonmap/gui/MapListGui.java:55
+#: src/main/java/fr/moribus/imageonmap/gui/MapListGui.java:67
msgid "{gray}Map ID: {0}"
msgstr "{gray}Identifiant : {white}{0}"
-#: src/main/java/fr/moribus/imageonmap/gui/MapListGui.java:57
+#: src/main/java/fr/moribus/imageonmap/gui/MapListGui.java:69
msgid "{gray}» {white}Left-click{gray} to get this map"
-msgstr "{gray}» {white}Cliquez droit{gray} pour récupérer cette carte"
+msgstr "{gray}» {white}Cliquez gauche{gray} pour récupérer cette carte"
-#: src/main/java/fr/moribus/imageonmap/gui/MapListGui.java:58
+#: src/main/java/fr/moribus/imageonmap/gui/MapListGui.java:70
msgid "{gray}» {white}Right-click{gray} for details and options"
-msgstr "{gray}» {white}Cliquez droit{gray} pour détails et options"
+msgstr "{gray}» {white}Cliquez droit{gray} pour des détails et options"
-#: src/main/java/fr/moribus/imageonmap/gui/MapListGui.java:67
+#: src/main/java/fr/moribus/imageonmap/gui/MapListGui.java:79
msgid "{red}You don't have any map."
msgstr "{red}Vous n'avez aucune carte."
-#: src/main/java/fr/moribus/imageonmap/gui/MapListGui.java:68
+#: src/main/java/fr/moribus/imageonmap/gui/MapListGui.java:80
msgid ""
"{gray}Get started by creating a new one using {white}/tomap [resize]"
"{gray}!"
@@ -260,51 +263,51 @@ msgstr ""
"{gray} !"
#. The maps list GUI title
-#: src/main/java/fr/moribus/imageonmap/gui/MapListGui.java:100
+#: src/main/java/fr/moribus/imageonmap/gui/MapListGui.java:119
msgid "{black}Your maps {reset}({0})"
msgstr "{black}Vos cartes {reset}({0})"
-#: src/main/java/fr/moribus/imageonmap/gui/MapListGui.java:129
+#: src/main/java/fr/moribus/imageonmap/gui/MapListGui.java:148
msgid "{blue}Usage statistics"
msgstr "{blue}Statistiques d'utilisation"
-#: src/main/java/fr/moribus/imageonmap/gui/MapListGui.java:131
+#: src/main/java/fr/moribus/imageonmap/gui/MapListGui.java:150
msgid "{white}{0}{gray} image rendered"
msgid_plural "{white}{0}{gray} images rendered"
msgstr[0] "{white}{0}{gray} image rendue"
msgstr[1] "{white}{0}{gray} images rendues"
-#: src/main/java/fr/moribus/imageonmap/gui/MapListGui.java:132
+#: src/main/java/fr/moribus/imageonmap/gui/MapListGui.java:151
msgid "{white}{0}{gray} Minecraft map used"
msgid_plural "{white}{0}{gray} Minecraft maps used"
msgstr[0] "{white}{0}{gray} carte Minecraft utilisée"
msgstr[1] "{white}{0}{gray} cartes Minecraft utilisées"
-#: src/main/java/fr/moribus/imageonmap/gui/MapListGui.java:137
+#: src/main/java/fr/moribus/imageonmap/gui/MapListGui.java:156
msgid "{blue}Minecraft maps limits"
msgstr "{blue}Limites de cartes Minecraft"
-#: src/main/java/fr/moribus/imageonmap/gui/MapListGui.java:139
+#: src/main/java/fr/moribus/imageonmap/gui/MapListGui.java:158
msgid "{gray}Server-wide limit: {white}unlimited"
msgstr "{gray}Limite du serveur : {white}illimité"
-#: src/main/java/fr/moribus/imageonmap/gui/MapListGui.java:140
+#: src/main/java/fr/moribus/imageonmap/gui/MapListGui.java:159
msgid "{gray}Server-wide limit: {white}{0}"
msgstr "{gray}Limite du serveur : {white}{0}"
-#: src/main/java/fr/moribus/imageonmap/gui/MapListGui.java:142
+#: src/main/java/fr/moribus/imageonmap/gui/MapListGui.java:161
msgid "{gray}Per-player limit: {white}unlimited"
msgstr "{gray}Limite individuelle : {white}illimité"
-#: src/main/java/fr/moribus/imageonmap/gui/MapListGui.java:143
+#: src/main/java/fr/moribus/imageonmap/gui/MapListGui.java:162
msgid "{gray}Per-player limit: {white}{0}"
msgstr "{gray}Limite individuelle : {white}{0}"
-#: src/main/java/fr/moribus/imageonmap/gui/MapListGui.java:145
+#: src/main/java/fr/moribus/imageonmap/gui/MapListGui.java:164
msgid "{white}{0} %{gray} of your quota used"
msgstr "{white}{0} %{gray} de votre quota utilisé"
-#: src/main/java/fr/moribus/imageonmap/gui/MapListGui.java:146
+#: src/main/java/fr/moribus/imageonmap/gui/MapListGui.java:165
msgid "{white}{0}{gray} map left"
msgid_plural "{white}{0}{gray} maps left"
msgstr[0] "{white}{0}{gray} carte restante"
@@ -350,66 +353,66 @@ msgid ""
"Migration thread has been interrupted while waiting to finish. It may not "
"have ended correctly."
msgstr ""
-"Le thread a été interrompu durant l'attente de la fin de la migration. Cette "
-"dernière pourrait s'être achevée anormalement."
+"Le fil d'exécution (thread) a été interrompu durant l'attente de la fin de "
+"la migration. Cette dernière pourrait ne pas s'être terminée correctement."
-#: src/main/java/fr/moribus/imageonmap/migration/V3Migrator.java:173
+#: src/main/java/fr/moribus/imageonmap/migration/V3Migrator.java:176
msgid "Error while preparing migration"
msgstr "Une erreur est survenue lors de la préparation de la migration."
-#: src/main/java/fr/moribus/imageonmap/migration/V3Migrator.java:174
+#: src/main/java/fr/moribus/imageonmap/migration/V3Migrator.java:177
msgid "Aborting migration. No change has been made."
msgstr "La migration est annulée. Aucun changement n'a été effectué."
-#: src/main/java/fr/moribus/imageonmap/migration/V3Migrator.java:186
+#: src/main/java/fr/moribus/imageonmap/migration/V3Migrator.java:189
msgid "Error while migrating"
msgstr "Erreur lors de la migration"
-#: src/main/java/fr/moribus/imageonmap/migration/V3Migrator.java:187
+#: src/main/java/fr/moribus/imageonmap/migration/V3Migrator.java:190
msgid "Aborting migration. Some changes may already have been made."
msgstr ""
"La migration est annulée. Certains changements ont pu être effectués malgré "
"tout."
-#: src/main/java/fr/moribus/imageonmap/migration/V3Migrator.java:188
+#: src/main/java/fr/moribus/imageonmap/migration/V3Migrator.java:191
msgid ""
"Before trying to migrate again, you must recover player files from the "
"backups, and then move the backups away from the plugin directory to avoid "
"overwriting them."
msgstr ""
"Avant de re-tenter la migration, vous devez récupérer les fichiers des "
-"joueurs depuis la sauvegarde qu'a été effectuée automatiquement, puis "
+"joueurs depuis la sauvegarde qui a été effectuée automatiquement, puis "
"déplacer les sauvegardes hors du dossier du plugin afin d'éviter de les "
"écraser."
-#: src/main/java/fr/moribus/imageonmap/migration/V3Migrator.java:200
+#: src/main/java/fr/moribus/imageonmap/migration/V3Migrator.java:203
msgid "Looking for configuration files to migrate..."
msgstr "Recherche de fichiers de configuration à migrer..."
-#: src/main/java/fr/moribus/imageonmap/migration/V3Migrator.java:203
+#: src/main/java/fr/moribus/imageonmap/migration/V3Migrator.java:206
#, java-format
msgid "Detected former posters file {0}"
msgstr "Vieux fichier de posters détecté : {0}"
-#: src/main/java/fr/moribus/imageonmap/migration/V3Migrator.java:206
+#: src/main/java/fr/moribus/imageonmap/migration/V3Migrator.java:209
#, java-format
msgid "Detected former maps file {0}"
msgstr "Vieux fichier de carte détecté : {0}"
-#: src/main/java/fr/moribus/imageonmap/migration/V3Migrator.java:210
-#: src/main/java/fr/moribus/imageonmap/migration/V3Migrator.java:409
+#: src/main/java/fr/moribus/imageonmap/migration/V3Migrator.java:213
+#: src/main/java/fr/moribus/imageonmap/migration/V3Migrator.java:416
msgid "There is nothing to migrate. Stopping."
-msgstr "Il n'y a rien à migrer. Le processus est arrêté."
+msgstr "Il n'y a rien à migrer. Arrêt."
-#: src/main/java/fr/moribus/imageonmap/migration/V3Migrator.java:215
+#: src/main/java/fr/moribus/imageonmap/migration/V3Migrator.java:218
msgid "Done."
msgstr "Terminé."
-#: src/main/java/fr/moribus/imageonmap/migration/V3Migrator.java:229
+#: src/main/java/fr/moribus/imageonmap/migration/V3Migrator.java:232
msgid "Backup directories already exists."
-msgstr "Les répertoires de sauvegarde existe déjà."
+msgstr "Les répertoires de sauvegarde existent déjà."
-#: src/main/java/fr/moribus/imageonmap/migration/V3Migrator.java:230
+#: src/main/java/fr/moribus/imageonmap/migration/V3Migrator.java:233
msgid ""
"This means that a migration has already been done, or may not have ended "
"well."
@@ -417,7 +420,7 @@ msgstr ""
"Cela signifie qu'une migration a déjà été faite, ou qu'elle n'a possiblement "
"pas terminé correctement."
-#: src/main/java/fr/moribus/imageonmap/migration/V3Migrator.java:231
+#: src/main/java/fr/moribus/imageonmap/migration/V3Migrator.java:234
msgid ""
"To start a new migration, you must move away the backup directories so they "
"are not overwritten."
@@ -425,36 +428,44 @@ msgstr ""
"Pour démarrer une nouvelle migration, vous devez déplacer les répertoires de "
"sauvegarde afin qu'ils ne soit pas écrasés."
-#: src/main/java/fr/moribus/imageonmap/migration/V3Migrator.java:345
+#: src/main/java/fr/moribus/imageonmap/migration/V3Migrator.java:247
+msgid "Backing up map data before migrating..."
+msgstr "Sauvegarde des données des cartes avant la migration…"
+
+#: src/main/java/fr/moribus/imageonmap/migration/V3Migrator.java:271
+msgid "Backup complete."
+msgstr "Sauvegarde terminée."
+
+#: src/main/java/fr/moribus/imageonmap/migration/V3Migrator.java:352
msgid "Fetching UUIDs from Mojang..."
msgstr "Récupération des UUID depuis Mojang..."
-#: src/main/java/fr/moribus/imageonmap/migration/V3Migrator.java:352
-#: src/main/java/fr/moribus/imageonmap/migration/V3Migrator.java:380
+#: src/main/java/fr/moribus/imageonmap/migration/V3Migrator.java:359
+#: src/main/java/fr/moribus/imageonmap/migration/V3Migrator.java:387
msgid "An error occurred while fetching the UUIDs from Mojang"
msgstr ""
"Une erreur est survenue lors de la récupération des UUIDs depuis Mojang."
-#: src/main/java/fr/moribus/imageonmap/migration/V3Migrator.java:357
-#: src/main/java/fr/moribus/imageonmap/migration/V3Migrator.java:385
+#: src/main/java/fr/moribus/imageonmap/migration/V3Migrator.java:364
+#: src/main/java/fr/moribus/imageonmap/migration/V3Migrator.java:392
msgid "The migration worker has been interrupted"
msgstr "Le processus de migration a été interrompu."
-#: src/main/java/fr/moribus/imageonmap/migration/V3Migrator.java:360
+#: src/main/java/fr/moribus/imageonmap/migration/V3Migrator.java:367
#, java-format
msgid "Fetching done. {0} UUID have been retrieved."
msgid_plural "Fetching done. {0} UUIDs have been retrieved."
msgstr[0] "Récupération achevée. {0} UUID a été retrouvé."
-msgstr[1] "Récupération achevée. {0} UUID ont été retrouvé."
+msgstr[1] "Récupération achevée. {0} UUIDs ont été retrouvés."
-#: src/main/java/fr/moribus/imageonmap/migration/V3Migrator.java:371
+#: src/main/java/fr/moribus/imageonmap/migration/V3Migrator.java:378
#, java-format
msgid "Mojang did not find UUIDs for {0} player at the current time."
msgid_plural "Mojang did not find UUIDs for {0} players at the current time."
msgstr[0] "Mojang n'a pas trouvé d'UUID pour {0} joueur à l'heure actuelle."
msgstr[1] "Mojang n'a pas trouvé d'UUID pour {0} joueurs à l'heure actuelle."
-#: src/main/java/fr/moribus/imageonmap/migration/V3Migrator.java:372
+#: src/main/java/fr/moribus/imageonmap/migration/V3Migrator.java:379
msgid ""
"The Mojang servers limit requests rate at one per second, this may take some "
"time..."
@@ -462,65 +473,94 @@ msgstr ""
"Les serveurs de Mojang limitent les requêtes à une par seconde, cette étape "
"risque de durer un petit moment..."
-#: src/main/java/fr/moribus/imageonmap/migration/V3Migrator.java:391
+#: src/main/java/fr/moribus/imageonmap/migration/V3Migrator.java:398
#, java-format
msgid "Mojang did not find player data for {0} player"
msgid_plural "Mojang did not find player data for {0} players"
-msgstr[0] "Mojang n'a pas trouvé de données pour {0} joueur."
-msgstr[1] "Mojang n'a pas trouvé de données pour {0} joueurs."
+msgstr[0] "Mojang did not find player data for {0} player"
+msgstr[1] "Mojang did not find player data for {0} players"
-#: src/main/java/fr/moribus/imageonmap/migration/V3Migrator.java:393
+#: src/main/java/fr/moribus/imageonmap/migration/V3Migrator.java:400
msgid "The following players do not exist or do not have paid accounts :"
-msgstr "Les joueurs suivant n'existent pas ou n'ont pas de compte payant :"
+msgstr "Les joueurs suivants n'existent pas ou n'ont pas de compte payant :"
-#: src/main/java/fr/moribus/imageonmap/migration/V3Migrator.java:408
+#: src/main/java/fr/moribus/imageonmap/migration/V3Migrator.java:415
msgid "Mojang could not find any of the registered players."
msgstr "Mojang n'a pu trouver aucun des joueurs enregistrés."
-#: src/main/java/fr/moribus/imageonmap/migration/V3Migrator.java:418
+#: src/main/java/fr/moribus/imageonmap/migration/V3Migrator.java:425
msgid "Merging map data..."
msgstr "Fusion des données des cartes..."
-#: src/main/java/fr/moribus/imageonmap/migration/V3Migrator.java:459
+#: src/main/java/fr/moribus/imageonmap/migration/V3Migrator.java:475
+#, java-format
+msgid "{0} registered minecraft map is missing from the save."
+msgid_plural "{0} registered minecraft maps are missing from the save."
+msgstr[0] ""
+"{0} carte Minecraft enregistrée n'a pas été retrouvée dans la sauvegarde."
+msgstr[1] ""
+"{0} cartes Minecraft enregistrées n'ont pas été retrouvées dans la "
+"sauvegarde."
+
+#: src/main/java/fr/moribus/imageonmap/migration/V3Migrator.java:476
+msgid ""
+"These maps will not be migrated, but this could mean the save has been "
+"altered or corrupted."
+msgstr ""
+"Ces cartes ne seront pas migrées, mais cela peut signifier que votre "
+"sauvegarde a été modifiée ou corrompue."
+
+#: src/main/java/fr/moribus/imageonmap/migration/V3Migrator.java:477
+#, java-format
+msgid "The following maps are missing : {0} "
+msgstr "Les cartes suivantes sont manquantes : {0} "
+
+#: src/main/java/fr/moribus/imageonmap/migration/V3Migrator.java:483
msgid "Saving changes..."
msgstr "Sauvegarde des changements..."
-#: src/main/java/fr/moribus/imageonmap/migration/V3Migrator.java:465
+#: src/main/java/fr/moribus/imageonmap/migration/V3Migrator.java:489
msgid "Cleaning up old data files..."
msgstr "Nettoyage des vieux fichiers de données..."
-#: src/main/java/fr/moribus/imageonmap/migration/V3Migrator.java:472
+#: src/main/java/fr/moribus/imageonmap/migration/V3Migrator.java:496
msgid "Deleting old map data file..."
msgstr "Suppression du vieux fichier de données des cartes..."
-#: src/main/java/fr/moribus/imageonmap/migration/V3Migrator.java:477
+#: src/main/java/fr/moribus/imageonmap/migration/V3Migrator.java:501
#, java-format
msgid "{0} map could not be migrated."
msgid_plural "{0} maps could not be migrated."
msgstr[0] "{0} carte n'a pas pu être migrée."
msgstr[1] "{0} cartes n'ont pas pu être migrées."
-#: src/main/java/fr/moribus/imageonmap/migration/V3Migrator.java:495
+#: src/main/java/fr/moribus/imageonmap/migration/V3Migrator.java:519
msgid "Deleting old poster data file..."
msgstr "Suppression du vieux fichier de données des posters..."
-#: src/main/java/fr/moribus/imageonmap/migration/V3Migrator.java:500
+#: src/main/java/fr/moribus/imageonmap/migration/V3Migrator.java:524
#, java-format
msgid "{0} poster could not be migrated."
msgid_plural "{0} posters could not be migrated."
msgstr[0] "{0} poster n'a pas pu être migré."
msgstr[1] "{0} posters n'ont pas pu être migrés."
-#: src/main/java/fr/moribus/imageonmap/migration/V3Migrator.java:513
+#: src/main/java/fr/moribus/imageonmap/migration/V3Migrator.java:537
msgid "Data that has not been migrated will be kept in the old data files."
msgstr ""
"Les données qui n'ont pas été migrées seront conservées dans les vieux "
-"fichiers de donnée."
+"fichiers de données."
+
+#. The name of a map item given to a player, if splatter maps are not used. 0 = map name; 1 = index.
+#: src/main/java/fr/moribus/imageonmap/ui/MapItemManager.java:139
+#: src/main/java/fr/moribus/imageonmap/ui/MapItemManager.java:215
+#, java-format
+msgid "{0} (part {1})"
+msgstr "{0} (partie {1})"
#. The name of a map item given to a player, if splatter maps are not used. 0 = map name; 1 = row; 2 = column.
-#: src/main/java/fr/moribus/imageonmap/ui/MapItemManager.java:118
-#: src/main/java/fr/moribus/imageonmap/ui/MapItemManager.java:153
-#: src/main/java/fr/moribus/imageonmap/ui/MapItemManager.java:194
+#: src/main/java/fr/moribus/imageonmap/ui/MapItemManager.java:145
+#: src/main/java/fr/moribus/imageonmap/ui/MapItemManager.java:213
#, java-format
msgid "{0} (row {1}, column {2})"
msgstr "{0} (ligne {1}, colonne {2})"
@@ -562,3 +602,9 @@ msgstr "Cliquez accroupi l'une des cartes du poster pour le retirer d'un coup."
#: src/main/java/fr/moribus/imageonmap/ui/SplatterMapManager.java:101
msgid "{ce}There is not enough space to place this map ({0} × {1})."
msgstr "{ce}Il n'y a pas assez d'espace pour accueillir ce poster ({0} × {1})."
+
+#~ msgid "{ce}Map names can't be empty."
+#~ msgstr "{ce}Les noms de cartes ne peuvent être vide."
+
+#~ msgid "{cs}Map successfully renamed."
+#~ msgstr "{cs}Carte renommée avec succès."
diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml
index f96bc59..a1acf4b 100644
--- a/src/main/resources/plugin.yml
+++ b/src/main/resources/plugin.yml
@@ -1,6 +1,6 @@
name: ImageOnMap
main: fr.moribus.imageonmap.ImageOnMap
-version: 2.99
+version: 3.0
commands:
tomap: