From a7f2df1523607263115a0740f4c0cbcb149588b6 Mon Sep 17 00:00:00 2001 From: Oznobys Date: Mon, 14 Jul 2025 16:20:16 +0300 Subject: [PATCH] feature-22-images --- .dockerignore | 7 ++ .gitignore | 6 ++ plugins/ImageFrame-1.8.4.0.jar | 3 + plugins/ImageFrame/config.yml | 190 +++++++++++++++++++++++++++++++++ 4 files changed, 206 insertions(+) create mode 100644 .dockerignore create mode 100644 plugins/ImageFrame-1.8.4.0.jar create mode 100644 plugins/ImageFrame/config.yml diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..0492a7e --- /dev/null +++ b/.dockerignore @@ -0,0 +1,7 @@ + + + +src/plugins/ImageFrame/data +src/plugins/ImageFrame/players +src/plugins/ImageFrame/upload +src/map-color-cache.dat diff --git a/.gitignore b/.gitignore index ed708a8..9ecbffd 100644 --- a/.gitignore +++ b/.gitignore @@ -9,6 +9,12 @@ world_the_end ./.console_history + +src/plugins/ImageFrame/data +src/plugins/ImageFrame/players +src/plugins/ImageFrame/upload +src/map-color-cache.dat + banned-ips.json banned-players.json ops.json diff --git a/plugins/ImageFrame-1.8.4.0.jar b/plugins/ImageFrame-1.8.4.0.jar new file mode 100644 index 0000000..6c4a587 --- /dev/null +++ b/plugins/ImageFrame-1.8.4.0.jar @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a38a71497654813078a2ab3e60b53d8ded0391cd9c11f55b750996a5c95768d0 +size 3733098 diff --git a/plugins/ImageFrame/config.yml b/plugins/ImageFrame/config.yml new file mode 100644 index 0000000..f9cf0bf --- /dev/null +++ b/plugins/ImageFrame/config.yml @@ -0,0 +1,190 @@ +Messages: + Reloaded: '&eImageFrame has been reloaded!' + ImageMapProcessing: '&eImageMap is being processed, please wait!' + # Leave this empty ("") to disable action bar message + ImageMapProcessingActionBar: '&eImageMap &a{Name} &eis being processed{Dots}' + # Leave this empty ("") to disable action bar message + ImageMapQueuedActionBar: '&7ImageMap &a{Name} &eis currently queued ({Position} Remaining)' + ImageMapCreated: '&aImageMap has been created!' + ImageMapRefreshed: '&aImageMap has been refreshed!' + ImageMapDeleted: '&eImageMap had been deleted!' + ImageMapRenamed: '&aImageMap had been renamed!' + ImageMapTogglePaused: '&aToggled ImageMap playback pause!' + ImageMapPlaybackJumpTo: '&aJumped to position at {Seconds} seconds!' + ImageMapPlayerPurge: '&ePurged {Amount} ImageMaps owned by {CreatorName} ({CreatorUUID}) - [{ImageMapNames}]' + SetCreator: '&aImageMap creator of id {ImageID} set to {CreatorName} ({CreatorUUID})' + InvalidOverlayMap: '&cOverlay only works on Vanilla Minecraft maps and without duplicates in selection!' + ImageMapAlreadyQueued: '&cYou already have another ImageMap queued and processing, please wait!' + UnableToLoadMap: '&cImageMap cannot be loaded, there is a problem while reading the image. Contact server administrators to check the server console for more info.' + UnableToChangeImageType: '&cChanging the image type is currently not supported. Please create a new image map instead.' + UnknownError: '&cAn unknown error had occurred.' + ImageOverMaxFileSize: '&cImageMap cannot be loaded as it is over the max file size allowed. ({Size} bytes)' + NotAnImageMap: '&cThat is not an ImageMap' + UploadLink: '&aOpen {URL} on your browser to upload an image, it is valid for 5 minutes.' + UploadExpired: '&cImage upload link had expired, please create a new one.' + URLImageMapInfo: + - '&bImageID: {ImageID}' + - '&aName: {Name}' + - '&eMap Size: {Width} x {Height}' + - '&6Dithering: {DitheringType}' + - '&dCreator: {CreatorName} ({CreatorUUID})' + - '&fAccess: {Access}' + - '&aTime Created: {TimeCreated}' + - '&bMarkers: {Markers}' + - '&eURL: {URL}' + NoPermission: '&cYou do not have permission to do that!' + NoConsole: '&cThis command can only be ran by players!' + PlayerNotFound: '&cThis player cannot be found!' + InvalidUsage: '&cInvalid Usage!' + NotEnoughMaps: '&cYou do not have {Amount} maps!' + Oversize: '&cThat is too big! Max size for a map is {MaxSize}' + URLRestricted: '&cThat URL is restricted and cannot be used to create image maps.' + PlayerCreationLimitReached: '&cYou can only create {Limit} maps at once! Delete some to create new ones' + DuplicateMapName: '&cYou''ve already created an image map with that name!' + MapLookup: '&bList of image maps by {CreatorName} ({CreatorUUID}):' + ItemFrameOccupied: '&cFailed to place or remove some maps on selected ItemFrame, they are either destroyed, replaced, occupied or protected.' + NotEnoughSpace: '&cUnable to place Combined ImageMap as there is not enough room.' + InvalidImageMap: '&cThis image map had likely already been deleted.' + GivenInvisibleFrame: '&aGiven {Amount} invisible item frames to {Player}.' + AccessPermission: + Updated: '&aUpdated access for {PlayerName} ({PlayerUUID}), they now have {Permission} permission.' + Types: + NONE: NONE + GET: GET + MARKER: MARKER + EDIT: EDIT + EDIT_CLONE: EDIT WITH CLONE + ALL: ALL + Selection: + Begin: '&bRight click an Item Frame to select corner 1 and 2' + Clear: '&eLeaving selection mode' + Corner1: '&aSelected Item Frame corner 1' + Corner2: '&aSelected Item Frame corner 2' + Invalid: '&cInvalid selection!' + Oversize: '&cOversize selection! Max size for a map is {MaxSize}' + Success: '&aSelected {Width} x {Height} Item Frames! &eIf any of them are removed/replaced, you will need to select them again.' + NoSelection: '&cYou don''t have a valid selection yet.' + IncorrectSize: '&cYour selection''s size does not match, {Width} x {Height} required.' + Markers: + AddBegin: '&aRight click on an Item Frame containing the map "{Name}" to place marker! &bRun "/imageframe marker cancel" to cancel placement' + AddConfirm: '&aMarker placed!' + Remove: '&eMarker removed!' + Clear: '&eMarkers cleared!' + Cancel: '&eMarker placement cancelled!' + DuplicateName: '&cThere is already a marker with that name!' + NotAMarker: '&cThat is not a valid marker' + NotRenderOnFrameWarning: '&eWarning: This marker type does not render on Item Frames!' + LimitReached: '&cYou can only create {Limit} markers on one map!' + # Date format used where a time based variable is displayed + DateFormat: dd/MM/yyyy HH:mm:ss zzz + Preferences: + Keys: + VIEW_ANIMATED_MAPS: View Animated Maps + Values: + 'TRUE': '&aEnabled' + 'FALSE': '&cDisabled' + UNSET: '&7Unset' + UpdateMessage: '&ePlayer Preference {Preference}&e has been updated to {Value}&e!' + +Settings: + MapItemFormat: '&f{Name} &7({X}, {Y})' + # Whether empty maps are required to create image maps when not in creative + RequireEmptyMaps: true + # Max size of an image map + MaxSize: 30 + # When enabled, Only websites from the list below is allowed to be shown through in-game maps + RestrictImageUrl: + Enabled: false + Whitelist: + - https://i.imgur.com + - http://i.imgur.com + - https://storage.googleapis.com + - http://storage.googleapis.com + - https://cdn.discordapp.com + - http://cdn.discordapp.com + - https://media.discordapp.net + - http://media.discordapp.net + - https://textures.minecraft.net + - http://textures.minecraft.net + # If the image is larger than the defined size, it won't be downloaded for preview + # (In Bytes) + MaxImageFileSize: 30000000 + # If an image takes more than this time to load, it will be rejected + # (In Seconds) + MaxProcessingTime: 60 + # How many images should be processed in parallel + # Updating this option requires a server restart + ParallelProcessingLimit: 1 + # Max amount of image maps a player in the following groups can create + # Setting -1 means unlimited + # To add a player to a group, give the permission "imageframe.createlimit." + # For example "imageframe.createlimit.vip" + # Players with no groups will be treated as "default" unless they have "imageframe.createlimit.unlimited" + PlayerCreationLimit: + default: 10 + vip: 15 + moderator: 20 + # Max amount of markers on an individual map + MapMarkerLimit: 20 + CombinedMapItem: + Name: '&bImageMap &f- &f{Name} &7({Width} x {Height})' + Lore: + - '&aRight Click on Item Frames of size {Width} x {Height} to place ImageMap' + - '' + - '&7ImageID: {ImageID}' + - '&7Creator: {CreatorName} ({CreatorUUID})' + - '&7Time Created: {TimeCreated}' + # How many map packets can be sent to a player in 1/20 of a second + # You can turn this down if you are facing network issues + # However maps might take longer to show to a player + # To disable the rate limit, set to -1 + MapPacketSendingRateLimit: -1 + # Exempt certain map ids from deletion if their ImageFrame map is deleted + # Values can be map ids (For example: "13") or ranges (inclusive) of map ids (For example: "10-13") + ExemptMapIdsFromDeletion: + - '-1' + # This option should only be useful to developers and people who knew what they are doing + MapRenderersContextual: false + # Changing this option requires a restart + HandleAnimatedMapsOnMainThread: false + SendAnimatedMapsOnMainThread: false + # Valid modes are "DYNAMIC" and "MANUAL_PERSISTENT" + # DYNAMIC: load and unload image cache depending on whether a player is viewing + # May use more CPU and image might appear with a slight delay + # MANUAL_PERSISTENT: image cache stay loaded from server start + # May use more memory + # Changing this setting requires a restart + CacheControlMode: DYNAMIC + # Set this to true if you have corrupted 0 size map data in the world folder (not the ImageFrame plugin folder) + # Set this to false if your system's file IO is slow + TryDeleteBlankMapFiles: false +# ImageFrame's convenient upload system where you can upload directly through an embedded web server +UploadService: + # Changing this value requires a restart + Enabled: false + # This is only used for displaying to the end user + DisplayURL: http://change.this.to.your.server.ip.in.the.config + WebServer: + # Address in which the webserver binds to, defaults to 0.0.0.0 + # Use 127.0.0.1 to limit to local access + # Changing this value requires a restart + Host: 0.0.0.0 + # Port in which the webserver is hosted, make sure it is not blocked by your firewall + # Changing this value requires a restart + Port: 8517 +# ImageFrame's built in survival friendly way of making invisible item frames +InvisibleFrame: + # Survival friendly way to get invisible item frames by splashing dropped items with invisibility potions + # Set to -1 for unlimited + # Set to 0 to disable + MaxConversionsPerSplash: 8 + # Should empty invisible item frames glow + # Existing frames are not updated until they are interacted with + GlowEmptyFrames: true + +Hooks: + ViaVersion: + # Enable this if your players below 1.13 is having network issues + DisableSmoothAnimationForLegacyPlayers: false +# Enable update notifications for admins +Updater: true