Skip to content

Commit

Permalink
Added flags documentation
Browse files Browse the repository at this point in the history
- Updated README.md
  • Loading branch information
josemmo committed Dec 27, 2021
1 parent 3e47310 commit 99b9fe4
Showing 1 changed file with 21 additions and 2 deletions.
23 changes: 21 additions & 2 deletions README.md
Expand Up @@ -62,9 +62,9 @@ This plugin adds the following commands:
- `/image clear <x z world> <r> [<placed-by>]`: Remove all placed images in a radius of `r` blocks around an origin.
- `/image describe`: Show detailed information about a placed image.
- `/image download <url> <filename>`: Download an image from a URL and place it in the images directory.
- `/image give <player> <filename> <amount> <width> [<height>]`: Give image items that can be placed later to a player.
- `/image give <player> <filename> <amount> <w> [<h>] [<flags>]`: Give image items that can be placed later to a player.
- `/image list [<page>]`: List all available files in the images directory.
- `/image place <filename> <width> [<height>]`: Place an image of size `width`x`height` blocks.
- `/image place <filename> <w> [<h>] [<flags>]`: Place an image of size `w`x`h` blocks.
- `/image remove`: Remove a placed image from the world without deleting the image file.
- `/image top`: List players with the most placed images.

Expand All @@ -76,10 +76,14 @@ This plugin adds the following commands:
`/image download "https://www.example.com/a/b/c/1234.jpg" imagename.jpg`
- Give 10 image items to "TestPlayer" for the "test.jpg" image (3x5 blocks)\
`/image give TestPlayer test.jpg 10 3 5`
- Give 10 image items to "TestPlayer" that will not drop an image item when removed\
`/image give TestPlayer test.jpg 10 3 5 -DROP`
- Start the dialog to place an image with a width of 3 blocks and auto height\
`/image place imagename.jpg 3`
- Start the dialog to place a 3-blocks wide and 2-blocks high image\
`/image place imagename.jpg 3 2`
- Start the dialog to place an image that glows in the dark\
`/image place imagename.jpg 3 2 +GLOW`
- Start the dialog to remove a placed image while keeping the original file\
`/image remove`
- Remove all placed images in a radius of 5 blocks around the spawn\
Expand Down Expand Up @@ -108,6 +112,21 @@ such as [LuckPerms](https://luckperms.net/) or [GroupManager](https://elgarl.git

Both these plugins have been tested to work with Yamipa, although any similar one should work just fine.

## Flags
Images from this plugin have a set of boolean attributes called "flags" that modify its behavior. Possible values are:

- `ANIM` (animatable): Whether an image should be animated or not, useful when you don't want a GIF image to play.
- `REMO` (removable): Whether an image can be removed by any player by left-clicking it.
- `DROP` (droppable): Whether an image drops an image item when is removed by any player.
- `GLOW` (glowing): Whether an image glows in the dark (only works on Minecraft 1.17 and above).

By default, images placed with the "/image place" command only have the `ANIM` flag.
Similarly, image items issued with the "/image give" command have `ANIM`, `REMO` and `DROP` flags.

Default flags can be modified through the "<flag>" argument.
To add a flag to the default ones use "+{FLAG_NAME}" (e.g. `+GLOW`), and to remove it use "-{FLAG_NAME}" (e.g. `-ANIM`).
You can modify multiple flags separating them with commas (e.g. `+GLOW,-ANIM`).

## How does it work?
As you may have already guessed, Minecraft does not support the placing of image files.
Yamipa bypasses this limitation by using two built-in features (**item frames and maps**) to render custom images.
Expand Down

0 comments on commit 99b9fe4

Please sign in to comment.