SmartPets Pro icon

SmartPets Pro -----

Pets That Think, Feel, and Live



Multi-Language Support System
SmartPets v2.1.0 - Multi-Language Support System
Release Date: 2026-01-10 Type: Feature Release Priority: MEDIUM

New Features
Multi-Language Support System
Overview: SmartPets now supports multiple languages with automatic fallback to English.

Key Features:
  • Language Files Folder: New langs/ folder structure for language files
  • Spanish Translation: Complete Spanish translation (~450+ keys) included out of the box
  • Automatic Fallback: If a translation key is missing, automatically uses English
  • Backwards Compatible: Legacy lang.yml file still works for existing installations
  • Hot Reload: Change language without server restart using /petadmin reload
  • Easy Extension: Add new languages by creating langs/<code>.yml files
Configuration:
Code (YAML):
# In config.yml
general
:
  language
: "es"   # Options: "en" (English), "es" (Spanish)

File Structure
:
Code (YAML):
plugins/SmartPets/
├── config.yml
├── lang.yml (legacy, for backwards compatibility )
└── langs/
    ├── en.yml (English - default/fallback )
    └── es.yml (Spanish - complete translation )

Technical Details
:
  • Thread-safe message caching with ConcurrentHashMap
  • HEX color code support (&#RRGGBB)
  • Placeholder system preserved ({pet_name}, {player}, etc.)
  • Automatic extraction of bundled language files on first run
Improved Reload Command
Overview: The /petadmin reload command now performs a complete configuration reload.

Bug Fixes

Fixed: Shulker Box Interaction Blocked

Issue: Players could not interact with Shulker Boxes (open, take items) when SmartPets was installed.

Root Cause: GUI event handlers were using overly broad title matching (contains()) that could accidentally match other inventory types. Additionally, handlers weren't checking the inventory type before canceling events.

Solution:
  1. Added InventoryType.CHEST check to all GUI handlers - Shulker Boxes use SHULKER_BOX type
  2. Changed title matching from contains() to more specific patterns (startsWith(), endsWith(), equals())
  3. Applied fix to all affected GUI classes
Fixed: MySQL Connection Timeout Issues
Issue: "No operations allowed after connection closed" errors when using MySQL storage, especially after periods of inactivity.

Root Cause:
  1. Connection validation only checked isClosed() but didn't test if connection was actually usable
  2. MySQL server-side timeouts weren't handled properly
  3. No automatic retry mechanism for connection failures
Solution:
  1. Enhanced Connection Validation: Added isConnectionValid() method that tests connections with SELECT 1
  2. Improved MySQL URL: Added robust connection parameters:
    • connectTimeout=60000 & socketTimeout=60000 - Longer timeouts
    • maxReconnects=3 & initialTimeout=2 - Automatic reconnection
    • allowPublicKeyRetrieval=true & serverTimezone=UTC - Compatibility
  3. Automatic Retry Logic: Both executeAsync() and queryAsync() now retry up to 2 times on connection errors
  4. Connection Refresh: Forces new connection creation when stale connections detected
----------, Jan 11, 2026
Resource Information
Author:
----------
Total Downloads: 24
First Release: Jun 5, 2025
Last Update: Mar 20, 2026
Category: ---------------
All-Time Rating:
1 ratings
Version -----
Released: --------------------
Downloads: ------
Version Rating:
----------------------
-- ratings