Skip to content

Commit ff16410

Browse files
v2.1
1 parent 9fc4564 commit ff16410

26 files changed

Lines changed: 4268 additions & 0 deletions

README.md

Lines changed: 207 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,207 @@
1+
# Resourceloader
2+
3+
A powerful and flexible resource pack management plugin for Minecraft servers. Manage, merge, and distribute resource packs with advanced features for optimization and user experience!
4+
5+
## Features
6+
7+
- Advanced resource pack management system with automatic backups and statistics
8+
- Smart compression system with adaptive compression levels based on player connection
9+
- Merge multiple resource packs with conflict resolution and preview options
10+
- Support for both URL and file-based resource packs
11+
- Automatic resource pack enforcement with customizable actions
12+
- Automatic sync between packs folder and configuration
13+
- Performance optimizations with caching and compression
14+
- GUI interface for pack merging
15+
- Easy-to-use commands with tab completion
16+
- Permission-based access control
17+
- Comprehensive configuration options
18+
19+
## Commands
20+
21+
- `/load` - Load the default server resource pack
22+
- `/load <packname>` - Load a specific resource pack
23+
- `/autoload <clear/packname>` - Automatically loads in the specified pack upon joining
24+
- `/mergepack <output>.zip <pack1> <pack2> [pack3...]` - Merge resource packs
25+
- `/mergegui` - Open the graphical interface for merging packs
26+
- `/removepack <packname>` - Remove a resource pack
27+
- `/listpacks` - List all available resource packs
28+
- `/resourcereload` - Reload the plugin configuration
29+
- `/resourceversion` - Check for plugin updates
30+
- `/clearcache` - Clear the resource pack cache
31+
32+
## Permissions
33+
34+
- `resourceloader.load` - Use the /load command (default: true)
35+
- `resourceloader.list` - Use the /listpacks command (default: true)
36+
- `resourceloader.admin` - Access to all admin commands (default: op)
37+
- `resourceloader.bypass` - Bypass forced resource pack loading (default: op)
38+
39+
## Configuration
40+
41+
```yaml
42+
# ResourceLoader Configuration
43+
# For detailed documentation, visit: https://github.com/DefectiveVortex/Resourceloader
44+
45+
#====================#
46+
# Resource Packs #
47+
#====================#
48+
49+
# The default server resource pack that will be loaded when using /load without arguments
50+
# Examples:
51+
# Local file: "server-pack.zip"
52+
# URL: "https://example.com/server-pack.zip"
53+
server-pack: ""
54+
55+
# Individual resource pack definitions
56+
# Format:
57+
# packname: "filename.zip" # For local files
58+
# packname: "https://..." # For external URLs
59+
resource-packs:
60+
# example1: "pack1.zip"
61+
# example2: "https://example.com/pack2.zip"
62+
63+
# Storage configuration
64+
storage:
65+
# Custom directory for resource packs (absolute path)
66+
# Leave empty to use plugins/ResourceLoader/packs/
67+
resource-pack-directory: ""
68+
69+
# Automatic resource pack detection
70+
auto-detection: true
71+
72+
#====================#
73+
# Server Settings #
74+
#====================#
75+
76+
# Web server configuration for serving resource packs
77+
server:
78+
# The port to serve resource packs on (default: 40021)
79+
port: 40021
80+
81+
# Network settings (advanced)
82+
localhost: false # Set to true only for local testing
83+
address: "" # Leave empty for auto-detection
84+
fallback: localhost # Used if auto-detection fails
85+
86+
#====================#
87+
# Performance #
88+
#====================#
89+
90+
# Resource pack compression settings
91+
compression:
92+
# Enable compression of resource packs
93+
enabled: true
94+
95+
# Compression level selection
96+
auto-select: true # Choose compression based on player's connection
97+
default-level: "medium" # Used when auto-select is false
98+
# Options: "low", "medium", "high"
99+
100+
# Cache settings for downloaded resource packs
101+
cache:
102+
enabled: true
103+
expiry-days: 7 # How long to keep cached packs
104+
auto-cleanup: true # Automatically remove expired cache entries
105+
106+
#====================#
107+
# Pack Management #
108+
#====================#
109+
110+
# Backup configuration
111+
backup:
112+
enabled: true
113+
interval-hours: 24 # Hours between automatic backups
114+
keep-count: 5 # Number of backup files to retain
115+
116+
# Usage statistics and player preferences
117+
statistics:
118+
enabled: true # Track pack usage and performance
119+
save-preferences: true # Remember player's last used packs
120+
max-preferences: 5 # Number of packs to remember per player
121+
122+
#====================#
123+
# User Interface #
124+
#====================#
125+
126+
# GUI settings for the pack merger
127+
gui:
128+
enabled: true
129+
show-preview: true # Show pack preview before merging
130+
conflict-handling: "ask" # How to handle conflicts: "ask", "overwrite", "skip"
131+
132+
#====================#
133+
# Enforcement #
134+
#====================#
135+
136+
# Resource pack enforcement settings
137+
enforcement:
138+
enabled: false
139+
kick-on-decline: true
140+
kick-on-fail: true
141+
restrict:
142+
prevent-interaction: true
143+
# Whether to use vanilla Minecraft's resource pack system by modifying server.properties
144+
# WARNING: This will override any existing resource pack settings in server.properties
145+
use-server-properties: false
146+
# If true, will create a public URL for the pack that doesn't require authentication
147+
# Only used when use-server-properties is true and a local file is used
148+
make-pack-public: false
149+
```
150+
151+
## Installation
152+
153+
1. Download the latest release
154+
2. Place the JAR file in your server's `plugins` folder
155+
3. Start/restart your server
156+
4. A `packs` folder will be created in `plugins/Resourceloader/`
157+
5. Place your resource pack files in the `packs` folder
158+
6. Configure the plugin in `config.yml` (or let it auto-configure)
159+
7. Use `/resourcereload` to apply changes
160+
161+
## Resource Pack Management
162+
163+
### File-based Resource Packs
164+
- Place .zip resource packs in `plugins/Resourceloader/packs/`
165+
- Files are automatically detected and added to configuration
166+
- Configuration keys are generated based on filenames
167+
- Automatic backups are created based on your settings
168+
169+
### URL-based Resource Packs
170+
- Support for direct download URLs
171+
- Automatic caching for better performance
172+
- Smart compression based on player connection quality
173+
- Configurable cache duration and cleanup
174+
175+
### Pack Merging
176+
- Merge multiple packs using command or GUI
177+
- Preview changes before merging
178+
- Configurable conflict resolution
179+
- Maintains pack format compatibility
180+
- Automatic handling of duplicate assets
181+
182+
### Performance Features
183+
- Adaptive compression based on player connection
184+
- Intelligent caching system
185+
- Automatic cleanup of old cache entries
186+
- Optimized pack serving and delivery
187+
188+
### Statistics and Monitoring
189+
- Track pack usage and performance
190+
- Player preference history
191+
- Backup management
192+
- Usage statistics for optimization
193+
194+
## Requirements
195+
196+
- Minecraft 1.13 or newer
197+
- Java 17 or newer
198+
199+
## Support
200+
201+
If you encounter any issues or have suggestions:
202+
- Create an issue on the GitHub repository
203+
- Contact @vortexunwanted on Discord (faster response)
204+
205+
## License
206+
207+
This project is licensed under the MIT License - see the LICENSE file for details.

pom.xml

Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
5+
<modelVersion>4.0.0</modelVersion>
6+
7+
<groupId>org.vortex</groupId>
8+
<artifactId>Resourceloader</artifactId>
9+
<version>2.1</version>
10+
<packaging>jar</packaging>
11+
12+
<name>Resourceloader</name>
13+
<description>A simple resource pack loader for Minecraft servers</description>
14+
15+
<properties>
16+
<java.version>17</java.version>
17+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
18+
</properties>
19+
20+
<build>
21+
<defaultGoal>clean package</defaultGoal>
22+
<plugins>
23+
<plugin>
24+
<groupId>org.apache.maven.plugins</groupId>
25+
<artifactId>maven-compiler-plugin</artifactId>
26+
<version>3.13.0</version>
27+
<configuration>
28+
<release>${java.version}</release>
29+
</configuration>
30+
</plugin>
31+
<plugin>
32+
<groupId>org.apache.maven.plugins</groupId>
33+
<artifactId>maven-shade-plugin</artifactId>
34+
<version>3.5.3</version>
35+
<executions>
36+
<execution>
37+
<phase>package</phase>
38+
<goals>
39+
<goal>shade</goal>
40+
</goals>
41+
<configuration>
42+
<relocations>
43+
<relocation>
44+
<pattern>org.json.simple</pattern>
45+
<shadedPattern>org.vortex.resourceloader.libs.json.simple</shadedPattern>
46+
</relocation>
47+
</relocations>
48+
</configuration>
49+
</execution>
50+
</executions>
51+
</plugin>
52+
</plugins>
53+
<resources>
54+
<resource>
55+
<directory>src/main/resources</directory>
56+
<filtering>true</filtering>
57+
</resource>
58+
</resources>
59+
</build>
60+
61+
<repositories>
62+
<repository>
63+
<id>spigotmc-repo</id>
64+
<url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
65+
</repository>
66+
<repository>
67+
<id>dmulloy2-repo</id>
68+
<url>https://repo.dmulloy2.net/repository/public/</url>
69+
</repository>
70+
</repositories>
71+
72+
<dependencies>
73+
<dependency>
74+
<groupId>org.spigotmc</groupId>
75+
<artifactId>spigot-api</artifactId>
76+
<version>1.21.1-R0.1-SNAPSHOT</version>
77+
<scope>provided</scope>
78+
</dependency>
79+
<dependency>
80+
<groupId>com.googlecode.json-simple</groupId>
81+
<artifactId>json-simple</artifactId>
82+
<version>1.1.1</version>
83+
</dependency>
84+
<dependency>
85+
<groupId>com.google.code.gson</groupId>
86+
<artifactId>gson</artifactId>
87+
<version>2.10.1</version>
88+
</dependency>
89+
<dependency>
90+
<groupId>com.fasterxml.jackson.core</groupId>
91+
<artifactId>jackson-databind</artifactId>
92+
<version>2.15.2</version>
93+
</dependency>
94+
<dependency>
95+
<groupId>commons-io</groupId>
96+
<artifactId>commons-io</artifactId>
97+
<version>2.11.0</version>
98+
</dependency>
99+
<dependency>
100+
<groupId>com.comphenix.protocol</groupId>
101+
<artifactId>ProtocolLib</artifactId>
102+
<version>5.1.0</version>
103+
<scope>provided</scope>
104+
</dependency>
105+
</dependencies>
106+
</project>

0 commit comments

Comments
 (0)