<?php
// Wiki pública de ContractRPG: docs + descarga (free) + reseñas (visibles sin login).
require_once __DIR__ . '/../includes/init.php';
require_once __DIR__ . '/../includes/plugins.php';
$slug = 'contractrpg';
$loggedIn = is_logged_in();
$revTotal = 0; $revAvg = 0.0; $revList = []; $myRev = null; $revMsg = ''; $replies = [];

function wiki_pdo() {
    return new PDO('mysql:host=' . DB_HOST . ';dbname=' . DB_NAME . ';charset=utf8mb4', DB_USER, DB_PASS,
        [PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION, PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC]);
}
function rw_stars($n) { $n = max(0, min(5, (int)$n)); return str_repeat('★', $n) . '<span class="off">' . str_repeat('★', 5 - $n) . '</span>'; }

if ($_SERVER['REQUEST_METHOD'] === 'POST' && ($_POST['do'] ?? '') === 'review' && $loggedIn) {
    csrf_check();
    $rating = (int)($_POST['rating'] ?? 0); $comment = trim($_POST['comment'] ?? '');
    if ($rating >= 1 && $rating <= 5 && $comment !== '') {
        try {
            $pdo = wiki_pdo();
            $o = $pdo->prepare("SELECT 1 FROM licenses WHERE user_id=? AND plugin_slug=? AND status='active' LIMIT 1");
            $o->execute([$_SESSION['uid'], $slug]); $owns = $o->fetchColumn() ? 1 : 0;
            $pdo->prepare("INSERT INTO reviews (user_id, plugin_slug, rating, comment, verified_buyer) VALUES (?,?,?,?,?)
                ON DUPLICATE KEY UPDATE rating=VALUES(rating), comment=VALUES(comment), verified_buyer=VALUES(verified_buyer), created_at=NOW()")
                ->execute([$_SESSION['uid'], $slug, $rating, $comment, $owns]);
            header('Location: ./?saved=1'); exit;
        } catch (Throwable $e) { $revMsg = 'No se pudo guardar tu reseña.'; }
    } else { $revMsg = 'Elige estrellas y escribe un comentario.'; }
}
try {
    $pdo = wiki_pdo();
    $s = $pdo->prepare("SELECT COUNT(*) c, COALESCE(AVG(rating),0) a FROM reviews WHERE plugin_slug=? AND status='visible'");
    $s->execute([$slug]); $sm = $s->fetch();
    $revTotal = (int)$sm['c']; $revAvg = round((float)$sm['a'], 1);
    $s = $pdo->prepare("SELECT r.id, r.rating, r.comment, r.created_at, us.username, us.role,
        (SELECT GROUP_CONCAT(l.plugin_slug) FROM licenses l WHERE l.user_id=r.user_id AND l.status='active') owned
        FROM reviews r JOIN users us ON us.id=r.user_id
        WHERE r.plugin_slug=? AND r.status='visible' ORDER BY r.created_at DESC LIMIT 100");
    $s->execute([$slug]); $revList = $s->fetchAll();
    try {
        $rp = $pdo->prepare("SELECT id, admin_reply, admin_reply_at FROM reviews WHERE plugin_slug=? AND admin_reply IS NOT NULL AND admin_reply<>''");
        $rp->execute([$slug]);
        foreach ($rp->fetchAll() as $x) { $replies[(int)$x['id']] = $x; }
    } catch (Throwable $e) {}
    if ($loggedIn) {
        $m = $pdo->prepare("SELECT rating, comment FROM reviews WHERE user_id=? AND plugin_slug=?");
        $m->execute([$_SESSION['uid'], $slug]); $myRev = $m->fetch() ?: null;
    }
} catch (Throwable $e) {}
$DL = e(BASE) . '/contractrpg/descargas/ContractRPG-1.0.jar';
?>
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>ContractRPG — Minecraft Contracts &amp; Missions Plugin | infinity3113</title>
<meta name="description" content="ContractRPG: daily, weekly, special and server-wide contracts for Minecraft. Missions, a point shop, rarities, loot, leaderboards, a global boss-bar goal and an in-game mission editor. No required dependencies.">
<meta property="og:title" content="ContractRPG — Contracts &amp; Missions for Minecraft">
<meta property="og:description" content="Daily/weekly/special &amp; global contracts, shop, ranks, rarities and loot. Runs standalone.">
<link rel="icon" href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><text y='.9em' font-size='90'>%F0%9F%93%9C</text></svg>">
<link rel="stylesheet" href="../assets/app.css">
</head>
<body>
<style>
  #crhub{
    --bg:#0b1210; --bg2:#0e1a15; --panel:#132019; --panel2:#18291f;
    --line:rgba(255,255,255,.09); --line2:rgba(255,255,255,.14);
    --gold:#f6c453; --gold-deep:#e0a92e; --green:#37d67a; --teal:#34d2f2; --purple:#a78bfa;
    --text:#eefaf3; --muted:#9fb8ac; --muted2:#78907f; --maxw:1200px;
    --sans:system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;
    --mono:ui-monospace,"SF Mono","Cascadia Code",Consolas,monospace;
    background:
      radial-gradient(1100px 600px at 82% -10%, rgba(55,214,122,.14), transparent 60%),
      radial-gradient(900px 520px at 4% 2%, rgba(167,139,250,.10), transparent 55%),
      linear-gradient(180deg,var(--bg2),var(--bg) 42%);
    color:var(--text);font-family:var(--sans);font-size:16px;line-height:1.62;min-height:100vh;overflow-x:hidden;
  }
  #crhub *{box-sizing:border-box}
  #crhub a{color:inherit;text-decoration:none}
  #crhub h1,#crhub h2,#crhub h3{line-height:1.12;margin:0;letter-spacing:-.02em}
  #crhub .eyebrow{font:600 12px/1 var(--mono);letter-spacing:.22em;text-transform:uppercase;color:var(--green)}
  #crhub .top{position:sticky;top:0;z-index:50;backdrop-filter:blur(14px);background:rgba(11,18,16,.8);border-bottom:1px solid var(--line)}
  #crhub .top .in{max-width:var(--maxw);margin:0 auto;padding:0 22px;display:flex;align-items:center;gap:14px;height:62px;flex-wrap:wrap}
  #crhub .brand{display:flex;align-items:center;gap:11px;margin-right:auto}
  #crhub .brand .logo{width:38px;height:38px;border-radius:10px;flex:none;background:linear-gradient(145deg,var(--green),#1f9d5b);display:grid;place-items:center;font-size:20px;box-shadow:0 6px 20px rgba(55,214,122,.35)}
  #crhub .brand b{font-size:15px;font-weight:800;display:block}
  #crhub .brand span{font:600 11px/1.3 var(--mono);color:var(--muted);letter-spacing:.06em}
  #crhub .navlink{font-size:13.5px;font-weight:700;color:var(--muted);padding:8px 10px;border-radius:9px}
  #crhub .navlink:hover{color:var(--text);background:var(--panel)}
  #crhub .langsw{display:flex;background:var(--panel);border:1px solid var(--line);border-radius:10px;padding:3px}
  #crhub .langsw button{border:0;background:transparent;color:var(--muted);font-family:var(--mono);font-size:12px;font-weight:600;padding:6px 9px;border-radius:7px;cursor:pointer}
  #crhub .langsw button:hover{color:var(--text)}
  #crhub .langsw button.on{background:linear-gradient(145deg,var(--green),#1f9d5b);color:#04170d}
  #crhub .layout{max-width:var(--maxw);margin:0 auto;padding:24px 22px 0;display:grid;grid-template-columns:246px minmax(0,1fr);gap:34px;align-items:start}
  #crhub .side{position:sticky;top:86px}
  #crhub .plugsel{display:flex;align-items:center;gap:10px;padding:12px 13px;border-radius:13px;margin-bottom:8px;border:1px solid var(--green);background:linear-gradient(180deg,rgba(55,214,122,.1),var(--panel))}
  #crhub .plugsel .ic{font-size:20px}
  #crhub .plugsel b{font-size:14.5px;font-weight:800;display:block}
  #crhub .plugsel small{font:600 10px/1.3 var(--mono);color:var(--muted2);letter-spacing:.08em}
  #crhub .sidelabel{font:600 10px/1 var(--mono);letter-spacing:.18em;text-transform:uppercase;color:var(--muted2);padding:14px 12px 8px}
  #crhub .sidenav{display:flex;flex-direction:column;gap:2px}
  #crhub .sidenav a{display:flex;align-items:center;gap:10px;padding:9px 12px;border-radius:9px;font-size:14px;font-weight:600;color:var(--muted);cursor:pointer;border-left:2px solid transparent}
  #crhub .sidenav a .n{width:19px;text-align:center;opacity:.85}
  #crhub .sidenav a:hover{color:var(--text);background:var(--panel)}
  #crhub .sidenav a.on{color:var(--text);background:var(--panel);border-left-color:var(--green)}
  #crhub .content{min-width:0;padding-bottom:40px}
  #crhub .page{display:none}
  #crhub .page.active{display:block;animation:crfade .25s ease}
  @keyframes crfade{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}
  #crhub .crumb{font:600 12px/1 var(--mono);letter-spacing:.05em;color:var(--muted2);margin-bottom:14px}
  #crhub .crumb b{color:var(--green)}
  #crhub .ptitle{font-size:clamp(26px,4vw,36px);font-weight:800;margin-bottom:10px}
  #crhub .plead{color:var(--muted);font-size:16.5px;max-width:64ch;margin-bottom:24px}
  #crhub h3.sub{font-size:19px;font-weight:800;margin:32px 0 14px}
  #crhub .hero{display:grid;grid-template-columns:1.05fr .95fr;gap:34px;align-items:center;margin-bottom:14px}
  #crhub .badge{display:inline-flex;align-items:center;gap:8px;padding:7px 13px;border-radius:999px;background:var(--panel);border:1px solid var(--line2);font:600 12.5px/1 var(--sans);color:var(--muted);margin-bottom:20px}
  #crhub .badge .dot{width:7px;height:7px;border-radius:50%;background:var(--green);box-shadow:0 0 10px var(--green)}
  #crhub .hero h1{font-size:clamp(40px,6vw,66px);font-weight:900}
  #crhub .hero h1 .grad{background:linear-gradient(120deg,#fff 8%,var(--green) 52%,var(--teal));-webkit-background-clip:text;background-clip:text;color:transparent}
  #crhub .lede{color:var(--muted);font-size:clamp(15px,2vw,18px);margin:18px 0 26px;max-width:40ch}
  #crhub .cta{display:flex;gap:12px;flex-wrap:wrap}
  #crhub .btn{display:inline-flex;align-items:center;gap:9px;padding:12px 20px;border-radius:12px;font-weight:700;font-size:15px;cursor:pointer;border:1px solid transparent;transition:.18s}
  #crhub .btn.primary{background:linear-gradient(145deg,var(--green),#1f9d5b);color:#04170d;box-shadow:0 10px 26px rgba(55,214,122,.32)}
  #crhub .btn.primary:hover{transform:translateY(-2px)}
  #crhub .btn.ghost{background:var(--panel);border-color:var(--line2);color:var(--text)}
  #crhub .btn.ghost:hover{border-color:var(--green);color:var(--green)}
  #crhub .stats{display:flex;gap:24px;margin-top:30px;flex-wrap:wrap}
  #crhub .stats .s b{font-size:18px;font-weight:800;display:block}
  #crhub .stats .s span{font:600 10px/1 var(--mono);letter-spacing:.14em;text-transform:uppercase;color:var(--muted2)}
  #crhub .scroll{position:relative;justify-self:center;width:min(100%,380px);background:linear-gradient(180deg,var(--panel2),var(--panel));border:1px solid var(--line2);border-radius:22px;padding:22px}
  #crhub .scroll .mrow{display:flex;align-items:center;gap:10px;padding:11px 12px;border-radius:12px;background:#0c1611;border:1px solid var(--line);margin-bottom:9px}
  #crhub .scroll .mrow .e{font-size:20px}
  #crhub .scroll .mrow b{font-size:13.5px;font-weight:800;display:block}
  #crhub .scroll .mrow small{font:600 11px/1.2 var(--mono);color:var(--muted2)}
  #crhub .scroll .mrow .rr{margin-left:auto;font:800 11px/1 var(--mono);color:var(--gold)}
  #crhub .cards{display:grid;grid-template-columns:repeat(3,1fr);gap:14px;margin-top:20px}
  #crhub .card{background:linear-gradient(180deg,var(--panel),rgba(19,32,25,.55));border:1px solid var(--line);border-radius:16px;padding:18px;transition:.2s}
  #crhub .card:hover{border-color:var(--line2);transform:translateY(-3px)}
  #crhub .card .ico{width:42px;height:42px;border-radius:11px;display:grid;place-items:center;font-size:21px;margin-bottom:12px;background:var(--panel2);border:1px solid var(--line2)}
  #crhub .card h3{font-size:16px;font-weight:800}
  #crhub .card p{color:var(--muted);font-size:13.5px;margin:7px 0 0}
  #crhub .tablewrap{overflow-x:auto;border:1px solid var(--line);border-radius:14px;background:var(--panel);margin-top:8px}
  #crhub table{width:100%;border-collapse:collapse;min-width:480px}
  #crhub th,#crhub td{text-align:left;padding:12px 15px;border-bottom:1px solid var(--line);font-size:14px;vertical-align:top}
  #crhub th{font:600 11px/1 var(--mono);letter-spacing:.13em;text-transform:uppercase;color:var(--muted2)}
  #crhub tr:last-child td{border-bottom:0}
  #crhub code{font-family:var(--mono);font-size:12.5px;background:rgba(55,214,122,.12);color:var(--green);padding:3px 7px;border-radius:6px;white-space:nowrap}
  #crhub .perm{font-family:var(--mono);font-size:12px;color:var(--teal);white-space:nowrap}
  #crhub pre{background:#08110d;border:1px solid var(--line);border-radius:12px;padding:16px 18px;overflow-x:auto;margin:14px 0}
  #crhub pre code{background:none;color:#d6f5e4;padding:0;white-space:pre;font-size:13px;line-height:1.7}
  #crhub .cmt{color:#6f8a78}
  #crhub .note{margin-top:18px;padding:15px 17px;border-radius:12px;background:rgba(52,210,242,.08);border:1px solid rgba(52,210,242,.25);color:var(--muted);font-size:14px;display:flex;gap:11px}
  #crhub .note b{color:var(--text)}
  #crhub ol.steps{counter-reset:s;list-style:none;padding:0;margin:8px 0 0}
  #crhub ol.steps li{position:relative;padding:12px 0 12px 44px;border-bottom:1px solid var(--line);color:var(--muted);font-size:14.5px}
  #crhub ol.steps li:last-child{border-bottom:0}
  #crhub ol.steps li::before{counter-increment:s;content:counter(s);position:absolute;left:0;top:10px;width:30px;height:30px;border-radius:9px;background:var(--panel2);border:1px solid var(--line2);color:var(--green);font:800 13px/30px var(--mono);text-align:center}
  #crhub ol.steps b{color:var(--text)}
  #crhub .rev-head{display:flex;align-items:center;gap:14px;flex-wrap:wrap;margin-bottom:18px}
  #crhub .rev-avg{font-size:40px;font-weight:900}
  #crhub .rev-st{color:var(--gold);letter-spacing:2px} #crhub .off{color:#3a4a40}
  #crhub .rev-form{background:var(--panel);border:1px solid var(--line);border-radius:14px;padding:18px;margin-bottom:16px}
  #crhub .starpick{display:flex;gap:6px;font-size:28px;color:#3a4a40;cursor:pointer}
  #crhub .starpick span.hot{color:var(--gold)}
  #crhub .rev-ta{width:100%;margin-top:12px;background:#0c1611;border:1px solid var(--line2);border-radius:10px;color:var(--text);padding:11px 13px;font-family:inherit;font-size:14px;min-height:80px;resize:vertical}
  #crhub .rev-cta{background:var(--panel);border:1px solid var(--line);border-radius:14px;padding:16px;display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-bottom:16px;color:var(--muted)}
  #crhub .rev-item{display:flex;gap:13px;padding:15px 0;border-bottom:1px solid var(--line)}
  #crhub .rev-item:last-child{border-bottom:0}
  #crhub .ra{width:40px;height:40px;border-radius:11px;flex:none;background:var(--panel2);border:1px solid var(--line2);display:grid;place-items:center;font-weight:800;color:var(--green)}
  #crhub .rev-top{display:flex;align-items:center;gap:9px;flex-wrap:wrap}
  #crhub .who{font-weight:800} #crhub .when{font:600 11px/1 var(--mono);color:var(--muted2);margin-left:auto}
  #crhub .rev-body p{margin:6px 0 0;color:var(--muted);font-size:14px}
  #crhub .rev-empty{color:var(--muted2)}
  #crhub .pbadge{display:inline-flex;align-items:center;gap:4px;font:700 10px/1 var(--mono);text-transform:uppercase;letter-spacing:.05em;padding:3px 7px;border-radius:6px;background:linear-gradient(145deg,var(--gold),var(--gold-deep));color:#241a06}
  #crhub footer{border-top:1px solid var(--line);margin-top:30px}
  #crhub footer .in{max-width:var(--maxw);margin:0 auto;padding:22px;display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap;color:var(--muted2);font-size:13px}
  #crhub footer .dom{font-family:var(--mono)}
  @media(max-width:860px){#crhub .layout{grid-template-columns:1fr}#crhub .side{position:static}#crhub .sidenav{flex-direction:row;flex-wrap:wrap}#crhub .hero{grid-template-columns:1fr}#crhub .cards{grid-template-columns:1fr 1fr}}
  @media(max-width:520px){#crhub .cards{grid-template-columns:1fr}}
</style>

<div id="crhub">
  <div class="top"><div class="in">
    <a class="brand" href="<?= e(BASE) ?>/">
      <div class="logo">📜</div>
      <div><b>ContractRPG</b><span data-i18n="brandSub">Minecraft Plugins</span></div>
    </a>
    <a class="navlink" href="<?= e(BASE) ?>/" data-i18n="navHubPlugins">Plugins</a>
    <?php if ($loggedIn): ?>
      <a class="navlink" href="<?= e(BASE) ?>/panel/" data-i18n="navMyPanel">My panel</a>
      <a class="navlink" href="<?= e(BASE) ?>/logout.php" data-i18n="navLogout">Log out</a>
    <?php else: ?>
      <a class="navlink" href="<?= e(BASE) ?>/login.php" data-i18n="navLogin">Log in</a>
      <a class="navlink" href="<?= e(BASE) ?>/register.php" data-i18n="navRegister">Sign up</a>
    <?php endif; ?>
    <div class="langsw">
      <button data-lang="en">EN</button><button data-lang="fr">FR</button><button data-lang="zh">中文</button><button data-lang="es">ES</button>
    </div>
  </div></div>

  <div class="layout">
    <aside class="side">
      <div class="plugsel"><span class="ic">📜</span><div><b>ContractRPG</b><small>v1.0 · FREE</small></div></div>
      <div class="sidelabel" data-i18n="sideDocs">Documentation</div>
      <nav class="sidenav">
        <a class="on" data-page="overview"><span class="n">◆</span><span data-i18n="navOverview">Overview</span></a>
        <a data-page="install"><span class="n">▸</span><span data-i18n="navInstall">Installation</span></a>
        <a data-page="missions"><span class="n">▸</span><span data-i18n="navMissions">Mission types</span></a>
        <a data-page="commands"><span class="n">▸</span><span data-i18n="navCommands">Commands</span></a>
        <a data-page="perms"><span class="n">▸</span><span data-i18n="navPerms">Permissions</span></a>
        <a data-page="placeholders"><span class="n">▸</span><span data-i18n="navPlaceholders">Placeholders</span></a>
        <a data-page="config"><span class="n">▸</span><span data-i18n="navConfig">Configuration</span></a>
        <a data-page="reviews"><span class="n">★</span><span data-i18n="navReviews">Reviews</span></a>
      </nav>
    </aside>

    <main class="content">

      <!-- OVERVIEW -->
      <section class="page active" data-p="overview">
        <div class="hero">
          <div>
            <span class="badge"><span class="dot"></span><span data-i18n="heroBadge">RPG contracts for Minecraft · 1.21+</span></span>
            <h1>Contract<span class="grad">RPG</span></h1>
            <p class="lede" data-i18n="heroTagline">Daily, weekly, special and server-wide contracts. Players hunt, mine, fish, craft and deliver to earn money, XP, points and loot — with a shop, ranks, rarities and a live boss-bar goal.</p>
            <div class="cta">
              <a class="btn primary" href="<?= $DL ?>">⬇ <span data-i18n="btnDownload">Download (free)</span></a>
              <a class="btn ghost" data-page="install" onclick="return false"><span data-i18n="btnInstall">Installation</span></a>
            </div>
            <div class="stats">
              <div class="s"><b>1.0</b><span data-i18n="statVersion">Version</span></div>
              <div class="s"><b>1.21+</b><span data-i18n="statMc">Minecraft</span></div>
              <div class="s"><b data-i18n="statNoneVal">None</b><span data-i18n="statDeps">Required deps</span></div>
              <div class="s"><b>ES·EN·FR·ZH</b><span data-i18n="statLangs">Languages</span></div>
            </div>
          </div>
          <div class="scroll">
            <div class="mrow"><span class="e">⚔️</span><div><b data-i18n="mtHunt">Hunting</b><small data-i18n="mtHuntEx">Kill 15 zombies</small></div><span class="rr">RARE</span></div>
            <div class="mrow"><span class="e">⛏️</span><div><b data-i18n="mtMine">Mining</b><small data-i18n="mtMineEx">Break 32 coal ore</small></div><span class="rr">✦</span></div>
            <div class="mrow"><span class="e">🎣</span><div><b data-i18n="mtFish">Fishing</b><small data-i18n="mtFishEx">Fish 10 cod</small></div></div>
            <div class="mrow"><span class="e">🐉</span><div><b data-i18n="mtMythic">Hunt MythicMob</b><small data-i18n="mtMythicEx">Slay a boss</small></div><span class="rr">LEG</span></div>
            <div class="mrow"><span class="e">🌍</span><div><b data-i18n="mtGlobal">Global goal</b><small data-i18n="mtGlobalEx">Whole server · boss bar</small></div></div>
          </div>
        </div>

        <h3 class="sub" data-i18n="featuresTitle">Everything a mission system needs</h3>
        <div class="cards">
          <div class="card"><div class="ico">📅</div><h3 data-i18n="f1t">Daily / Weekly / Special</h3><p data-i18n="f1d">Offers lock per period, completed ones are marked, and specials complete only once.</p></div>
          <div class="card"><div class="ico">🎯</div><h3 data-i18n="f2t">7 mission types</h3><p data-i18n="f2d">Hunt mobs, mine, fish, craft, deliver items, deliver MMOItems and hunt MythicMobs.</p></div>
          <div class="card"><div class="ico">🎁</div><h3 data-i18n="f3t">Rich rewards</h3><p data-i18n="f3d">Money (Vault), XP, contract points and item loot tables with drop chances.</p></div>
          <div class="card"><div class="ico">💎</div><h3 data-i18n="f4t">Rarity system</h3><p data-i18n="f4d">Common / Rare / Legendary — rarer contracts get more likely as players level up.</p></div>
          <div class="card"><div class="ico">🛒</div><h3 data-i18n="f5t">Point shop</h3><p data-i18n="f5d">Spend points on items. Stock, cooldown, one-time buys, level unlocks and discounts.</p></div>
          <div class="card"><div class="ico">🏆</div><h3 data-i18n="f6t">Leaderboards</h3><p data-i18n="f6d">/contract top by level, points or contracts — with PlaceholderAPI for holograms.</p></div>
          <div class="card"><div class="ico">🌍</div><h3 data-i18n="f7t">Global contracts</h3><p data-i18n="f7d">Community goals the whole server fills together, shown on a live boss bar.</p></div>
          <div class="card"><div class="ico">🎲</div><h3 data-i18n="f8t">Reroll & leveling</h3><p data-i18n="f8d">Reroll offered contracts for points; a level system with milestone rewards.</p></div>
          <div class="card"><div class="ico">🛠️</div><h3 data-i18n="f9t">In-game editor</h3><p data-i18n="f9d">Create, edit and delete contracts from a GUI — no config editing needed.</p></div>
        </div>
        <div class="note">✅ <div><b data-i18n="noReqT">No required dependencies.</b> <span data-i18n="noReqD">ContractRPG runs on its own. Vault, Citizens, MythicMobs, MMOItems, MMOCore and PlaceholderAPI are all optional and activate automatically.</span></div></div>
      </section>

      <!-- INSTALL -->
      <section class="page" data-p="install">
        <div class="crumb"><b>ContractRPG</b> / <span data-i18n="navInstall">Installation</span></div>
        <h2 class="ptitle" data-i18n="navInstall">Installation</h2>
        <p class="plead" data-i18n="instLead">Get ContractRPG running in a minute — it needs no other plugin to start.</p>
        <h3 class="sub" data-i18n="instStepsT">Steps</h3>
        <ol class="steps">
          <li data-i18n="ist1">Download <b>ContractRPG.jar</b> and drop it into your server's <b>plugins/</b> folder.</li>
          <li data-i18n="ist2"><b>Restart</b> the server (Java 21 required for 1.21+).</li>
          <li data-i18n="ist3">(Optional) Install any integrations you want: Vault + economy, Citizens, MythicMobs, MythicLib, MMOItems, MMOCore, PlaceholderAPI.</li>
          <li data-i18n="ist4">Edit the config files and run <code>/contract reload</code>.</li>
        </ol>
        <h3 class="sub" data-i18n="instReq">Integrations (all optional)</h3>
        <div class="tablewrap"><table>
          <tr><th data-i18n="thPlugin">Plugin</th><th data-i18n="thWhatFor">What it unlocks</th></tr>
          <tr><td><b>Vault</b> + economy</td><td data-i18n="rq1">Money rewards (EssentialsX, CMI, any economy)</td></tr>
          <tr><td><b>Citizens</b></td><td data-i18n="rq2">Item-delivery contracts (NPC)</td></tr>
          <tr><td><b>MythicMobs</b></td><td data-i18n="rq3">Hunt-MythicMob contracts</td></tr>
          <tr><td><b>MythicLib + MMOItems</b></td><td data-i18n="rq4">Deliver-MMOItem contracts</td></tr>
          <tr><td><b>MMOCore</b></td><td data-i18n="rq5">Use MMOCore levels/XP instead of the built-in one</td></tr>
          <tr><td><b>PlaceholderAPI</b></td><td data-i18n="rq6">Placeholders for scoreboards & holograms</td></tr>
        </table></div>
        <div class="note">ℹ️ <div><span data-i18n="instNote">New language keys are added to your lang files automatically on startup — no reset needed.</span></div></div>
      </section>

      <!-- MISSIONS -->
      <section class="page" data-p="missions">
        <div class="crumb"><b>ContractRPG</b> / <span data-i18n="navMissions">Mission types</span></div>
        <h2 class="ptitle" data-i18n="navMissions">Mission types</h2>
        <p class="plead" data-i18n="missLead">Every contract is one of these objectives. All progress is event-based — you must do it yourself.</p>
        <div class="tablewrap"><table>
          <tr><th data-i18n="thType">Type</th><th data-i18n="thObjective">Objective</th></tr>
          <tr><td>⚔️ <code>HUNTING</code></td><td data-i18n="mm1">Kill mobs (cows, zombies, creepers…)</td></tr>
          <tr><td>⛏️ <code>MINING</code></td><td data-i18n="mm2">Break blocks / mine ores</td></tr>
          <tr><td>🎣 <code>FISHING</code></td><td data-i18n="mm3">Reel in fish with a rod (giving fish doesn't count)</td></tr>
          <tr><td>🔨 <code>CRAFTING</code></td><td data-i18n="mm4">Craft items</td></tr>
          <tr><td>📦 <code>DELIVER</code></td><td data-i18n="mm5">Deliver items to a Citizens NPC</td></tr>
          <tr><td>💎 <code>DELIVER_MMOITEM</code></td><td data-i18n="mm6">Deliver MMOItems to an NPC</td></tr>
          <tr><td>🐉 <code>HUNT_MYTHICMOB</code></td><td data-i18n="mm7">Kill MythicMobs</td></tr>
        </table></div>
        <h3 class="sub" data-i18n="objT">How to fill “mission-objective”</h3>
        <p class="plead" data-i18n="objLead">Names come straight from Minecraft's own enums (materials &amp; entities): always UPPERCASE with underscores. One value per contract.</p>
        <div class="tablewrap"><table>
          <tr><th data-i18n="thType">Type</th><th><code>mission-objective</code></th><th data-i18n="thExample">Example</th></tr>
          <tr><td>⚔️ <code>HUNTING</code></td><td data-i18n="ob1">Entity name</td><td><code>ZOMBIE</code> · <code>COW</code> · <code>CREEPER</code></td></tr>
          <tr><td>⛏️ <code>MINING</code></td><td data-i18n="ob2">Block / ore material</td><td><code>DIAMOND_ORE</code> · <code>COAL_ORE</code> · <code>OAK_LOG</code></td></tr>
          <tr><td>🎣 <code>FISHING</code></td><td data-i18n="ob3">Material you reel in</td><td><code>COD</code> · <code>SALMON</code> · <code>PUFFERFISH</code></td></tr>
          <tr><td>🔨 <code>CRAFTING</code></td><td data-i18n="ob4">Crafted material</td><td><code>TORCH</code> · <code>CHEST</code> · <code>BREAD</code></td></tr>
          <tr><td>📦 <code>DELIVER</code></td><td data-i18n="ob5">Material handed to the NPC</td><td><code>COBBLESTONE</code> · <code>SAND</code></td></tr>
          <tr><td>💎 <code>DELIVER_MMOITEM</code></td><td data-i18n="ob6">MMOItem as <code>TYPE:ID</code></td><td><code>MATERIAL:SILVER_INGOT</code></td></tr>
          <tr><td>🐉 <code>HUNT_MYTHICMOB</code></td><td data-i18n="ob7">MythicMob internal name</td><td><code>Goblin</code> · <code>Yeti</code></td></tr>
        </table></div>
        <div class="note">ℹ️ <div><span data-i18n="objTip">Not sure of a name? Use the in-game editor (<code>/contract create</code>): it gives you a clickable picker for mobs, fish and MythicMobs, or just reads the item in your hand for mining / crafting / deliver.</span></div></div>

        <h3 class="sub" data-i18n="objFullT">One full example per type (copy-paste into daily.yml / weekly.yml)</h3>
        <pre><code># HUNTING — kill entities
# Every entry goes under "contracts:" in daily.yml / weekly.yml / special.yml.
# Only mission-type + mission-objective change per type — the rest is the same.
contracts:

  # HUNTING — kill entities
  hunt_zombies:
    display-name: "&lt;#2E8B57&gt;Kill Zombies"
    contract-type: DAILY
    mission-type: HUNTING
    mission-objective: "ZOMBIE"
    mission-requirement: 25
    rewards: [ "eco give %player% 100" ]
    display-rewards: [ "100 money" ]
    experience-reward: 20
    contract-points-reward: 7
    level-requirement: 1
    rarity: common

  # MINING — break blocks / ores
  mine_iron:
    display-name: "&lt;#A52A2A&gt;Mine Iron"
    contract-type: DAILY
    mission-type: MINING
    mission-objective: "IRON_ORE"
    mission-requirement: 32
    rewards: [ "eco give %player% 150" ]
    display-rewards: [ "150 money" ]
    experience-reward: 35
    contract-points-reward: 11
    level-requirement: 6
    rarity: common

  # FISHING — reel in fish with a rod
  fish_salmon:
    display-name: "&lt;#FA8072&gt;Fish Salmon"
    contract-type: DAILY
    mission-type: FISHING
    mission-objective: "SALMON"
    mission-requirement: 10
    rewards: [ "eco give %player% 180" ]
    display-rewards: [ "180 money" ]
    experience-reward: 40
    contract-points-reward: 13
    level-requirement: 8
    rarity: rare

  # CRAFTING — craft items
  craft_torch:
    display-name: "&lt;#FFD700&gt;Craft Torches"
    contract-type: DAILY
    mission-type: CRAFTING
    mission-objective: "TORCH"
    mission-requirement: 64
    rewards: [ "eco give %player% 70" ]
    display-rewards: [ "70 money" ]
    experience-reward: 15
    contract-points-reward: 4
    level-requirement: 1
    rarity: common

  # DELIVER — hand items to a Citizens NPC (set delivery-npc-id in config.yml)
  deliver_stone:
    display-name: "&lt;#808080&gt;Deliver Cobblestone"
    contract-type: DAILY
    mission-type: DELIVER
    mission-objective: "COBBLESTONE"
    mission-requirement: 128
    rewards: [ "eco give %player% 110" ]
    display-rewards: [ "110 money" ]
    experience-reward: 25
    contract-points-reward: 7
    level-requirement: 4
    rarity: common

  # DELIVER_MMOITEM — hand an MMOItem to the NPC (format TYPE:ID)
  deliver_silver:
    display-name: "&lt;#C0C0C0&gt;Deliver Silver Ingots"
    contract-type: DAILY
    mission-type: DELIVER_MMOITEM
    mission-objective: "MATERIAL:SILVER_INGOT"
    mission-requirement: 16
    rewards: [ "eco give %player% 350" ]
    display-rewards: [ "350 money" ]
    experience-reward: 80
    contract-points-reward: 30
    level-requirement: 12
    rarity: rare

  # HUNT_MYTHICMOB — kill a MythicMob by its internal name
  hunt_goblin:
    display-name: "&lt;#228B22&gt;Kill Goblins"
    contract-type: DAILY
    mission-type: HUNT_MYTHICMOB
    mission-objective: "Goblin"
    mission-requirement: 15
    rewards: [ "eco give %player% 300" ]
    display-rewards: [ "300 money" ]
    experience-reward: 70
    contract-points-reward: 25
    level-requirement: 10
    rarity: rare</code></pre>

        <h3 class="sub" data-i18n="rewardsT">Rewards &amp; rarity</h3>
        <p class="plead" data-i18n="rewardsD">Contracts pay money, XP, contract points and optional item loot (with drop chances). Each contract has a rarity (Common / Rare / Legendary) that changes its color, glow and how often it appears — and higher-level players see more rare/legendary contracts.</p>
        <p class="plead" data-i18n="tierD">The default files ship <b>24 daily</b>, <b>12 weekly</b> and <b>20+ special</b> contracts, weighted by tier: many Common, fewer Rare, only a handful of Legendary — so higher tiers are rarer to roll.</p>
      </section>

      <!-- COMMANDS -->
      <section class="page" data-p="commands">
        <div class="crumb"><b>ContractRPG</b> / <span data-i18n="navCommands">Commands</span></div>
        <h2 class="ptitle" data-i18n="navCommands">Commands</h2>
        <p class="plead" data-i18n="cmdLead">Base command <code>/contract</code> — aliases <code>/contracts</code>, <code>/crpg</code>.</p>
        <h3 class="sub" data-i18n="cmdPlayerT">Players</h3>
        <div class="tablewrap"><table>
          <tr><th data-i18n="thCmd">Command</th><th data-i18n="thDesc">What it does</th></tr>
          <tr><td><code>/contract</code></td><td data-i18n="pc1">Open the contracts menu</td></tr>
          <tr><td><code>/contract shop</code></td><td data-i18n="pc2">Open the point shop</td></tr>
          <tr><td><code>/contract top [level|points|contracts]</code></td><td data-i18n="pc3">Leaderboard</td></tr>
          <tr><td><code>/contract global</code></td><td data-i18n="pc4">View the active global contract & rewards</td></tr>
          <tr><td><code>/contract help</code></td><td data-i18n="pc5">Command list</td></tr>
          <tr><td><code>/contract version</code></td><td data-i18n="pc6">Plugin version & author</td></tr>
        </table></div>
        <h3 class="sub" data-i18n="cmdAdminT">Admin</h3>
        <div class="tablewrap"><table>
          <tr><th data-i18n="thCmd">Command</th><th data-i18n="thDesc">What it does</th></tr>
          <tr><td><code>/contract create</code></td><td data-i18n="ac1">Create a contract (GUI)</td></tr>
          <tr><td><code>/contract edit</code></td><td data-i18n="ac2">Edit / delete contracts (GUI, by category)</td></tr>
          <tr><td><code>/contract reload</code></td><td data-i18n="ac3">Reload config, languages & shop</td></tr>
          <tr><td><code>/contract reset</code></td><td data-i18n="ac4">Force a mission reset for online players</td></tr>
          <tr><td><code>/contract resetplayer [player]</code></td><td data-i18n="ac5">Reset a player's data</td></tr>
          <tr><td><code>/contract points [give|take|set] [player] [n]</code></td><td data-i18n="ac6">Manage contract points</td></tr>
          <tr><td><code>/contract level [set|add] [player] [n]</code></td><td data-i18n="ac7">Change a player's level</td></tr>
          <tr><td><code>/contract shopedit</code></td><td data-i18n="ac8">In-game shop editor</td></tr>
          <tr><td><code>/contract global [next|reset]</code></td><td data-i18n="ac9">Manage the global contract</td></tr>
          <tr><td><code>/contract placeholder</code></td><td data-i18n="ac10">List placeholders</td></tr>
        </table></div>
      </section>

      <!-- PERMISSIONS -->
      <section class="page" data-p="perms">
        <div class="crumb"><b>ContractRPG</b> / <span data-i18n="navPerms">Permissions</span></div>
        <h2 class="ptitle" data-i18n="navPerms">Permissions</h2>
        <p class="plead" data-i18n="permLead">Grant these with LuckPerms or any permissions plugin.</p>
        <div class="tablewrap"><table>
          <tr><th data-i18n="thPerm">Permission</th><th data-i18n="thDesc">What it does</th><th data-i18n="thDefault">Default</th></tr>
          <tr><td><span class="perm">contractrpg.use</span></td><td data-i18n="pp1">Base command & menu</td><td><b>true</b></td></tr>
          <tr><td><span class="perm">contractrpg.shop.open</span></td><td data-i18n="pp2">Open the shop</td><td><b>true</b></td></tr>
          <tr><td><span class="perm">contractrpg.reload</span></td><td data-i18n="pp3">Reload</td><td>op</td></tr>
          <tr><td><span class="perm">contractrpg.admin.reset</span></td><td data-i18n="pp4">Mission reset</td><td>op</td></tr>
          <tr><td><span class="perm">contractrpg.admin.shopedit</span></td><td data-i18n="pp5">Shop editor</td><td>op</td></tr>
          <tr><td><span class="perm">contractrpg.command.placeholder</span></td><td data-i18n="pp6">Placeholder list</td><td>op</td></tr>
          <tr><td><span class="perm">contractrpg.admin</span></td><td data-i18n="pp7">Admin: create/edit, points, level, resetplayer</td><td>op</td></tr>
        </table></div>
      </section>

      <!-- PLACEHOLDERS -->
      <section class="page" data-p="placeholders">
        <div class="crumb"><b>ContractRPG</b> / <span data-i18n="navPlaceholders">Placeholders</span></div>
        <h2 class="ptitle" data-i18n="navPlaceholders">Placeholders</h2>
        <p class="plead" data-i18n="phLead">Requires PlaceholderAPI. Great for scoreboards and DecentHolograms leaderboards.</p>
        <pre><code>%contractrpg_level%
%contractrpg_exp%   %contractrpg_exp_required%   %contractrpg_exp_bar%
%contractrpg_active_contracts_count%
%contractrpg_active_&lt;1-N&gt;_name%
%contractrpg_active_&lt;1-N&gt;_objective%
%contractrpg_active_&lt;1-N&gt;_progress%
%contractrpg_active_&lt;1-N&gt;_required%
%contractrpg_active_&lt;1-N&gt;_target%
%contractrpg_top_&lt;level|points|completed&gt;_&lt;1-N&gt;_name%
%contractrpg_top_&lt;level|points|completed&gt;_&lt;1-N&gt;_value%</code></pre>
      </section>

      <!-- CONFIG -->
      <section class="page" data-p="config">
        <div class="crumb"><b>ContractRPG</b> / <span data-i18n="navConfig">Configuration</span></div>
        <h2 class="ptitle" data-i18n="navConfig">Configuration</h2>
        <p class="plead" data-i18n="cfgLead">Clean, commented files — most of it can be done in-game with the mission editor.</p>
        <div class="tablewrap"><table>
          <tr><th data-i18n="thFile">File</th><th data-i18n="thWhatFor">What it holds</th></tr>
          <tr><td><code>config.yml</code></td><td data-i18n="cf1">Leveling, storage, reroll, rarities, leaderboard, global contracts</td></tr>
          <tr><td><code>contracts/daily.yml · weekly.yml · special.yml</code></td><td data-i18n="cf2">Your contracts</td></tr>
          <tr><td><code>global.yml</code></td><td data-i18n="cf3">Server-wide global contracts</td></tr>
          <tr><td><code>shop.yml</code></td><td data-i18n="cf4">Managed in-game with /contract shopedit</td></tr>
          <tr><td><code>lang/en·es·fr·zh.yml</code></td><td data-i18n="cf5">Every message, fully editable</td></tr>
        </table></div>
        <h3 class="sub" data-i18n="cfgExampleT">Example contract (with rarity + loot)</h3>
        <pre><code>daily_hunt_cows:
  display-name: "&lt;#CD7F32&gt;Daily: Fresh Meat"
  contract-type: DAILY
  mission-type: HUNTING
  mission-objective: "COW"
  mission-requirement: 15
  rewards: [ "eco give %player% 70" ]
  experience-reward: 15
  contract-points-reward: 5
  level-requirement: 1
  rarity: rare
  item-rewards:
    '1': { material: DIAMOND, amount: 2, chance: 100 }
    '2': { material: EMERALD, amount: 1, chance: 50 }</code></pre>

        <h3 class="sub" data-i18n="cmdRewT">Custom reward commands</h3>
        <p class="plead" data-i18n="cmdRewD"><code>rewards:</code> is a list of console commands run when the contract is completed — use <code>%player%</code> for the player. <code>display-rewards:</code> is the human-readable text players see in the menu and in <code>/contract global</code>. Money is just the <code>eco give</code> command; you can add any command (ranks, kits, crates…).</p>
        <pre><code>rewards:
  - "eco give %player% 500"
  - "lp user %player% addgroup vip"
  - "crates give %player% legendary 1"
display-rewards:
  - "500 money"
  - "VIP Rank"
  - "1x Legendary Crate"</code></pre>
        <div class="note">ℹ️ <div><span data-i18n="cmdRewTip">You can do all of this in-game too: in the mission editor press <b>Reward commands</b> — left-click to add one (type <code>command | display text</code>), right-click to clear them all.</span></div></div>
      </section>

      <!-- REVIEWS -->
      <section class="page" data-p="reviews">
        <div class="crumb"><b>ContractRPG</b> / <span data-i18n="navReviews">Reviews</span></div>
        <h2 class="ptitle" data-i18n="reviewsTitle">Player reviews</h2>
        <p class="plead" data-i18n="reviewsSub">What server owners think of ContractRPG.</p>
        <div class="rev-head">
          <div class="rev-avg"><?= $revTotal ? number_format($revAvg,1) : '—' ?></div>
          <div>
            <div class="rev-st"><?= $revTotal ? rw_stars((int)round($revAvg)) : '<span class="off">★★★★★</span>' ?></div>
            <div style="font:600 12px/1 var(--mono);color:var(--muted2);margin-top:5px"><?= $revTotal ?> <span data-i18n="reviewsWord">reviews</span></div>
          </div>
        </div>

        <?php if ($revMsg): ?><div class="note" style="border-color:rgba(246,196,83,.4)"><?= e($revMsg) ?></div><?php endif; ?>

        <?php if ($loggedIn): ?>
          <div class="rev-form">
            <div style="font-weight:800;margin-bottom:10px"><?= $myRev ? '<span data-i18n="reviewEditT">Edit your review</span>' : '<span data-i18n="reviewWriteT">Write a review</span>' ?></div>
            <form method="post">
              <?= csrf_field() ?>
              <input type="hidden" name="do" value="review">
              <input type="hidden" name="rating" id="rating" value="<?= $myRev ? (int)$myRev['rating'] : 0 ?>">
              <div class="starpick" id="starpick">
                <span data-v="1">★</span><span data-v="2">★</span><span data-v="3">★</span><span data-v="4">★</span><span data-v="5">★</span>
              </div>
              <textarea class="rev-ta" name="comment" maxlength="1000" data-i18n-ph="reviewPh" placeholder="Share your experience…"><?= htmlspecialchars($myRev['comment'] ?? '', ENT_QUOTES) ?></textarea>
              <div style="margin-top:12px"><button class="btn primary" type="submit"><?= $myRev ? '<span data-i18n="reviewUpdate">Update review</span>' : '<span data-i18n="reviewPublish">Publish review</span>' ?></button></div>
            </form>
          </div>
        <?php else: ?>
          <div class="rev-cta">
            <span data-i18n="reviewsLoginPrompt">Log in to leave a review.</span>
            <a class="btn ghost" href="<?= e(BASE) ?>/login.php" data-i18n="navLogin">Log in</a>
          </div>
        <?php endif; ?>

        <div class="rev-list">
          <?php if ($revList): foreach ($revList as $r):
            $ini = strtoupper(mb_substr($r['username'], 0, 2));
            $cmt = nl2br(htmlspecialchars($r['comment'], ENT_QUOTES, 'UTF-8')); ?>
            <div class="rev-item">
              <span class="ra"><?= htmlspecialchars($ini, ENT_QUOTES) ?></span>
              <div class="rev-body">
                <div class="rev-top">
                  <span class="who"><?= htmlspecialchars($r['username'], ENT_QUOTES) ?></span>
                  <?= review_badges(($r['role'] ?? '')==='admin', $r['owned']) ?>
                  <span class="when"><?= date('d M Y', strtotime($r['created_at'])) ?></span>
                </div>
                <div class="rev-st"><?= rw_stars((int)$r['rating']) ?></div>
                <p><?= $cmt ?></p>
                <?php if (!empty($replies[(int)$r['id']])): $rep = $replies[(int)$r['id']]; ?>
                  <div class="adminreply">
                    <div class="arhead"><?= role_badge(true) ?><span class="lbl">infinity3113</span><span class="when"><?= date('d M Y', strtotime($rep['admin_reply_at'])) ?></span></div>
                    <p><?= nl2br(htmlspecialchars($rep['admin_reply'], ENT_QUOTES, 'UTF-8')) ?></p>
                  </div>
                <?php endif; ?>
              </div>
            </div>
          <?php endforeach; else: ?>
            <p class="rev-empty" data-i18n="reviewsNone">No reviews yet — be the first!</p>
          <?php endif; ?>
        </div>
      </section>

    </main>
  </div>

  <footer><div class="in">
    <span data-i18n="footMade">Made by infinity3113 · ContractRPG</span>
    <span class="dom">infinity3113.mc-paradise.com/plugins/contractrpg</span>
  </div></footer>
</div>

<script>
(function(){
  var I18N={
    en:{brandSub:"Minecraft Plugins",sideDocs:"Documentation",navHubPlugins:"Plugins",navMyPanel:"My panel",navLogout:"Log out",navLogin:"Log in",navRegister:"Sign up",
      navOverview:"Overview",navInstall:"Installation",navMissions:"Mission types",navCommands:"Commands",navPerms:"Permissions",navPlaceholders:"Placeholders",navConfig:"Configuration",navReviews:"Reviews",
      heroBadge:"RPG contracts for Minecraft · 1.21+",heroTagline:"Daily, weekly, special and server-wide contracts. Players hunt, mine, fish, craft and deliver to earn money, XP, points and loot — with a shop, ranks, rarities and a live boss-bar goal.",
      btnDownload:"Download (free)",btnInstall:"Installation",statVersion:"Version",statMc:"Minecraft",statNoneVal:"None",statDeps:"Required deps",statLangs:"Languages",
      mtHunt:"Hunting",mtHuntEx:"Kill 15 zombies",mtMine:"Mining",mtMineEx:"Break 32 coal ore",mtFish:"Fishing",mtFishEx:"Fish 10 cod",mtMythic:"Hunt MythicMob",mtMythicEx:"Slay a boss",mtGlobal:"Global goal",mtGlobalEx:"Whole server · boss bar",
      featuresTitle:"Everything a mission system needs",
      f1t:"Daily / Weekly / Special",f1d:"Offers lock per period, completed ones are marked, and specials complete only once.",
      f2t:"7 mission types",f2d:"Hunt mobs, mine, fish, craft, deliver items, deliver MMOItems and hunt MythicMobs.",
      f3t:"Rich rewards",f3d:"Money (Vault), XP, contract points and item loot tables with drop chances.",
      f4t:"Rarity system",f4d:"Common / Rare / Legendary — rarer contracts get more likely as players level up.",
      f5t:"Point shop",f5d:"Spend points on items. Stock, cooldown, one-time buys, level unlocks and discounts.",
      f6t:"Leaderboards",f6d:"/contract top by level, points or contracts — with PlaceholderAPI for holograms.",
      f7t:"Global contracts",f7d:"Community goals the whole server fills together, shown on a live boss bar.",
      f8t:"Reroll & leveling",f8d:"Reroll offered contracts for points; a level system with milestone rewards.",
      f9t:"In-game editor",f9d:"Create, edit and delete contracts from a GUI — no config editing needed.",
      noReqT:"No required dependencies.",noReqD:"ContractRPG runs on its own. Vault, Citizens, MythicMobs, MMOItems, MMOCore and PlaceholderAPI are all optional and activate automatically.",
      instLead:"Get ContractRPG running in a minute — it needs no other plugin to start.",instStepsT:"Steps",
      ist1:"Download <b>ContractRPG.jar</b> and drop it into your server's <b>plugins/</b> folder.",ist2:"<b>Restart</b> the server (Java 21 required for 1.21+).",ist3:"(Optional) Install any integrations you want: Vault + economy, Citizens, MythicMobs, MythicLib, MMOItems, MMOCore, PlaceholderAPI.",ist4:"Edit the config files and run <code>/contract reload</code>.",
      instReq:"Integrations (all optional)",thPlugin:"Plugin",thWhatFor:"What it unlocks",
      rq1:"Money rewards (EssentialsX, CMI, any economy)",rq2:"Item-delivery contracts (NPC)",rq3:"Hunt-MythicMob contracts",rq4:"Deliver-MMOItem contracts",rq5:"Use MMOCore levels/XP instead of the built-in one",rq6:"Placeholders for scoreboards & holograms",
      instNote:"New language keys are added to your lang files automatically on startup — no reset needed.",
      missLead:"Every contract is one of these objectives. All progress is event-based — you must do it yourself.",thType:"Type",thObjective:"Objective",
      mm1:"Kill mobs (cows, zombies, creepers…)",mm2:"Break blocks / mine ores",mm3:"Reel in fish with a rod (giving fish doesn't count)",mm4:"Craft items",mm5:"Deliver items to a Citizens NPC",mm6:"Deliver MMOItems to an NPC",mm7:"Kill MythicMobs",
      thExample:"Example",objT:"How to fill the mission-objective field",objLead:"Names come straight from Minecraft's own enums (materials & entities): always UPPERCASE with underscores. One value per contract.",
      ob1:"Entity name",ob2:"Block / ore material",ob3:"Material you reel in",ob4:"Crafted material",ob5:"Material handed to the NPC",ob6:"MMOItem as TYPE:ID",ob7:"MythicMob internal name",
      objTip:"Not sure of a name? Use the in-game editor (<code>/contract create</code>): it gives you a clickable picker for mobs, fish and MythicMobs, or just reads the item in your hand for mining / crafting / deliver.",
      objFullT:"One full example per type (copy-paste into daily.yml / weekly.yml)",
      tierD:"The default files ship <b>24 daily</b>, <b>12 weekly</b> and <b>20+ special</b> contracts, weighted by tier: many Common, fewer Rare, only a handful of Legendary — so higher tiers are rarer to roll.",
      cmdRewT:"Custom reward commands",cmdRewD:"<code>rewards:</code> is a list of console commands run when the contract is completed — use <code>%player%</code> for the player. <code>display-rewards:</code> is the human-readable text players see. Money is just the <code>eco give</code> command; you can add any command (ranks, kits, crates…).",cmdRewTip:"You can do all of this in-game too: in the mission editor press <b>Reward commands</b> — left-click to add one (type <code>command | display text</code>), right-click to clear them all.",
      rewardsT:"Rewards & rarity",rewardsD:"Contracts pay money, XP, contract points and optional item loot (with drop chances). Each contract has a rarity (Common / Rare / Legendary) that changes its color, glow and how often it appears — and higher-level players see more rare/legendary contracts.",
      cmdLead:"Base command <code>/contract</code> — aliases <code>/contracts</code>, <code>/crpg</code>.",cmdPlayerT:"Players",cmdAdminT:"Admin",thCmd:"Command",thDesc:"What it does",
      pc1:"Open the contracts menu",pc2:"Open the point shop",pc3:"Leaderboard",pc4:"View the active global contract & rewards",pc5:"Command list",pc6:"Plugin version & author",
      ac1:"Create a contract (GUI)",ac2:"Edit / delete contracts (GUI, by category)",ac3:"Reload config, languages & shop",ac4:"Force a mission reset for online players",ac5:"Reset a player's data",ac6:"Manage contract points",ac7:"Change a player's level",ac8:"In-game shop editor",ac9:"Manage the global contract",ac10:"List placeholders",
      permLead:"Grant these with LuckPerms or any permissions plugin.",thPerm:"Permission",thDefault:"Default",
      pp1:"Base command & menu",pp2:"Open the shop",pp3:"Reload",pp4:"Mission reset",pp5:"Shop editor",pp6:"Placeholder list",pp7:"Admin: create/edit, points, level, resetplayer",
      phLead:"Requires PlaceholderAPI. Great for scoreboards and DecentHolograms leaderboards.",
      cfgLead:"Clean, commented files — most of it can be done in-game with the mission editor.",thFile:"File",
      cf1:"Leveling, storage, reroll, rarities, leaderboard, global contracts",cf2:"Your contracts",cf3:"Server-wide global contracts",cf4:"Managed in-game with /contract shopedit",cf5:"Every message, fully editable",cfgExampleT:"Example contract (with rarity + loot)",
      reviewsTitle:"Player reviews",reviewsSub:"What server owners think of ContractRPG.",reviewsWord:"reviews",reviewsNone:"No reviews yet — be the first!",reviewsLoginPrompt:"Log in to leave a review.",reviewWriteT:"Write a review",reviewEditT:"Edit your review",reviewUpdate:"Update review",reviewPublish:"Publish review",reviewPh:"Share your experience…",
      footMade:"Made by infinity3113 · ContractRPG"},

    es:{brandSub:"Plugins de Minecraft",sideDocs:"Documentación",navHubPlugins:"Plugins",navMyPanel:"Mi panel",navLogout:"Salir",navLogin:"Entrar",navRegister:"Crear cuenta",
      navOverview:"Inicio",navInstall:"Instalación",navMissions:"Tipos de misión",navCommands:"Comandos",navPerms:"Permisos",navPlaceholders:"Placeholders",navConfig:"Configuración",navReviews:"Reseñas",
      heroBadge:"Contratos RPG para Minecraft · 1.21+",heroTagline:"Contratos diarios, semanales, especiales y de todo el servidor. Caza, mina, pesca, craftea y entrega para ganar dinero, EXP, puntos y loot — con tienda, rangos, rarezas y una barra de jefe en vivo.",
      btnDownload:"Descargar (gratis)",btnInstall:"Instalación",statVersion:"Versión",statMc:"Minecraft",statNoneVal:"Ninguna",statDeps:"Deps obligatorias",statLangs:"Idiomas",
      mtHunt:"Cazar",mtHuntEx:"Mata 15 zombies",mtMine:"Minar",mtMineEx:"Rompe 32 carbón",mtFish:"Pescar",mtFishEx:"Pesca 10 bacalaos",mtMythic:"Cazar MythicMob",mtMythicEx:"Derrota un jefe",mtGlobal:"Objetivo global",mtGlobalEx:"Todo el server · boss bar",
      featuresTitle:"Todo lo que un sistema de misiones necesita",
      f1t:"Diarios / Semanales / Especiales",f1d:"Las ofertas se fijan por periodo, los completados se marcan, y los especiales se hacen una sola vez.",
      f2t:"7 tipos de misión",f2d:"Cazar mobs, minar, pescar, craftear, entregar ítems, entregar MMOItems y cazar MythicMobs.",
      f3t:"Recompensas ricas",f3d:"Dinero (Vault), EXP, puntos de contrato y tablas de loot con probabilidades.",
      f4t:"Sistema de rareza",f4d:"Común / Raro / Legendario — los raros salen más a mayor nivel del jugador.",
      f5t:"Tienda de puntos",f5d:"Gasta puntos en ítems. Stock, cooldown, compra única, desbloqueo por nivel y descuentos.",
      f6t:"Rankings",f6d:"/contract top por nivel, puntos o contratos — con PlaceholderAPI para hologramas.",
      f7t:"Contratos globales",f7d:"Objetivos comunitarios que todo el servidor cumple junto, con boss bar en vivo.",
      f8t:"Reroll y niveles",f8d:"Rerollea los contratos ofrecidos con puntos; sistema de niveles con recompensas por hito.",
      f9t:"Editor en el juego",f9d:"Crea, edita y borra contratos desde un GUI — sin tocar archivos.",
      noReqT:"Sin dependencias obligatorias.",noReqD:"ContractRPG funciona solo. Vault, Citizens, MythicMobs, MMOItems, MMOCore y PlaceholderAPI son opcionales y se activan solas.",
      instLead:"Pon ContractRPG en marcha en un minuto — no necesita otro plugin para arrancar.",instStepsT:"Pasos",
      ist1:"Descarga <b>ContractRPG.jar</b> y ponlo en la carpeta <b>plugins/</b> de tu servidor.",ist2:"<b>Reinicia</b> el servidor (Java 21 para 1.21+).",ist3:"(Opcional) Instala las integraciones que quieras: Vault + economía, Citizens, MythicMobs, MythicLib, MMOItems, MMOCore, PlaceholderAPI.",ist4:"Edita los archivos de config y ejecuta <code>/contract reload</code>.",
      instReq:"Integraciones (todas opcionales)",thPlugin:"Plugin",thWhatFor:"Qué desbloquea",
      rq1:"Recompensas en dinero (EssentialsX, CMI, cualquier economía)",rq2:"Contratos de entrega de ítems (NPC)",rq3:"Contratos de cazar MythicMob",rq4:"Contratos de entregar MMOItem",rq5:"Usar niveles/EXP de MMOCore en vez del interno",rq6:"Placeholders para scoreboards y hologramas",
      instNote:"Las claves de idioma nuevas se añaden solas a tus archivos al arrancar — sin resetear nada.",
      missLead:"Cada contrato es uno de estos objetivos. Todo el progreso es por evento — hay que hacerlo uno mismo.",thType:"Tipo",thObjective:"Objetivo",
      mm1:"Matar mobs (vacas, zombies, creepers…)",mm2:"Romper bloques / minar menas",mm3:"Pescar con caña (que te den peces no cuenta)",mm4:"Craftear ítems",mm5:"Entregar ítems a un NPC de Citizens",mm6:"Entregar MMOItems a un NPC",mm7:"Matar MythicMobs",
      thExample:"Ejemplo",objT:"Cómo llenar el campo mission-objective",objLead:"Los nombres vienen de los propios enums de Minecraft (materiales y entidades): siempre en MAYÚSCULAS con guiones bajos. Un valor por contrato.",
      ob1:"Nombre de la entidad",ob2:"Material del bloque / mena",ob3:"Material que pescas",ob4:"Material fabricado",ob5:"Material que entregas al NPC",ob6:"MMOItem como TIPO:ID",ob7:"Nombre interno del MythicMob",
      objTip:"¿No sabes un nombre? Usa el editor en el juego (<code>/contract create</code>): te da un selector para mobs, peces y MythicMobs, o lee el ítem que tengas en la mano para minar / fabricar / entregar.",
      objFullT:"Un ejemplo completo por tipo (copia y pega en daily.yml / weekly.yml)",
      tierD:"Los archivos por defecto traen <b>24 diarias</b>, <b>12 semanales</b> y <b>20+ especiales</b>, repartidas por tier: muchas Comunes, menos Raras y muy pocas Legendarias — así los tiers altos salen menos.",
      cmdRewT:"Comandos de recompensa personalizados",cmdRewD:"<code>rewards:</code> es una lista de comandos de consola que se ejecutan al completar el contrato — usa <code>%player%</code> para el jugador. <code>display-rewards:</code> es el texto legible que ven los jugadores. El dinero es solo el comando <code>eco give</code>; puedes añadir cualquier comando (rangos, kits, cofres…).",cmdRewTip:"También puedes hacer todo esto en el juego: en el editor de misiones pulsa <b>Comandos de recompensa</b> — clic izquierdo para añadir uno (escribe <code>comando | texto visible</code>), clic derecho para borrarlos todos.",
      rewardsT:"Recompensas y rareza",rewardsD:"Los contratos pagan dinero, EXP, puntos de contrato y loot de ítems opcional (con probabilidad). Cada contrato tiene una rareza (Común / Raro / Legendario) que cambia su color, brillo y frecuencia — y a más nivel salen más raros/legendarios.",
      cmdLead:"Comando base <code>/contract</code> — alias <code>/contracts</code>, <code>/crpg</code>.",cmdPlayerT:"Jugadores",cmdAdminT:"Administrador",thCmd:"Comando",thDesc:"Qué hace",
      pc1:"Abre el menú de contratos",pc2:"Abre la tienda de puntos",pc3:"Ranking",pc4:"Ver el contrato global activo y sus recompensas",pc5:"Lista de comandos",pc6:"Versión y autor del plugin",
      ac1:"Crear un contrato (GUI)",ac2:"Editar / borrar contratos (GUI, por categoría)",ac3:"Recargar config, idiomas y tienda",ac4:"Forzar reinicio de misiones a los conectados",ac5:"Reiniciar los datos de un jugador",ac6:"Gestionar puntos de contrato",ac7:"Cambiar el nivel de un jugador",ac8:"Editor de la tienda en el juego",ac9:"Gestionar el contrato global",ac10:"Listar placeholders",
      permLead:"Otórgalos con LuckPerms o cualquier plugin de permisos.",thPerm:"Permiso",thDefault:"Por defecto",
      pp1:"Comando base y menú",pp2:"Abrir la tienda",pp3:"Recargar",pp4:"Reinicio de misiones",pp5:"Editor de tienda",pp6:"Lista de placeholders",pp7:"Admin: crear/editar, puntos, nivel, resetplayer",
      phLead:"Requiere PlaceholderAPI. Ideal para scoreboards y rankings en DecentHolograms.",
      cfgLead:"Archivos limpios y comentados — casi todo se puede hacer en el juego con el editor.",thFile:"Archivo",
      cf1:"Niveles, almacenamiento, reroll, rarezas, ranking, contratos globales",cf2:"Tus contratos",cf3:"Contratos globales del servidor",cf4:"Se gestiona en el juego con /contract shopedit",cf5:"Cada mensaje, totalmente editable",cfgExampleT:"Contrato de ejemplo (con rareza + loot)",
      reviewsTitle:"Reseñas de jugadores",reviewsSub:"Lo que opinan los dueños de servidores sobre ContractRPG.",reviewsWord:"reseñas",reviewsNone:"Aún no hay reseñas — ¡sé el primero!",reviewsLoginPrompt:"Inicia sesión para dejar una reseña.",reviewWriteT:"Escribir reseña",reviewEditT:"Edita tu reseña",reviewUpdate:"Actualizar reseña",reviewPublish:"Publicar reseña",reviewPh:"Comparte tu experiencia…",
      footMade:"Hecho por infinity3113 · ContractRPG"},

    fr:{brandSub:"Plugins Minecraft",sideDocs:"Documentation",navHubPlugins:"Plugins",navMyPanel:"Mon espace",navLogout:"Déconnexion",navLogin:"Se connecter",navRegister:"S'inscrire",
      navOverview:"Accueil",navInstall:"Installation",navMissions:"Types de mission",navCommands:"Commandes",navPerms:"Permissions",navPlaceholders:"Placeholders",navConfig:"Configuration",navReviews:"Avis",
      heroBadge:"Contrats RPG pour Minecraft · 1.21+",heroTagline:"Contrats journaliers, hebdomadaires, spéciaux et à l'échelle du serveur. Chasse, mine, pêche, fabrique et livre pour gagner argent, XP, points et butin — avec boutique, rangs, raretés et une barre de boss en direct.",
      btnDownload:"Télécharger (gratuit)",btnInstall:"Installation",statVersion:"Version",statMc:"Minecraft",statNoneVal:"Aucune",statDeps:"Deps requises",statLangs:"Langues",
      mtHunt:"Chasse",mtHuntEx:"Tue 15 zombies",mtMine:"Minage",mtMineEx:"Casse 32 charbon",mtFish:"Pêche",mtFishEx:"Pêche 10 morues",mtMythic:"Chasse MythicMob",mtMythicEx:"Bats un boss",mtGlobal:"Objectif global",mtGlobalEx:"Tout le serveur · boss bar",
      featuresTitle:"Tout ce qu'un système de missions demande",
      f1t:"Journalier / Hebdo / Spécial",f1d:"Les offres se figent par période, les terminés sont marqués, et les spéciaux se font une seule fois.",
      f2t:"7 types de mission",f2d:"Chasser des mobs, miner, pêcher, fabriquer, livrer des objets, livrer des MMOItems et chasser des MythicMobs.",
      f3t:"Récompenses riches",f3d:"Argent (Vault), XP, points de contrat et tables de butin avec probabilités.",
      f4t:"Système de rareté",f4d:"Commun / Rare / Légendaire — les rares apparaissent plus au fil des niveaux.",
      f5t:"Boutique de points",f5d:"Dépense des points en objets. Stock, délai, achat unique, déblocage par niveau et remises.",
      f6t:"Classements",f6d:"/contract top par niveau, points ou contrats — avec PlaceholderAPI pour hologrammes.",
      f7t:"Contrats globaux",f7d:"Objectifs communautaires remplis par tout le serveur, sur une barre de boss en direct.",
      f8t:"Relance & niveaux",f8d:"Relance les contrats proposés avec des points ; système de niveaux à récompenses.",
      f9t:"Éditeur en jeu",f9d:"Crée, modifie et supprime des contrats depuis une GUI — sans toucher aux fichiers.",
      noReqT:"Aucune dépendance requise.",noReqD:"ContractRPG fonctionne seul. Vault, Citizens, MythicMobs, MMOItems, MMOCore et PlaceholderAPI sont optionnels et s'activent tout seuls.",
      instLead:"Lancez ContractRPG en une minute — aucun autre plugin requis pour démarrer.",instStepsT:"Étapes",
      ist1:"Téléchargez <b>ContractRPG.jar</b> et placez-le dans le dossier <b>plugins/</b>.",ist2:"<b>Redémarrez</b> le serveur (Java 21 pour 1.21+).",ist3:"(Optionnel) Installez les intégrations voulues : Vault + économie, Citizens, MythicMobs, MythicLib, MMOItems, MMOCore, PlaceholderAPI.",ist4:"Éditez les fichiers de config et lancez <code>/contract reload</code>.",
      instReq:"Intégrations (toutes optionnelles)",thPlugin:"Plugin",thWhatFor:"Ce que ça débloque",
      rq1:"Récompenses en argent (EssentialsX, CMI, toute économie)",rq2:"Contrats de livraison d'objets (NPC)",rq3:"Contrats de chasse MythicMob",rq4:"Contrats de livraison MMOItem",rq5:"Utiliser les niveaux/XP de MMOCore au lieu de l'interne",rq6:"Placeholders pour scoreboards & hologrammes",
      instNote:"Les nouvelles clés de langue sont ajoutées automatiquement au démarrage — aucun reset requis.",
      missLead:"Chaque contrat est l'un de ces objectifs. Toute progression est basée sur les événements — à faire soi-même.",thType:"Type",thObjective:"Objectif",
      mm1:"Tuer des mobs (vaches, zombies, creepers…)",mm2:"Casser des blocs / miner des minerais",mm3:"Pêcher à la canne (recevoir du poisson ne compte pas)",mm4:"Fabriquer des objets",mm5:"Livrer des objets à un NPC Citizens",mm6:"Livrer des MMOItems à un NPC",mm7:"Tuer des MythicMobs",
      thExample:"Exemple",objT:"Comment remplir le champ mission-objective",objLead:"Les noms viennent des enums de Minecraft (matériaux et entités) : toujours en MAJUSCULES avec des underscores. Une valeur par contrat.",
      ob1:"Nom de l'entité",ob2:"Matériau du bloc / minerai",ob3:"Matériau que tu pêches",ob4:"Matériau fabriqué",ob5:"Matériau livré au NPC",ob6:"MMOItem au format TYPE:ID",ob7:"Nom interne du MythicMob",
      objTip:"Un doute sur un nom ? Utilise l'éditeur en jeu (<code>/contract create</code>) : il propose un sélecteur pour mobs, poissons et MythicMobs, ou lit l'objet dans ta main pour miner / fabriquer / livrer.",
      objFullT:"Un exemple complet par type (à copier dans daily.yml / weekly.yml)",
      tierD:"Les fichiers par défaut fournissent <b>24 quotidiens</b>, <b>12 hebdomadaires</b> et <b>20+ spéciaux</b>, pondérés par tier : beaucoup de Communs, moins de Rares, très peu de Légendaires — les tiers élevés sortent donc moins souvent.",
      cmdRewT:"Commandes de récompense personnalisées",cmdRewD:"<code>rewards:</code> est une liste de commandes console exécutées à la fin du contrat — utilise <code>%player%</code> pour le joueur. <code>display-rewards:</code> est le texte lisible que voient les joueurs. L'argent n'est que la commande <code>eco give</code> ; tu peux ajouter n'importe quelle commande (grades, kits, caisses…).",cmdRewTip:"Tu peux tout faire en jeu aussi : dans l'éditeur de mission, clique sur <b>Commandes de récompense</b> — clic gauche pour en ajouter une (écris <code>commande | texte affiché</code>), clic droit pour tout effacer.",
      rewardsT:"Récompenses & rareté",rewardsD:"Les contrats paient argent, XP, points de contrat et butin d'objets optionnel (avec probabilités). Chaque contrat a une rareté (Commun / Rare / Légendaire) qui change sa couleur, sa brillance et sa fréquence — et plus le niveau est haut, plus il y a de rares/légendaires.",
      cmdLead:"Commande de base <code>/contract</code> — alias <code>/contracts</code>, <code>/crpg</code>.",cmdPlayerT:"Joueurs",cmdAdminT:"Administration",thCmd:"Commande",thDesc:"Effet",
      pc1:"Ouvre le menu des contrats",pc2:"Ouvre la boutique de points",pc3:"Classement",pc4:"Voir le contrat global actif & ses récompenses",pc5:"Liste des commandes",pc6:"Version & auteur du plugin",
      ac1:"Créer un contrat (GUI)",ac2:"Modifier / supprimer des contrats (GUI, par catégorie)",ac3:"Recharger config, langues & boutique",ac4:"Forcer une réinitialisation pour les connectés",ac5:"Réinitialiser les données d'un joueur",ac6:"Gérer les points de contrat",ac7:"Changer le niveau d'un joueur",ac8:"Éditeur de boutique en jeu",ac9:"Gérer le contrat global",ac10:"Lister les placeholders",
      permLead:"Attribuez-les avec LuckPerms ou tout plugin de permissions.",thPerm:"Permission",thDefault:"Défaut",
      pp1:"Commande de base & menu",pp2:"Ouvrir la boutique",pp3:"Recharger",pp4:"Réinitialisation des missions",pp5:"Éditeur de boutique",pp6:"Liste des placeholders",pp7:"Admin : créer/modifier, points, niveau, resetplayer",
      phLead:"Nécessite PlaceholderAPI. Parfait pour scoreboards et classements DecentHolograms.",
      cfgLead:"Fichiers propres et commentés — l'essentiel se fait en jeu avec l'éditeur.",thFile:"Fichier",
      cf1:"Niveaux, stockage, relance, raretés, classement, contrats globaux",cf2:"Vos contrats",cf3:"Contrats globaux du serveur",cf4:"Géré en jeu avec /contract shopedit",cf5:"Chaque message, entièrement modifiable",cfgExampleT:"Contrat d'exemple (avec rareté + butin)",
      reviewsTitle:"Avis des joueurs",reviewsSub:"Ce que les propriétaires de serveurs pensent de ContractRPG.",reviewsWord:"avis",reviewsNone:"Aucun avis pour l'instant — soyez le premier !",reviewsLoginPrompt:"Connectez-vous pour laisser un avis.",reviewWriteT:"Écrire un avis",reviewEditT:"Modifier votre avis",reviewUpdate:"Mettre à jour",reviewPublish:"Publier l'avis",reviewPh:"Partagez votre expérience…",
      footMade:"Créé par infinity3113 · ContractRPG"},

    zh:{brandSub:"Minecraft 插件",sideDocs:"文档",navHubPlugins:"插件",navMyPanel:"我的面板",navLogout:"退出",navLogin:"登录",navRegister:"注册",
      navOverview:"概览",navInstall:"安装",navMissions:"任务类型",navCommands:"指令",navPerms:"权限",navPlaceholders:"占位符",navConfig:"配置",navReviews:"评价",
      heroBadge:"Minecraft RPG 契约 · 1.21+",heroTagline:"每日、每周、特殊以及全服契约。玩家通过击杀、挖矿、钓鱼、合成和交付赚取金钱、经验、点数和掉落——还有商店、等级、稀有度和实时 Boss 血条目标。",
      btnDownload:"下载（免费）",btnInstall:"安装",statVersion:"版本",statMc:"Minecraft",statNoneVal:"无",statDeps:"必需依赖",statLangs:"语言",
      mtHunt:"狩猎",mtHuntEx:"击杀 15 只僵尸",mtMine:"挖矿",mtMineEx:"开采 32 煤矿",mtFish:"钓鱼",mtFishEx:"钓 10 条鳕鱼",mtMythic:"击杀 MythicMob",mtMythicEx:"击败一个首领",mtGlobal:"全局目标",mtGlobalEx:"全服 · Boss 血条",
      featuresTitle:"任务系统所需的一切",
      f1t:"每日 / 每周 / 特殊",f1d:"每期锁定所提供的契约，已完成的会被标记，特殊契约只能完成一次。",
      f2t:"7 种任务类型",f2d:"击杀生物、挖矿、钓鱼、合成、交付物品、交付 MMOItems 以及击杀 MythicMobs。",
      f3t:"丰厚奖励",f3d:"金钱（Vault）、经验、契约点数和带概率的物品掉落表。",
      f4t:"稀有度系统",f4d:"普通 / 稀有 / 传奇——玩家等级越高，稀有契约出现越多。",
      f5t:"点数商店",f5d:"用点数购买物品。库存、冷却、限购一次、等级解锁与折扣。",
      f6t:"排行榜",f6d:"/contract top 按等级、点数或契约——支持 PlaceholderAPI 用于全息。",
      f7t:"全局契约",f7d:"全服共同完成的社区目标，显示在实时 Boss 血条上。",
      f8t:"刷新与等级",f8d:"用点数刷新所提供的契约；带里程碑奖励的等级系统。",
      f9t:"游戏内编辑器",f9d:"通过 GUI 创建、编辑和删除契约——无需编辑文件。",
      noReqT:"无必需依赖。",noReqD:"ContractRPG 可独立运行。Vault、Citizens、MythicMobs、MMOItems、MMOCore 和 PlaceholderAPI 均为可选，会自动启用。",
      instLead:"一分钟内运行 ContractRPG——启动无需任何其他插件。",instStepsT:"步骤",
      ist1:"下载 <b>ContractRPG.jar</b> 并放入服务器的 <b>plugins/</b> 文件夹。",ist2:"<b>重启</b>服务器（1.21+ 需要 Java 21）。",ist3:"（可选）安装你想要的集成：Vault + 经济、Citizens、MythicMobs、MythicLib、MMOItems、MMOCore、PlaceholderAPI。",ist4:"编辑配置文件并运行 <code>/contract reload</code>。",
      instReq:"集成（全部可选）",thPlugin:"插件",thWhatFor:"解锁内容",
      rq1:"金钱奖励（EssentialsX、CMI、任意经济）",rq2:"物品交付契约（NPC）",rq3:"击杀 MythicMob 契约",rq4:"交付 MMOItem 契约",rq5:"使用 MMOCore 的等级/经验代替内置",rq6:"用于计分板和全息的占位符",
      instNote:"新的语言键会在启动时自动加入你的语言文件——无需重置。",
      missLead:"每个契约都是以下目标之一。所有进度均基于事件——必须亲自完成。",thType:"类型",thObjective:"目标",
      mm1:"击杀生物（牛、僵尸、苦力怕…）",mm2:"破坏方块 / 开采矿石",mm3:"用鱼竿钓鱼（别人给你鱼不算）",mm4:"合成物品",mm5:"向 Citizens NPC 交付物品",mm6:"向 NPC 交付 MMOItems",mm7:"击杀 MythicMobs",
      thExample:"示例",objT:"如何填写 mission-objective",objLead:"名称直接来自 Minecraft 自身的枚举（材料与实体）：始终使用大写加下划线。每个契约一个值。",
      ob1:"实体名称",ob2:"方块 / 矿石材料",ob3:"钓上来的材料",ob4:"合成的材料",ob5:"上交给 NPC 的材料",ob6:"MMOItem，格式 TYPE:ID",ob7:"MythicMob 内部名称",
      objTip:"不确定名称？用游戏内编辑器（<code>/contract create</code>）：它为生物、鱼和 MythicMob 提供可点击的选择器，或直接读取你手上的物品用于挖矿 / 合成 / 交付。",
      objFullT:"每种类型的完整示例（复制到 daily.yml / weekly.yml）",
      tierD:"默认文件包含 <b>24 个每日</b>、<b>12 个每周</b> 和 <b>20+ 个特殊</b> 契约，按稀有度加权：普通很多、稀有较少、传奇极少——所以高稀有度更难刷出。",
      cmdRewT:"自定义奖励指令",cmdRewD:"<code>rewards:</code> 是契约完成时执行的控制台指令列表——用 <code>%player%</code> 代表玩家。<code>display-rewards:</code> 是玩家看到的可读文本。金钱只是 <code>eco give</code> 指令；你可以添加任何指令（头衔、礼包、宝箱……）。",cmdRewTip:"这些也都能在游戏内完成：在任务编辑器中点击 <b>奖励指令</b>——左键添加一条（输入 <code>指令 | 显示文本</code>），右键全部清除。",
      rewardsT:"奖励与稀有度",rewardsD:"契约提供金钱、经验、契约点数和可选的物品掉落（带概率）。每个契约有稀有度（普通 / 稀有 / 传奇），影响其颜色、光效和出现频率——等级越高，稀有/传奇契约越多。",
      cmdLead:"主指令 <code>/contract</code> — 别名 <code>/contracts</code>、<code>/crpg</code>。",cmdPlayerT:"玩家",cmdAdminT:"管理员",thCmd:"指令",thDesc:"功能",
      pc1:"打开契约菜单",pc2:"打开点数商店",pc3:"排行榜",pc4:"查看进行中的全局契约及奖励",pc5:"指令列表",pc6:"插件版本与作者",
      ac1:"创建契约（GUI）",ac2:"编辑 / 删除契约（GUI，按类别）",ac3:"重载配置、语言与商店",ac4:"为在线玩家强制重置任务",ac5:"重置某玩家的数据",ac6:"管理契约点数",ac7:"更改玩家等级",ac8:"游戏内商店编辑器",ac9:"管理全局契约",ac10:"列出占位符",
      permLead:"用 LuckPerms 或任意权限插件授予。",thPerm:"权限",thDefault:"默认",
      pp1:"基础指令与菜单",pp2:"打开商店",pp3:"重载",pp4:"任务重置",pp5:"商店编辑器",pp6:"占位符列表",pp7:"管理员：创建/编辑、点数、等级、resetplayer",
      phLead:"需要 PlaceholderAPI。适合计分板和 DecentHolograms 排行榜。",
      cfgLead:"整洁且带注释的文件——大部分可在游戏内用编辑器完成。",thFile:"文件",
      cf1:"等级、存储、刷新、稀有度、排行榜、全局契约",cf2:"你的契约",cf3:"全服全局契约",cf4:"在游戏内用 /contract shopedit 管理",cf5:"每条消息均可编辑",cfgExampleT:"契约示例（含稀有度 + 掉落）",
      reviewsTitle:"玩家评价",reviewsSub:"服务器主对 ContractRPG 的看法。",reviewsWord:"条评价",reviewsNone:"还没有评价——来做第一个吧！",reviewsLoginPrompt:"登录后即可评价。",reviewWriteT:"写评价",reviewEditT:"编辑你的评价",reviewUpdate:"更新评价",reviewPublish:"发布评价",reviewPh:"分享你的体验…",
      footMade:"由 infinity3113 制作 · ContractRPG"}
  };
  var htmlKeys={ist1:1,ist3:1,ist4:1,cmdLead:1,objTip:1,objFullT:0,tierD:1,cmdRewD:1,cmdRewTip:1};
  function setLang(l){
    var d=I18N[l]||I18N.en;
    document.querySelectorAll('[data-i18n]').forEach(function(el){
      var k=el.getAttribute('data-i18n'); if(d[k]==null) return;
      if(htmlKeys[k]) el.innerHTML=d[k]; else el.textContent=d[k];
    });
    document.querySelectorAll('[data-i18n-ph]').forEach(function(el){
      var k=el.getAttribute('data-i18n-ph'); if(d[k]!=null) el.setAttribute('placeholder',d[k]);
    });
    document.querySelectorAll('.langsw button').forEach(function(b){b.classList.toggle('on',b.getAttribute('data-lang')===l);});
    try{document.documentElement.lang=l;localStorage.setItem('lang',l);}catch(e){}
    document.cookie='lang='+l+';path=/;max-age=31536000';
  }
  document.querySelectorAll('.langsw button').forEach(function(b){
    b.addEventListener('click',function(){setLang(b.getAttribute('data-lang'));});
  });
  (function(){var s;try{s=localStorage.getItem('lang');}catch(e){}
    if(!s){var m=document.cookie.match(/(?:^|;\s*)lang=([^;]+)/);s=m?m[1]:'es';}
    setLang(s);})();

  function show(p){
    document.querySelectorAll('.page').forEach(function(s){s.classList.toggle('active',s.getAttribute('data-p')===p);});
    document.querySelectorAll('.sidenav a').forEach(function(a){a.classList.toggle('on',a.getAttribute('data-page')===p);});
    window.scrollTo({top:0,behavior:'smooth'});
  }
  document.querySelectorAll('[data-page]').forEach(function(a){
    a.addEventListener('click',function(e){e.preventDefault();show(a.getAttribute('data-page'));});
  });

  var rIn=document.getElementById('rating'), sp=document.getElementById('starpick');
  if(rIn && sp){
    var rating=+rIn.value||0, st=sp.querySelectorAll('span');
    function paint(n){st.forEach(function(s,i){s.classList.toggle('hot',i<n);});}
    st.forEach(function(s){
      s.addEventListener('mouseenter',function(){paint(+s.getAttribute('data-v'));});
      s.addEventListener('click',function(){rating=+s.getAttribute('data-v');rIn.value=rating;paint(rating);});
    });
    sp.addEventListener('mouseleave',function(){paint(rating);});
    paint(rating);
  }
  if(/[?&]saved/.test(location.search)) show('reviews');
})();
</script>
</body>
</html>
