-
Notifications
You must be signed in to change notification settings - Fork 6
compatibility skinsrestorer
Config Plugins edited this page Sep 3, 2026
·
4 revisions
Vault 2.0 natively integrates with SkinsRestorer to render player heads with their real skin in the /pay GUI menu.
- ✅ Skinned heads in /pay GUI
- ✅ Premium support (Mojang profile)
- ✅ Non-premium support (skins via SkinsRestorer SkinStorage)
- ✅ Live profile via reflection for maximum compatibility
- ✅ Automatic fallback to Steve/Alex head if skin fails
- ✅ Legacy 1.8.8 compatibility via reflection
The PayMenuService manages skin resolution.
// Internal usage example:
@Service
public class PayMenuService {
private final SkinResolver skinResolver;
public ItemStack buildPlayerHead(OfflinePlayer target) {
return skinResolver.resolveHead(target);
}
}| Mode | Description |
|---|---|
| Premium | Uses Player#getPlayerProfile() (1.18+) or native GameProfile |
| Non Premium | Queries SkinsRestorerAPI#getSkinData()
|
| Offline | Bukkit.createInventory.setItemMeta(skullMeta) + setOwningPlayer() |
| Legacy 1.8 | Reflection on NMS GameProfile + PropertyMap
|
// Legacy 1.8.8 compatibility via reflection:
public ItemStack resolveLegacy(UUID uuid, String name) {
try {
Class<?> gameProfileClass = Class.forName("com.mojang.authlib.GameProfile");
Object profile = gameProfileClass
.getConstructor(UUID.class, String.class)
.newInstance(uuid, name);
// Inject texture from SkinsRestorer
Method getSkinData(playerName = skinRestorerAPI.getSkinData(name);
return injectTexture(profile, skinData.getValue(), skinData.getSignature());
SkullMeta meta = (SkullMeta) Bukkit.getItemFactory()
.getItemMeta(Material.SKULL_ITEM);
Field profileField = meta.getClass().getDeclaredField("profile");
profileField.setAccessible(true);
profileField.set(meta, profile);
} catch (Exception e) {
// Fallback to Steve
}
}# config.yml
skins:
use_skinsrestorer: true
fallback_skin: "MHF_Steve"
cache_duration_minutes: 60
live_profile_refresh: truesoftdepend:
- SkinsRestorerif (Bukkit.getPluginManager().isPluginEnabled("SkinsRestorer")) {
SkinsRestorerAPI api = SkinsRestorer.getInstance().getAPI();
skinResolver = new SkinsRestorerSkinResolver(api);
} else {
skinResolver = new DefaultSkinResolver();
}1. User runs /pay <player>
2. PayMenuService opens GUI inventory
3. SkinResolver.resolveHead(targetPlayer)
├─ Premium → GameProfile with Mojang texture
├─ Non Premium → SkinsRestorer SkinData
└─ Fallback → Default head
4. Renders head in confirmation slot
5. User confirms payment
| Issue | Solution |
|---|---|
| Heads without skin in 1.8 | Ensure the server has the correct authlib
|
| Texture does not load on non-premium | Run /sr applyskin <player>
|
| Steve heads in GUI | Verify skins.use_skinsrestorer: true
|
| Lag when opening /pay | Increase cache_duration_minutes
|
Vault Economy v2.1.0 · Compatible with Spigot 1.8.8 – 1.21.x
📦 Modrinth ·
💬 Discord ·
Java 17 (legacy) · Java 21 (modern)
Documentation generated on 2026-09-03 · Vault Project Team
- 🏠 Home
- 🚀 First Install
- 🧑🏫 Getting Started
- ❓ Basic FAQ
- 📋 Complete Command List
- 🛡️ Complete Permission List
- ⚙️ config.yml Reference
- 🌐 Supported Languages
- 🆕 Modrinth Updates
- 💰 Player-to-Player Payments
- 🏦 Bank System
- 💵 Physical Notes
- 💸 Loans
- 📜 Transaction History
- 📊 Top Players
- ⏸️ Offline Payments
- 💳 Charges / Payment Requests
- 🔔 Discord Webhook
- 🛠️ Installation Errors
- 🚫 Players Can't Pay
- 🧨 Balances Wiped on Restart
- 📉 Bank Doesn't Pay Interest
- 🧾 Invalid / Expired Notes
- 🩺 Complete Step-by-Step Troubleshooting
- Java API
- 📜 Skript
- 🧰 Contribute · Dual Maven Build