📄Updates
[a231210] Code Update [12/10/2023]
Skin Compiling, Config.yml
[+]Changed the way the player's skin gets compiled.
(I will be adding a config.yml way sooner or later on picking to allow
mc-skins or blank skin to be used through true/false system)
--------------------------------------------------------------
// Fetch the blank skin from default_skin folder
try {
File blankSkinFile = new File(plugin.getDataFolder(), "default_skin/alex.png");
return ImageIO.read(blankSkinFile);
[...]
--------------------------------------------------------------
[+]Added config.yml which now allows plugin-users to decide how many
accessories a player can overlay/compile before they have to remove
one to be able to put another.
--------------------------------------------------------------
# Wardrobe Clothes Plugin Configuration
# The maximum number of accessory overlays a player can have.
accessories_limit: 3
// Initialize a list to store accessory overlays to be added
List<String> accessoryOverlaysToAdd = new ArrayList<>();
for (String overlayName : overlayNames) {
String newOverlaySubfolder = overlayName.split("/")[0];
if (!"accessories".equals(newOverlaySubfolder)) {
[...]
[b231210] Code Update [12/10/2023]
Added jackets overlays functionality
New function auto-generates the actual non-2nd-layered shirts in a
new folder.
[...]
BufferedImage overlay = ImageIO.read(overlayFile);
for (int x = 0; x < overlay.getWidth(); x++) {
for (int y = 0; y < overlay.getHeight(); y++) {
if (template.getRGB(x, y) == 0x00000000) {
overlay.setRGB(x, y, 0x00000000);
}
}
}
[a231310] Code Update [13/10/2023]
Added lang support
# Wardrobe Clothes Plugin Configuration
# The maximum number of accessory overlays a player can have.
accessories_limit: 3
# Default language for the plugin.
# Supported languages: en, tr
default-language: 'en'
private void loadLanguage() {
File langFile = new File(plugin.getDataFolder() + "/lang", "messages_" + defaultLanguage + ".yml");
if (!langFile.exists()) {
plugin.saveResource("lang/messages_" + defaultLanguage + ".yml", false);
}
YamlConfiguration langConfig = YamlConfiguration.loadConfiguration(langFile);
for (String key : langConfig.getKeys(true)) {
if (!langConfig.isConfigurationSection(key)) {
messages.put(key, langConfig.getString(key));
}
}
}
Last updated