mirror of
https://github.com/zDevelopers/ImageOnMap.git
synced 2024-11-28 21:15:46 +01:00
parent
f5c3cb2bfd
commit
4e4212e42f
@ -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,
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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<String, Object> map, UUID userUUID) throws InvalidConfigurationException
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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
|
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user