📎
1 file
1,549 chars
📄
pasted-code-1774312953071.txt
txt
24 lines
▶
pasted-code-1774312953071.txt
txt
24 lines
Act as a Senior Java Developer specialized in Paper 1.21.11. Create a high-performance Economy plugin for my server 'SupremeSMP' that links to a Supabase PostgreSQL database.
### 1. JAVA ARCHITECTURE REQUIREMENTS:
- Implement the 'Vault' Economy API so other plugins (Shops, etc.) can use these credits.
- Database: Use JDBC to connect to: "jdbc:postgresql://db.nxshxyfquxteljexolfj.supabase.com:5432/postgres"
- Table: Connect to the existing 'profiles' table.
- Identification: Use 'username' column (Text).
- Balance: Use 'credits' column (Numeric).
- Performance: All SQL operations (Join, Leave, Pay) MUST be 100% Asynchronous using CompletableFuture to ensure 20.0 TPS.
- Caching: Cache the 'credits' value in a ConcurrentHashMap on PlayerJoinEvent so /balance is instant.
### 2. MAVEN POM.XML REQUIREMENTS (CRITICAL):
Provide a complete pom.xml that includes:
- Repository: JitPack (for Vault) and PaperMC.
- Dependency: 'org.postgresql:postgresql' version 42.7.10 (Scope: compile).
- Plugin: 'maven-shade-plugin' version 3.6.1.
- Shading Logic: You MUST "shade" and "relocate" the org.postgresql packages to 'me.shadowvex.supremesmp.libs.postgresql' to prevent conflicts with other plugins.
### 3. PLUGIN FEATURES:
- Command: /balance - Displays "§bCredits: §f[amount]" from the cache.
- Command: /eco - Updates the Supabase table and cache.
- Event: On player quit, push any cached balance changes back to Supabase.
Please provide the Main.java, the VaultConnector class, and the FULL pom.xml code.
KodariMar 24 at 12:43 am 100 (v2)
The generation was stopped before any content could be produced.
Kodari can make mistakes. Review important code before using.
Files
No files in this session
Code