Because I screwed up.
This commit is contained in:
kirbykirby56 2018-03-24 21:05:14 -04:00
parent f5c3cb2bfd
commit 4e4212e42f
7 changed files with 12 additions and 41 deletions

View File

@ -19,15 +19,12 @@
package fr.moribus.imageonmap; package fr.moribus.imageonmap;
import fr.moribus.imageonmap.commands.maptool.DeleteCommand; import fr.moribus.imageonmap.commands.maptool.DeleteCommand;
import fr.moribus.imageonmap.commands.maptool.DeleteOtherCommand; import fr.moribus.imageonmap.commands.maptool.ExploreCommand;
import fr.moribus.imageonmap.commands.maptool.ListCommand;
import fr.moribus.imageonmap.commands.maptool.ListOtherCommand;
import fr.moribus.imageonmap.commands.maptool.MigrateCommand;
import fr.moribus.imageonmap.commands.maptool.NewCommand;
import fr.moribus.imageonmap.commands.maptool.GetCommand; import fr.moribus.imageonmap.commands.maptool.GetCommand;
import fr.moribus.imageonmap.commands.maptool.GetRemainingCommand; import fr.moribus.imageonmap.commands.maptool.GetRemainingCommand;
import fr.moribus.imageonmap.commands.maptool.GetOtherCommand; import fr.moribus.imageonmap.commands.maptool.ListCommand;
import fr.moribus.imageonmap.commands.maptool.ExploreCommand; import fr.moribus.imageonmap.commands.maptool.MigrateCommand;
import fr.moribus.imageonmap.commands.maptool.NewCommand;
import fr.moribus.imageonmap.image.ImageIOExecutor; import fr.moribus.imageonmap.image.ImageIOExecutor;
import fr.moribus.imageonmap.image.ImageRendererExecutor; import fr.moribus.imageonmap.image.ImageRendererExecutor;
import fr.moribus.imageonmap.image.MapInitEvent; import fr.moribus.imageonmap.image.MapInitEvent;
@ -44,12 +41,12 @@ import fr.zcraft.zlib.tools.PluginLogger;
import java.io.File; import java.io.File;
import java.io.IOException; import java.io.IOException;
public final class ImageOnMap extends ZPlugin public final class ImageOnMap extends ZPlugin
{ {
static private final String IMAGES_DIRECTORY_NAME = "images"; static private final String IMAGES_DIRECTORY_NAME = "images";
static private final String MAPS_DIRECTORY_NAME = "maps"; static private final String MAPS_DIRECTORY_NAME = "maps";
static private ImageOnMap plugin; static private ImageOnMap plugin;
private File imagesDirectory; private File imagesDirectory;
private final File mapsDirectory; private final File mapsDirectory;
@ -72,7 +69,6 @@ public final class ImageOnMap extends ZPlugin
return new File(imagesDirectory, "map"+mapID+".png"); return new File(imagesDirectory, "map"+mapID+".png");
} }
@SuppressWarnings ("unchecked") @SuppressWarnings ("unchecked")
@Override @Override
public void onEnable() public void onEnable()
@ -90,7 +86,6 @@ public final class ImageOnMap extends ZPlugin
return; return;
} }
saveDefaultConfig(); saveDefaultConfig();
loadComponents(I18n.class, Gui.class, Commands.class, PluginConfiguration.class, ImageIOExecutor.class, ImageRendererExecutor.class); loadComponents(I18n.class, Gui.class, Commands.class, PluginConfiguration.class, ImageIOExecutor.class, ImageRendererExecutor.class);
@ -108,9 +103,6 @@ public final class ImageOnMap extends ZPlugin
NewCommand.class, NewCommand.class,
ListCommand.class, ListCommand.class,
GetCommand.class, GetCommand.class,
GetOtherCommand.class,
ListOtherCommand.class,
DeleteOtherCommand.class,
DeleteCommand.class, DeleteCommand.class,
GetRemainingCommand.class, GetRemainingCommand.class,
ExploreCommand.class, ExploreCommand.class,

View File

@ -1,5 +1,5 @@
/* /*
* Copyright or © or Copr. AmauryCarrade (2015) * Copyright or © or Copr. AmauryCarrade (2015)
* *
* http://amaury.carrade.eu * http://amaury.carrade.eu
* *
@ -38,12 +38,9 @@ public enum Permissions
{ {
NEW("imageonmap.new", "imageonmap.userender"), NEW("imageonmap.new", "imageonmap.userender"),
LIST("imageonmap.list"), LIST("imageonmap.list"),
LISTOTHER("imageonmap.listother"),
GET("imageonmap.get"), GET("imageonmap.get"),
GETOTHER("imageonmap.getother"),
RENAME("imageonmap.rename"), RENAME("imageonmap.rename"),
DELETE("imageonmap.delete"), DELETE("imageonmap.delete"),
DELETEOTHER("imageonmap.deleteother"),
ADMINISTRATIVE("imageonmap.administrative") ADMINISTRATIVE("imageonmap.administrative")
; ;

View File

@ -18,7 +18,6 @@
package fr.moribus.imageonmap.map; package fr.moribus.imageonmap.map;
import fr.moribus.imageonmap.ImageOnMap;
import fr.moribus.imageonmap.ui.MapItemManager; import fr.moribus.imageonmap.ui.MapItemManager;
import fr.zcraft.zlib.components.i18n.I; import fr.zcraft.zlib.components.i18n.I;
import org.bukkit.Material; import org.bukkit.Material;
@ -27,7 +26,6 @@ import org.bukkit.configuration.serialization.ConfigurationSerializable;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.ItemStack;
import java.io.File;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;
import java.util.UUID; import java.util.UUID;
@ -49,6 +47,7 @@ public abstract class ImageMap implements ConfigurationSerializable
private final UUID userUUID; private final UUID userUUID;
private final Type mapType; private final Type mapType;
private String name; private String name;
protected ImageMap(UUID userUUID, Type mapType) protected ImageMap(UUID userUUID, Type mapType)
{ {
this(userUUID, mapType, null, null); this(userUUID, mapType, null, null);
@ -85,11 +84,6 @@ public abstract class ImageMap implements ConfigurationSerializable
return MapItemManager.give(player, this); return MapItemManager.give(player, this);
} }
public static File getFullImageFile(short mapIDstart, short mapIDend)
{
return new File(ImageOnMap.getPlugin().getImagesDirectory(), "_"+mapIDstart+"-"+mapIDend+".png");
}
/* ====== Serialization methods ====== */ /* ====== Serialization methods ====== */
static public ImageMap fromConfig(Map<String, Object> map, UUID userUUID) throws InvalidConfigurationException static public ImageMap fromConfig(Map<String, Object> map, UUID userUUID) throws InvalidConfigurationException

View File

@ -18,13 +18,12 @@
package fr.moribus.imageonmap.map; package fr.moribus.imageonmap.map;
import fr.moribus.imageonmap.ImageOnMap;
import fr.moribus.imageonmap.PluginConfiguration; import fr.moribus.imageonmap.PluginConfiguration;
import fr.moribus.imageonmap.image.ImageIOExecutor; import fr.moribus.imageonmap.image.ImageIOExecutor;
import fr.moribus.imageonmap.image.PosterImage; import fr.moribus.imageonmap.image.PosterImage;
import fr.moribus.imageonmap.map.MapManagerException.Reason; import fr.moribus.imageonmap.map.MapManagerException.Reason;
import fr.zcraft.zlib.tools.PluginLogger; import fr.zcraft.zlib.tools.PluginLogger;
import fr.moribus.imageonmap.ImageOnMap;
import org.bukkit.Bukkit; import org.bukkit.Bukkit;
import org.bukkit.Material; import org.bukkit.Material;
import org.bukkit.inventory.Inventory; import org.bukkit.inventory.Inventory;

View File

@ -18,11 +18,10 @@
package fr.moribus.imageonmap.map; package fr.moribus.imageonmap.map;
import fr.moribus.imageonmap.ImageOnMap;
import fr.moribus.imageonmap.PluginConfiguration; import fr.moribus.imageonmap.PluginConfiguration;
import fr.moribus.imageonmap.map.MapManagerException.Reason; import fr.moribus.imageonmap.map.MapManagerException.Reason;
import fr.zcraft.zlib.tools.PluginLogger; import fr.zcraft.zlib.tools.PluginLogger;
import fr.moribus.imageonmap.ImageOnMap;
import org.bukkit.Material; import org.bukkit.Material;
import org.bukkit.configuration.ConfigurationSection; import org.bukkit.configuration.ConfigurationSection;
import org.bukkit.configuration.InvalidConfigurationException; import org.bukkit.configuration.InvalidConfigurationException;

View File

@ -16,12 +16,3 @@ collect-data: true
# 0 means unlimited. # 0 means unlimited.
map-global-limit: 0 map-global-limit: 0
map-player-limit: 0 map-player-limit: 0
#Maximum size in pixels for an image to be. 0 is unlimited.
limit-map-size-x: 0
limit-map-size-y: 0
#Should the full image be saved when a map is rendered?
save-full-image: false

View File

@ -3,7 +3,6 @@ new: Creates a new ImageOnMap
delete: Deletes a map. delete: Deletes a map.
delete-noconfirm: Deletes a map. Deletion is permanent and made without confirmation delete-noconfirm: Deletes a map. Deletion is permanent and made without confirmation
get: Gives you a map. get: Gives you a map.
getother: Gets another player's map.
getremaining: Gives you the remaining maps that could not fit in your inventory getremaining: Gives you the remaining maps that could not fit in your inventory
list: Lists all the map you currently have. list: Lists all the map you currently have.
explore: Opens a GUI to see and manage your maps. explore: Opens a GUI to see and manage your maps.