From 4e4212e42fce3d7f2e7951d831c4e73afe1bf159 Mon Sep 17 00:00:00 2001 From: kirbykirby56 Date: Sat, 24 Mar 2018 21:05:14 -0400 Subject: [PATCH] Revert to 3d7d2fd Because I screwed up. --- .../fr/moribus/imageonmap/ImageOnMap.java | 22 ++++++------------- .../fr/moribus/imageonmap/Permissions.java | 7 ++---- .../fr/moribus/imageonmap/map/ImageMap.java | 8 +------ .../fr/moribus/imageonmap/map/MapManager.java | 3 +-- .../imageonmap/map/PlayerMapStore.java | 3 +-- src/main/resources/config.yml | 9 -------- src/main/resources/help/maptool.txt | 1 - 7 files changed, 12 insertions(+), 41 deletions(-) diff --git a/src/main/java/fr/moribus/imageonmap/ImageOnMap.java b/src/main/java/fr/moribus/imageonmap/ImageOnMap.java index d210ee3..f16aa90 100644 --- a/src/main/java/fr/moribus/imageonmap/ImageOnMap.java +++ b/src/main/java/fr/moribus/imageonmap/ImageOnMap.java @@ -19,15 +19,12 @@ package fr.moribus.imageonmap; import fr.moribus.imageonmap.commands.maptool.DeleteCommand; -import fr.moribus.imageonmap.commands.maptool.DeleteOtherCommand; -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.ExploreCommand; import fr.moribus.imageonmap.commands.maptool.GetCommand; import fr.moribus.imageonmap.commands.maptool.GetRemainingCommand; -import fr.moribus.imageonmap.commands.maptool.GetOtherCommand; -import fr.moribus.imageonmap.commands.maptool.ExploreCommand; +import fr.moribus.imageonmap.commands.maptool.ListCommand; +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.ImageRendererExecutor; import fr.moribus.imageonmap.image.MapInitEvent; @@ -44,12 +41,12 @@ import fr.zcraft.zlib.tools.PluginLogger; import java.io.File; import java.io.IOException; - public final class ImageOnMap extends ZPlugin { static private final String IMAGES_DIRECTORY_NAME = "images"; static private final String MAPS_DIRECTORY_NAME = "maps"; static private ImageOnMap plugin; + private File imagesDirectory; private final File mapsDirectory; @@ -72,7 +69,6 @@ public final class ImageOnMap extends ZPlugin return new File(imagesDirectory, "map"+mapID+".png"); } - @SuppressWarnings ("unchecked") @Override public void onEnable() @@ -89,12 +85,11 @@ public final class ImageOnMap extends ZPlugin this.setEnabled(false); return; } - - + saveDefaultConfig(); loadComponents(I18n.class, Gui.class, Commands.class, PluginConfiguration.class, ImageIOExecutor.class, ImageRendererExecutor.class); - + //Init all the things ! MetricsLite.startMetrics(); I18n.setPrimaryLocale(PluginConfiguration.LANG.get()); @@ -108,9 +103,6 @@ public final class ImageOnMap extends ZPlugin NewCommand.class, ListCommand.class, GetCommand.class, - GetOtherCommand.class, - ListOtherCommand.class, - DeleteOtherCommand.class, DeleteCommand.class, GetRemainingCommand.class, ExploreCommand.class, diff --git a/src/main/java/fr/moribus/imageonmap/Permissions.java b/src/main/java/fr/moribus/imageonmap/Permissions.java index ba6c552..abaa110 100644 --- a/src/main/java/fr/moribus/imageonmap/Permissions.java +++ b/src/main/java/fr/moribus/imageonmap/Permissions.java @@ -1,5 +1,5 @@ /* - * Copyright or © or Copr. AmauryCarrade (2015) + * Copyright or © or Copr. AmauryCarrade (2015) * * http://amaury.carrade.eu * @@ -38,12 +38,9 @@ public enum Permissions { NEW("imageonmap.new", "imageonmap.userender"), LIST("imageonmap.list"), - LISTOTHER("imageonmap.listother"), GET("imageonmap.get"), - GETOTHER("imageonmap.getother"), RENAME("imageonmap.rename"), DELETE("imageonmap.delete"), - DELETEOTHER("imageonmap.deleteother"), ADMINISTRATIVE("imageonmap.administrative") ; @@ -75,4 +72,4 @@ public enum Permissions return false; } -} \ No newline at end of file +} diff --git a/src/main/java/fr/moribus/imageonmap/map/ImageMap.java b/src/main/java/fr/moribus/imageonmap/map/ImageMap.java index 4f12ca9..bd71fad 100644 --- a/src/main/java/fr/moribus/imageonmap/map/ImageMap.java +++ b/src/main/java/fr/moribus/imageonmap/map/ImageMap.java @@ -18,7 +18,6 @@ package fr.moribus.imageonmap.map; -import fr.moribus.imageonmap.ImageOnMap; import fr.moribus.imageonmap.ui.MapItemManager; import fr.zcraft.zlib.components.i18n.I; import org.bukkit.Material; @@ -27,7 +26,6 @@ import org.bukkit.configuration.serialization.ConfigurationSerializable; import org.bukkit.entity.Player; import org.bukkit.inventory.ItemStack; -import java.io.File; import java.util.HashMap; import java.util.Map; import java.util.UUID; @@ -49,6 +47,7 @@ public abstract class ImageMap implements ConfigurationSerializable private final UUID userUUID; private final Type mapType; private String name; + protected ImageMap(UUID userUUID, Type mapType) { this(userUUID, mapType, null, null); @@ -85,11 +84,6 @@ public abstract class ImageMap implements ConfigurationSerializable return MapItemManager.give(player, this); } - public static File getFullImageFile(short mapIDstart, short mapIDend) - { - return new File(ImageOnMap.getPlugin().getImagesDirectory(), "_"+mapIDstart+"-"+mapIDend+".png"); - } - /* ====== Serialization methods ====== */ static public ImageMap fromConfig(Map map, UUID userUUID) throws InvalidConfigurationException diff --git a/src/main/java/fr/moribus/imageonmap/map/MapManager.java b/src/main/java/fr/moribus/imageonmap/map/MapManager.java index c4aa7bc..fa58f99 100644 --- a/src/main/java/fr/moribus/imageonmap/map/MapManager.java +++ b/src/main/java/fr/moribus/imageonmap/map/MapManager.java @@ -18,13 +18,12 @@ package fr.moribus.imageonmap.map; +import fr.moribus.imageonmap.ImageOnMap; import fr.moribus.imageonmap.PluginConfiguration; import fr.moribus.imageonmap.image.ImageIOExecutor; import fr.moribus.imageonmap.image.PosterImage; import fr.moribus.imageonmap.map.MapManagerException.Reason; import fr.zcraft.zlib.tools.PluginLogger; -import fr.moribus.imageonmap.ImageOnMap; - import org.bukkit.Bukkit; import org.bukkit.Material; import org.bukkit.inventory.Inventory; diff --git a/src/main/java/fr/moribus/imageonmap/map/PlayerMapStore.java b/src/main/java/fr/moribus/imageonmap/map/PlayerMapStore.java index c052165..0c8d531 100644 --- a/src/main/java/fr/moribus/imageonmap/map/PlayerMapStore.java +++ b/src/main/java/fr/moribus/imageonmap/map/PlayerMapStore.java @@ -18,11 +18,10 @@ package fr.moribus.imageonmap.map; +import fr.moribus.imageonmap.ImageOnMap; import fr.moribus.imageonmap.PluginConfiguration; import fr.moribus.imageonmap.map.MapManagerException.Reason; import fr.zcraft.zlib.tools.PluginLogger; -import fr.moribus.imageonmap.ImageOnMap; - import org.bukkit.Material; import org.bukkit.configuration.ConfigurationSection; import org.bukkit.configuration.InvalidConfigurationException; diff --git a/src/main/resources/config.yml b/src/main/resources/config.yml index ab0ed6f..5ffe7d4 100644 --- a/src/main/resources/config.yml +++ b/src/main/resources/config.yml @@ -16,12 +16,3 @@ collect-data: true # 0 means unlimited. map-global-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 \ No newline at end of file diff --git a/src/main/resources/help/maptool.txt b/src/main/resources/help/maptool.txt index b211c1c..8859d51 100644 --- a/src/main/resources/help/maptool.txt +++ b/src/main/resources/help/maptool.txt @@ -3,7 +3,6 @@ new: Creates a new ImageOnMap delete: Deletes a map. delete-noconfirm: Deletes a map. Deletion is permanent and made without confirmation get: Gives you a map. -getother: Gets another player's map. getremaining: Gives you the remaining maps that could not fit in your inventory list: Lists all the map you currently have. explore: Opens a GUI to see and manage your maps.