scale) {
- this.filename = filename;
- this.isInvisible = isInvisible;
- this.isFixed = isFixed;
- this.isGlowing = isGlowing;
- this.scale = scale;
- }
-
- /**
- * The file name of the image to be placed
- *
- * @return the file name of the image
- */
- public String getFilename() {
- return filename;
- }
-
- /**
- * Whether the placed item frame will have the "fixed" property set.
- * A fixed frame can't be destroyed or modified by survival players.
- *
- * Only supported in 1.16 or higher!
- *
- * @return whether the placed frames will be fixed or not
- */
- public boolean isFixed() {
- return isFixed;
- }
-
- /**
- * Whether the placed item frame will have the "invisible" property set.
- * An invisible frame won't be rendered, leaving only the item/map visible.
- *
- * Only supported in 1.16 or higher!
- *
- * @return whether the placed frames will be invisible or not
- */
- public boolean isInvisible() {
- return isInvisible;
- }
-
-
- /**
- * Whether the placed item frame will be a glowing one.
- *
- * Only supported in 1.17 or higher!
- *
- * @return whether the placed frames will be a glowing one
- */
- public boolean isGlowing() {
- return isGlowing;
- }
-
- /**
- * The requested size of the image. The actual size might be smaller
- * since the plugin won't modify aspect ratios.
- *
- * Values of -1 stand for the default value of an unscaled map.
- *
- * @return the requested size of the image
- */
- public Tuple getSize() {
- return scale;
- }
-}
+package net.craftcitizen.imagemaps;
+
+import de.craftlancer.core.util.Tuple;
+
+/**
+ * Data associated with placing an image.
+ */
+public class PlacementData {
+
+ private final String filename;
+ private final boolean isInvisible;
+ private final boolean isFixed;
+ private final boolean isGlowing;
+ private final Tuple scale;
+
+ public PlacementData(String filename, boolean isInvisible, boolean isFixed, boolean isGlowing,
+ Tuple scale) {
+ this.filename = filename;
+ this.isInvisible = isInvisible;
+ this.isFixed = isFixed;
+ this.isGlowing = isGlowing;
+ this.scale = scale;
+ }
+
+ /**
+ * The file name of the image to be placed
+ *
+ * @return the file name of the image
+ */
+ public String getFilename() {
+ return filename;
+ }
+
+ /**
+ * Whether the placed item frame will have the "fixed" property set. A fixed frame can't be destroyed or modified by
+ * survival players.
+ *
+ * Only supported in 1.16 or higher!
+ *
+ * @return whether the placed frames will be fixed or not
+ */
+ public boolean isFixed() {
+ return isFixed;
+ }
+
+ /**
+ * Whether the placed item frame will have the "invisible" property set. An invisible frame won't be rendered,
+ * leaving only the item/map visible.
+ *
+ * Only supported in 1.16 or higher!
+ *
+ * @return whether the placed frames will be invisible or not
+ */
+ public boolean isInvisible() {
+ return isInvisible;
+ }
+
+ /**
+ * Whether the placed item frame will be a glowing one.
+ *
+ * Only supported in 1.17 or higher!
+ *
+ * @return whether the placed frames will be a glowing one
+ */
+ public boolean isGlowing() {
+ return isGlowing;
+ }
+
+ /**
+ * The requested size of the image. The actual size might be smaller since the plugin won't modify aspect
+ * ratios.
+ *
+ * Values of -1 stand for the default value of an unscaled map.
+ *
+ * @return the requested size of the image
+ */
+ public Tuple getSize() {
+ return scale;
+ }
+}
diff --git a/src/main/java/net/craftcitizen/imagemaps/PlacementResult.java b/src/main/java/net/craftcitizen/imagemaps/PlacementResult.java
index 8261ed3..1bffc4e 100644
--- a/src/main/java/net/craftcitizen/imagemaps/PlacementResult.java
+++ b/src/main/java/net/craftcitizen/imagemaps/PlacementResult.java
@@ -1,11 +1,11 @@
-package net.craftcitizen.imagemaps;
-
-public enum PlacementResult {
- INVALID_FACING,
- EVENT_CANCELLED,
- INVALID_DIRECTION,
- INSUFFICIENT_WALL,
- INSUFFICIENT_SPACE,
- SUCCESS,
- OVERLAPPING_ENTITY;
-}
+package net.craftcitizen.imagemaps;
+
+public enum PlacementResult {
+ INVALID_FACING,
+ EVENT_CANCELLED,
+ INVALID_DIRECTION,
+ INSUFFICIENT_WALL,
+ INSUFFICIENT_SPACE,
+ SUCCESS,
+ OVERLAPPING_ENTITY;
+}
diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml
index fb1992c..e05205b 100644
--- a/src/main/resources/plugin.yml
+++ b/src/main/resources/plugin.yml
@@ -1,48 +1,52 @@
-main: net.craftcitizen.imagemaps.ImageMaps
-author: SydMontague
-version: ${project.version}
-api-version: 1.13
-name: ImageMaps
-commands:
- imagemap:
- description: ImageMaps plugin commands, place images on walls
- permission-message: You do not have permission to use this command.
- usage: |
- /imagemap place [frameVisible] [frameFixed] [frameGlowing] [size] - starts image placement
- /imagemap download - downloads an image
- /imagemap delete - deletes an image
- /imagemap info - displays image info
- /imagemap reload - reloads an image from disk
- /imagemap list [page] - lists all files in the images folder
- /imagemap help [command] - shows help
-permissions:
- imagemaps.*:
- default: op
- children:
- imagemaps.place: true
- imagemaps.download: true
- imagemaps.delete: true
- imagemaps.info: true
- imagemaps.list: true
- imagemaps.reload: true
- imagemaps.help: true
- imagemaps.toggleFixed: true
- imagemaps.toggleVisible: true
- imagemaps.place:
- default: op
- imagemaps.download:
- default: op
- imagemaps.delete:
- default: op
- imagemaps.info:
- default: op
- imagemaps.list:
- default: op
- imagemaps.reload:
- default: op
- imagemaps.help:
- default: op
- imagemaps.toggleFixed:
- default: op
- imagemaps.toggleVisible:
- default: op
\ No newline at end of file
+main: net.craftcitizen.imagemaps.ImageMaps
+author: SydMontague
+version: ${project.version}
+api-version: 1.13
+name: ImageMaps
+commands:
+ imagemap:
+ description: ImageMaps plugin commands, place images on walls
+ permission-message: You do not have permission to use this command.
+ usage: |
+ /imagemap place [frameVisible] [frameFixed] [frameGlowing] [size] - starts image placement
+ /imagemap download - downloads an image
+ /imagemap delete - deletes an image
+ /imagemap info - displays image info
+ /imagemap reload - reloads an image from disk
+ /imagemap list [page] - lists all files in the images folder
+ /imagemap help [command] - shows help
+permissions:
+ imagemaps.*:
+ default: op
+ children:
+ imagemaps.place: true
+ imagemaps.download: true
+ imagemaps.delete: true
+ imagemaps.info: true
+ imagemaps.list: true
+ imagemaps.reload: true
+ imagemaps.help: true
+ imagemaps.toggleFixed: true
+ imagemaps.toggleVisible: true
+ imagemaps.place:
+ default: op
+ imagemaps.download:
+ default: op
+ imagemaps.delete:
+ default: op
+ imagemaps.info:
+ default: op
+ imagemaps.list:
+ default: op
+ imagemaps.reload:
+ default: op
+ imagemaps.help:
+ default: op
+ imagemaps.toggleFixed:
+ default: op
+ imagemaps.toggleVisible:
+ default: op
+ imagemaps.admin:
+ default: op
+ children:
+ imagemaps.*: true
\ No newline at end of file