Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,16 @@ In case of maps bigger than 128x128 pixels, you will get them in a bundle.
Clicking with it on top-left corner of item frames will put all maps in correct places.
Works for any item frame on wall, floor or ceiling.

## Permissions
This mod supports permissions via **LuckPerms** (or any Fabric-compatible permission provider)
| Permission Node | Description |
| :--- | :--- |
| `image2map.use` | Master switch to see/use any `/image2map` command. |
| `image2map.create` | Allows creating maps from a URL. |
| `image2map.preview` | Allows using the Preview GUI. |
| `image2map.multimap` | Allows images > 128x128 (Bundles/Quick-Place). |
| `image2map.createfolder`| Allows creating maps from server-side files. |

## Downloads:
- Modrinth: https://modrinth.com/mod/image2map
- Curseforge: https://www.curseforge.com/minecraft/mc-mods/image2map
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-9.2.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-9.4.0-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
15 changes: 7 additions & 8 deletions gradlew

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 13 additions & 12 deletions gradlew.bat

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions src/main/java/space/essem/image2map/Image2Map.java
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,14 @@ private int createMap(CommandContext<CommandSourceStack> context) throws Command
}
}

if (width > 128 || height > 128) {
if (!FabricPermissionBridge.checkPermission(source, id("multimap"), true)) {
source.sendSuccess(() -> Component.literal("You do not have permission to create images larger than 128x128 (Multimaps)!")
.withStyle(ChatFormatting.RED), false);
return null;
}
}

int finalHeight = height;
int finalWidth = width;

Expand Down