This commit is contained in:
2025-06-16 23:45:27 -04:00
parent 1ad58b62ad
commit 83e6e64ac9
5 changed files with 2515 additions and 3 deletions

View File

@ -137,7 +137,7 @@
</div>
</div>
<p class="text-lg max-w-3xl mx-auto opacity-90 leading-relaxed">
<strong>Special Note:</strong> Its always <code class="bg-gray-800 text-teal-400 px-1 rounded">127.0.0.1</code>—say goodbye to the internet and hello to localhost!
<CENTER>Its always <code class="bg-gray-800 text-teal-400 px-1 rounded">127.0.0.1</code>—say goodbye to the internet and hello to localhost!</CENTER>
</p>
</section>
@ -159,7 +159,7 @@
</div>
</div>
<p class="text-lg max-w-3xl mx-auto opacity-90 leading-relaxed">
<strong>Ready to code?</strong><BR>Dive into our <a href="https://wiki.my-mc.link/en/api" class="underline text-teal-400 hover:text-blue-400">API documentation</a> and <a href="https://wiki.my-mc.link/en/mymc-lib" class="underline text-teal-400 hover:text-blue-400">MyMCLib guide</a> to start building today!
<strong>Ready to code?</strong><BR>Dive into our <a href="https://info.my-mc.link/api/" class="underline text-teal-400 hover:text-blue-400">API documentation</a> and <a href="https://info.my-mc.link/mymc-lib/" class="underline text-teal-400 hover:text-blue-400">MyMCLib guide</a> to start building today!
</p>
</section>
@ -173,7 +173,7 @@
</p>
<div class="flex justify-center gap-4 flex-wrap">
<a href="https://join.my-mc.link" class="btn-minecraft text-base" target="_blank">Join Our Discord</a>
<a href="https://wiki.my-mc.link" class="btn-minecraft text-base" target="_blank">Explore the Wiki</a>
<a href="https://info.my-mc.link" class="btn-minecraft text-base" target="_blank">Explore the Wiki</a>
</div>
</section>

896
wiki/api/index.html Normal file
View File

@ -0,0 +1,896 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>My-MC.Link API Wiki</title>
<link rel="icon" href="https://minecraft.wiki/images/Favicon.png" type="image/png">
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;700;900&display=swap" rel="stylesheet">
<link href="https://my-mc.link/mc/css/style_min.css" rel="stylesheet">
<link href="https://my-mc.link/mc/favicon.ico" rel="icon" type="image/x-icon">
<!-- Prism.js for syntax highlighting -->
<link href="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/themes/prism-okaidia.min.css" rel="stylesheet">
<style>
.code-block-wrapper {
position: relative;
margin-bottom: 1rem;
}
.copy-button {
position: absolute;
top: 0.5rem;
right: 0.5rem;
background: #2d3748;
color: #e2e8f0;
border: none;
padding: 0.5rem;
border-radius: 0.25rem;
cursor: pointer;
font-size: 0.875rem;
transition: background 0.2s;
}
.copy-button:hover {
background: #4a5568;
}
.copy-button.copied {
background: #2f855a;
}
pre[class*="language-"] {
margin: 0;
padding: 1rem;
border-radius: 0.5rem;
position: relative;
}
/* Table of Contents Styles */
.toc {
background: rgba(17, 24, 39, 0.8);
backdrop-filter: blur(10px);
border-radius: 12px;
padding: 1.5rem;
margin: 2rem auto;
max-width: 800px;
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}
.toc h2 {
font-family: 'minecraft-font', sans-serif;
font-size: 1.75rem;
text-align: center;
background: linear-gradient(to right, #14b8a6, #3b82f6);
-webkit-background-clip: text;
background-clip: text;
color: transparent;
margin-bottom: 1.5rem;
}
.toc ul {
list-style: none;
padding: 0;
}
.toc ul ul {
padding-left: 1.5rem;
}
.toc li {
margin: 0.75rem 0;
}
.toc a {
color: #d1d5db;
text-decoration: none;
font-size: 1.125rem;
font-weight: 500;
transition: color 0.3s ease, transform 0.3s ease;
display: block;
padding: 0.5rem 1rem;
border-radius: 8px;
}
.toc ul ul a {
font-size: 1rem;
}
.toc a:hover {
color: #14b8a6;
transform: translateX(10px);
background: rgba(255, 255, 255, 0.05);
}
@media (max-width: 640px) {
.toc {
padding: 1rem;
margin: 1rem;
}
.toc h2 {
font-size: 1.5rem;
}
.toc a {
font-size: 1rem;
}
.toc ul ul a {
font-size: 0.875rem;
}
}
</style>
</head>
<body>
<!-- Particle Effects -->
<div class="particle" style="left: 10%; top: 20%; animation-delay: 0s;"></div>
<div class="particle large" style="left: 30%; top: 50%; animation-delay: 2s;"></div>
<div class="particle" style="left: 50%; top: 30%; animation-delay: 4s;"></div>
<div class="particle large" style="left: 70%; top: 60%; animation-delay: 6s;"></div>
<div class="particle" style="left: 20%; top: 80%; animation-delay: 8s;"></div>
<header class="header-bg py-16 text-center relative z-10">
<div class="header-content flex items-center justify-between max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
<div>
<h1 class="text-5xl minecraft-font bg-clip-text text-transparent bg-gradient-to-r from-teal-400 to-blue-500">
<a href="https://info.my-mc.link/">My-MC.Link API Wiki</a></h1>
<p class="text-lg mt-4 opacity-90 tracking-wide font-medium">Documentation for My-MC.Link REST API</p>
</div>
<a href="https://my-mc.link" class="btn-minecraft text-base self-center" target="_blank">Home</a>
</div>
</header>
<!-- Table of Contents -->
<nav class="toc">
<h2>Table of Contents</h2>
<ul>
<li><a href="#getting-started-with-the-api">Getting Started with the API</a></li>
<li>
<a href="#api-endpoints">API Endpoints</a>
<ul>
<li><a href="#get-hello">GET /hello</a></li>
<li><a href="#get-time">GET /time</a></li>
<li><a href="#get-stats">GET /stats</a></li>
<li><a href="#get-log">GET /log</a></li>
<li><a href="#get-start">GET /start</a></li>
<li><a href="#get-stop">GET /stop</a></li>
<li><a href="#get-restart">GET /restart</a></li>
<li><a href="#get-my-link">GET /my-link</a></li>
<li><a href="#get-my-geyser-link">GET /my-geyser-link</a></li>
<li><a href="#get-my-sftp">GET /my-sftp</a></li>
<li><a href="#get-my-hash">GET /my-hash</a></li>
<li><a href="#get-my-geyser-hash">GET /my-geyser-hash</a></li>
<li><a href="#get-my-sftp-hash">GET /my-sftp-hash</a></li>
<li><a href="#get-list-players">GET /list-players</a></li>
<li><a href="#get-website">GET /website</a></li>
<li><a href="#get-map">GET /map</a></li>
<li><a href="#post-ban">POST /ban</a></li>
<li><a href="#post-unban">POST /unban</a></li>
<li><a href="#post-say">POST /say</a></li>
<li><a href="#post-tell">POST /tell</a></li>
<li><a href="#post-console">POST /console</a></li>
<li><a href="#post-give">POST /give</a></li>
<li><a href="#post-install">POST /install</a></li>
<li><a href="#post-uninstall">POST /uninstall</a></li>
<li><a href="#post-search">POST /search</a></li>
<li><a href="#get-mod-list">GET /mod-list</a></li>
</ul>
</li>
<li><a href="#explore-more">Explore More</a></li>
</ul>
</nav>
<main class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 pb-16 relative z-10">
<section id="getting-started-with-the-api" class="section-bg p-8 sm:p-10 mb-12">
<h2 class="text-3xl minecraft-font mb-8 text-center bg-clip-text text-transparent bg-gradient-to-r from-teal-400 to-blue-500">
Getting Started with the API</h2>
<p class="text-lg mb-8 max-w-3xl mx-auto opacity-90 leading-relaxed">
To use the My-MC.Link API, you need an API key. Generate one by running <code class="bg-gray-800 text-teal-400 px-1 rounded">/api-key</code> in our server. The key, valid for 365 days, will be sent to your Direct Messages.
</p>
<p class="text-lg mb-8 max-w-3xl mx-auto opacity-90 leading-relaxed">
<strong>API URL:</strong> <code class="bg-gray-800 text-teal-400 px-1 rounded">https://api.my-mc.link</code><br>
Include the authentication header <code class="bg-gray-800 text-teal-400 px-1 rounded">x-my-mc-auth</code> with your token in all requests.
</p>
<p class="text-lg mb-8 max-w-3xl mx-auto opacity-90 leading-relaxed">
The examples below use <a href="https://www.npmjs.com/package/unirest" class="underline text-teal-400 hover:text-blue-400">UniRest</a> for JavaScript. New methods will be added over time, so check back regularly.
</p>
</section>
<section id="api-endpoints" class="section-bg p-8 sm:p-10 mb-12">
<h2 class="text-3xl minecraft-font mb-8 text-center bg-clip-text text-transparent bg-gradient-to-r from-teal-400 to-blue-500">
API Endpoints</h2>
<div class="grid grid-cols-1 gap-6">
<!-- GET /hello -->
<div class="feature-card tilt-card">
<h3 id="get-hello" class="text-xl minecraft-font mb-3 text-teal-400">GET /hello</h3>
<p class="text-sm opacity-90 leading-relaxed mb-4">Test the API and verify the authenticated user.</p>
<div class="code-block-wrapper">
<pre class="language-javascript"><code>var unirest = require('unirest');
unirest
.get('https://api.my-mc.link/hello')
.headers({'Accept': 'application/json', 'Content-Type': 'application/json', 'x-my-mc-auth': 'TokenHere'})
.then((response) => {
console.log(response.body)
})</code></pre>
<button class="copy-button" onclick="copyCode(this)">Copy</button>
</div>
<p class="text-sm opacity-90 leading-relaxed mt-4"><strong>Response:</strong></p>
<pre class="language-json"><code>{ success: true, message: 'Hello, mc_342128351638585344!' }</code></pre>
</div>
<!-- GET /time -->
<div class="feature-card tilt-card">
<h3 id="get-time" class="text-xl minecraft-font mb-3 text-teal-400">GET /time</h3>
<p class="text-sm opacity-90 leading-relaxed mb-4">Check the expiration time of your API key.</p>
<div class="code-block-wrapper">
<pre class="language-javascript"><code>var unirest = require('unirest');
unirest
.get('https://api.my-mc.link/time')
.headers({'Accept': 'application/json', 'Content-Type': 'application/json', 'x-my-mc-auth': 'TokenHere'})
.then((response) => {
console.log(response.body)
})</code></pre>
<button class="copy-button" onclick="copyCode(this)">Copy</button>
</div>
<p class="text-sm opacity-90 leading-relaxed mt-4"><strong>Response:</strong></p>
<pre class="language-json"><code>{
success: true,
keyexpireString: 'Tue Apr 15 2025 06:14:59 GMT-0400 (Eastern Daylight Time)',
expireDate: '2025-04-15T10:14:59.000Z',
expireEpoch: 1744712099000
}</code></pre>
</div>
<!-- GET /stats -->
<div class="feature-card tilt-card">
<h3 id="get-stats" class="text-xl minecraft-font mb-3 text-teal-400">GET /stats</h3>
<p class="text-sm opacity-90 leading-relaxed mb-4">Retrieve statistics for your Minecraft server.</p>
<div class="code-block-wrapper">
<pre class="language-javascript"><code>var unirest = require('unirest');
unirest
.get('https://api.my-mc.link/stats')
.headers({'Accept': 'application/json', 'Content-Type': 'application/json', 'x-my-mc-auth': 'TokenHere'})
.then((response) => {
console.log(response.body)
})</code></pre>
<button class="copy-button" onclick="copyCode(this)">Copy</button>
</div>
<p class="text-sm opacity-90 leading-relaxed mt-4"><strong>Response:</strong></p>
<pre class="language-json"><code>{
success: true,
stats: {
serverName: 'mc_342128351638585344',
memory: { raw: '185MiB / 4GiB', percent: '4.52%' },
cpu: '317.98%'
}
}</code></pre>
</div>
<!-- GET /log -->
<div class="feature-card tilt-card">
<h3 id="get-log" class="text-xl minecraft-font mb-3 text-teal-400">GET /log</h3>
<p class="text-sm opacity-90 leading-relaxed mb-4">Get the URL for your servers live log.</p>
<div class="code-block-wrapper">
<pre class="language-javascript"><code>var unirest = require('unirest');
unirest
.get('https://api.my-mc.link/log')
.headers({'Accept': 'application/json', 'Content-Type': 'application/json', 'x-my-mc-auth': 'TokenHere'})
.then((response) => {
console.log(response.body)
})</code></pre>
<button class="copy-button" onclick="copyCode(this)">Copy</button>
</div>
<p class="text-sm opacity-90 leading-relaxed mt-4"><strong>Response:</strong></p>
<pre class="language-json"><code>{
success: true,
message: 'https://logs.my-mc.link/container/3a48afc921c6'
}</code></pre>
</div>
<!-- GET /start -->
<div class="feature-card tilt-card">
<h3 id="get-start" class="text-xl minecraft-font mb-3 text-teal-400">GET /start</h3>
<p class="text-sm opacity-90 leading-relaxed mb-4">Start your server container.</p>
<div class="code-block-wrapper">
<pre class="language-javascript"><code>var unirest = require('unirest');
unirest
.get('https://api.my-mc.link/start')
.headers({'Accept': 'application/json', 'Content-Type': 'application/json', 'x-my-mc-auth': 'TokenHere'})
.then((response) => {
console.log(response.body)
})</code></pre>
<button class="copy-button" onclick="copyCode(this)">Copy</button>
</div>
<p class="text-sm opacity-90 leading-relaxed mt-4"><strong>Response:</strong></p>
<pre class="language-json"><code>{ success: true, message: 'Started', completed: 'OK' }</code></pre>
</div>
<!-- GET /stop -->
<div class="feature-card tilt-card">
<h3 id="get-stop" class="text-xl minecraft-font mb-3 text-teal-400">GET /stop</h3>
<p class="text-sm opacity-90 leading-relaxed mb-4">Stop your server container.</p>
<div class="code-block-wrapper">
<pre class="language-javascript"><code>var unirest = require('unirest');
unirest
.get('https://api.my-mc.link/stop')
.headers({'Accept': 'application/json', 'Content-Type': 'application/json', 'x-my-mc-auth': 'TokenHere'})
.then((response) => {
console.log(response.body)
})</code></pre>
<button class="copy-button" onclick="copyCode(this)">Copy</button>
</div>
<p class="text-sm opacity-90 leading-relaxed mt-4"><strong>Response:</strong></p>
<pre class="language-json"><code>{ success: true, message: 'Stopped', completed: 'OK' }</code></pre>
</div>
<!-- GET /restart -->
<div class="feature-card tilt-card">
<h3 id="get-restart" class="text-xl minecraft-font mb-3 text-teal-400">GET /restart</h3>
<p class="text-sm opacity-90 leading-relaxed mb-4">Restart your server container.</p>
<div class="code-block-wrapper">
<pre class="language-javascript"><code>var unirest = require('unirest');
unirest
.get('https://api.my-mc.link/restart')
.headers({'Accept': 'application/json', 'Content-Type': 'application/json', 'x-my-mc-auth': 'TokenHere'})
.then((response) => {
console.log(response.body)
})</code></pre>
<button class="copy-button" onclick="copyCode(this)">Copy</button>
</div>
<p class="text-sm opacity-90 leading-relaxed mt-4"><strong>Response:</strong></p>
<pre class="language-json"><code>{ success: true, message: 'Restarted', completed: 'OK' }</code></pre>
</div>
<!-- GET /my-link -->
<div class="feature-card tilt-card">
<h3 id="get-my-link" class="text-xl minecraft-font mb-3 text-teal-400">GET /my-link</h3>
<p class="text-sm opacity-90 leading-relaxed mb-4">Generate or retrieve your servers connection link.</p>
<div class="code-block-wrapper">
<pre class="language-javascript"><code>var unirest = require('unirest');
unirest
.get('https://api.my-mc.link/my-link')
.headers({'Accept': 'application/json', 'Content-Type': 'application/json', 'x-my-mc-auth': 'TokenHere'})
.then((response) => {
console.log(response.body)
})</code></pre>
<button class="copy-button" onclick="copyCode(this)">Copy</button>
</div>
<p class="text-sm opacity-90 leading-relaxed mt-4"><strong>Response:</strong></p>
<pre class="language-json"><code>{
success: true,
action: 'New-Link',
message: 'Success!',
hostname: 'my-mc.link',
port: 40129
}</code></pre>
</div>
<!-- GET /my-geyser-link -->
<div class="feature-card tilt-card">
<h3 id="get-my-geyser-link" class="text-xl minecraft-font mb-3 text-teal-400">GET /my-geyser-link</h3>
<p class="text-sm opacity-90 leading-relaxed mb-4">Generate or retrieve the Geyser UDP connection link.</p>
<div class="code-block-wrapper">
<pre class="language-javascript"><code>var unirest = require('unirest');
unirest
.get('https://api.my-mc.link/my-geyser-link')
.headers({'Accept': 'application/json', 'Content-Type': 'application/json', 'x-my-mc-auth': 'TokenHere'})
.then((response) => {
console.log(response.body)
})</code></pre>
<button class="copy-button" onclick="copyCode(this)">Copy</button>
</div>
<p class="text-sm opacity-90 leading-relaxed mt-4"><strong>Response:</strong></p>
<pre class="language-json"><code>{
success: true,
action: 'New-Geyser-Link',
message: 'Geyser connection established successfully!',
hostname: 'my-mc.link',
port: 35633
}</code></pre>
</div>
<!-- GET /my-sftp -->
<div class="feature-card tilt-card">
<h3 id="get-my-sftp" class="text-xl minecraft-font mb-3 text-teal-400">GET /my-sftp</h3>
<p class="text-sm opacity-90 leading-relaxed mb-4">Generate or retrieve the SFTP connection details.</p>
<div class="code-block-wrapper">
<pre class="language-javascript"><code>var unirest = require('unirest');
unirest
.get('https://api.my-mc.link/my-sftp')
.headers({'Accept': 'application/json', 'Content-Type': 'application/json', 'x-my-mc-auth': 'TokenHere'})
.then((response) => {
console.log(response.body)
})</code></pre>
<button class="copy-button" onclick="copyCode(this)">Copy</button>
</div>
<p class="text-sm opacity-90 leading-relaxed mt-4"><strong>Response:</strong></p>
<pre class="language-json"><code>{
success: true,
action: 'New-Link',
message: 'Success!',
hostname: 'sftp://my-mc.link',
port: 34149,
user: 'mc',
password: 'Fyuak12tq0NcuvcQ'
}</code></pre>
</div>
<!-- GET /my-hash -->
<div class="feature-card tilt-card">
<h3 id="get-my-hash" class="text-xl minecraft-font mb-3 text-teal-400">GET /my-hash</h3>
<p class="text-sm opacity-90 leading-relaxed mb-4">Retrieve the P2P hash for your server container.</p>
<div class="code-block-wrapper">
<pre class="language-javascript"><code>var unirest = require('unirest');
unirest
.get('https://api.my-mc.link/my-hash')
.headers({'Accept': 'application/json', 'Content-Type': 'application/json', 'x-my-mc-auth': 'TokenHere'})
.then((response) => {
console.log(response.body)
})</code></pre>
<button class="copy-button" onclick="copyCode(this)">Copy</button>
</div>
<p class="text-sm opacity-90 leading-relaxed mt-4"><strong>Response:</strong></p>
<pre class="language-json"><code>{
success: true,
action: 'getConnectionHash',
message: '9b63a54507d4473350cec0ce34c4e6f9ass3657887e659a7efd341e32100c15e'
}</code></pre>
</div>
<!-- GET /my-geyser-hash -->
<div class="feature-card tilt-card">
<h3 id="get-my-geyser-hash" class="text-xl minecraft-font mb-3 text-teal-400">GET /my-geyser-hash</h3>
<p class="text-sm opacity-90 leading-relaxed mb-4">Retrieve the P2P hash for Geyser connections.</p>
<div class="code-block-wrapper">
<pre class="language-javascript"><code>var unirest = require('unirest');
unirest
.get('https://api.my-mc.link/my-geyser-hash')
.headers({'Accept': 'application/json', 'Content-Type': 'application/json', 'x-my-mc-auth': 'TokenHere'})
.then((response) => {
console.log(response.body)
})</code></pre>
<button class="copy-button" onclick="copyCode(this)">Copy</button>
</div>
<p class="text-sm opacity-90 leading-relaxed mt-4"><strong>Response:</strong></p>
<pre class="language-json"><code>{
success: true,
action: 'getConnectionHashGeyser',
message: 'hs://s0006fbd2c4d48a4cef8df3417deec0194888d115672fb12bdaf91d61dd4ee0087d1'
}</code></pre>
</div>
<!-- GET /my-sftp-hash -->
<div class="feature-card tilt-card">
<h3 id="get-my-sftp-hash" class="text-xl minecraft-font mb-3 text-teal-400">GET /my-sftp-hash</h3>
<p class="text-sm opacity-90 leading-relaxed mb-4">Retrieve the P2P hash for SFTP connections.</p>
<div class="code-block-wrapper">
<pre class="language-javascript"><code>var unirest = require('unirest');
unirest
.get('https://api.my-mc.link/my-sftp-hash')
.headers({'Accept': 'application/json', 'Content-Type': 'application/json', 'x-my-mc-auth': 'TokenHere'})
.then((response) => {
console.log(response.body)
})</code></pre>
<button class="copy-button" onclick="copyCode(this)">Copy</button>
</div>
<p class="text-sm opacity-90 leading-relaxed mt-4"><strong>Response:</strong></p>
<pre class="language-json"><code>{
success: true,
action: 'getConnectionHashSFTP',
message: '1832805e6dd13d61572c6cb1egg7f071acc65507c5df9f78a7a6ae39ae6f206'
}</code></pre>
</div>
<!-- GET /list-players -->
<div class="feature-card tilt-card">
<h3 id="get-list-players" class="text-xl minecraft-font mb-3 text-teal-400">GET /list-players</h3>
<p class="text-sm opacity-90 leading-relaxed mb-4">Get information about players connected to the server.</p>
<div class="code-block-wrapper">
<pre class="language-javascript"><code>var unirest = require('unirest');
unirest
.get('https://api.my-mc.link/list-players')
.headers({'Accept': 'application/json', 'Content-Type': 'application/json', 'x-my-mc-auth': 'TokenHere'})
.then((response) => {
console.log(response.body)
})</code></pre>
<button class="copy-button" onclick="copyCode(this)">Copy</button>
</div>
<p class="text-sm opacity-90 leading-relaxed mt-4"><strong>Response:</strong></p>
<pre class="language-json"><code>{
success: true,
message: 'On mc_342128351638585344 there are 1 of a max of 20 players.',
players: [ ' snxravenmc' ]
}</code></pre>
</div>
<!-- GET /website -->
<div class="feature-card tilt-card">
<h3 id="get-website" class="text-xl minecraft-font mb-3 text-teal-400">GET /website</h3>
<p class="text-sm opacity-90 leading-relaxed mb-4">Retrieve your servers website URL.</p>
<div class="code-block-wrapper">
<pre class="language-javascript"><code>var unirest = require('unirest');
unirest
.get('https://api.my-mc.link/website')
.headers({'Accept': 'application/json', 'Content-Type': 'application/json', 'x-my-mc-auth': 'TokenHere'})
.then((response) => {
console.log(response.body)
})</code></pre>
<button class="copy-button" onclick="copyCode(this)">Copy</button>
</div>
<p class="text-sm opacity-90 leading-relaxed mt-4"><strong>Response:</strong></p>
<pre class="language-json"><code>{
success: true,
title: 'Website',
message: 'https://smjdmfqkl25kw6mdkveqqu6hddbyv4hkroojuxfuv7k6iwptz2bq.my-mc.link'
}</code></pre>
</div>
<!-- GET /map -->
<div class="feature-card tilt-card">
<h3 id="get-map" class="text-xl minecraft-font mb-3 text-teal-400">GET /map</h3>
<p class="text-sm opacity-90 leading-relaxed mb-4">Retrieve your servers BlueMap URL.</p>
<div class="code-block-wrapper">
<pre class="language-javascript"><code>var unirest = require('unirest');
unirest
.get('https://api.my-mc.link/map')
.headers({'Accept': 'application/json', 'Content-Type': 'application/json', 'x-my-mc-auth': 'TokenHere'})
.then((response) => {
console.log(response.body)
})</code></pre>
<button class="copy-button" onclick="copyCode(this)">Copy</button>
</div>
<p class="text-sm opacity-90 leading-relaxed mt-4"><strong>Response:</strong></p>
<pre class="language-json"><code>{
success: true,
title: 'BlueMap',
message: 'https://sf5bk42u6y32wsvifa3rvowioowfsypem3qrebjfaxs5vi5z3asa.my-mc.link'
}</code></pre>
</div>
<!-- POST /ban -->
<div class="feature-card tilt-card">
<h3 id="post-ban" class="text-xl minecraft-font mb-3 text-teal-400">POST /ban</h3>
<p class="text-sm opacity-90 leading-relaxed mb-4">Ban a user by their username.</p>
<p class="text-sm opacity-90 leading-relaxed mb-2"><strong>Payload:</strong></p>
<div class="code-block-wrapper">
<pre class="language-json"><code>{"username": "snxravenmc"}</code></pre>
<button class="copy-button" onclick="copyCode(this)">Copy</button>
</div>
<div class="code-block-wrapper">
<pre class="language-javascript"><code>var unirest = require('unirest');
unirest
.post('https://api.my-mc.link/ban')
.headers({'Accept': 'application/json', 'Content-Type': 'application/json', 'x-my-mc-auth': 'TokenHere'})
.send({"username": "snxravenmc"})
.then((response) => {
console.log(response.body)
})</code></pre>
<button class="copy-button" onclick="copyCode(this)">Copy</button>
</div>
<p class="text-sm opacity-90 leading-relaxed mt-4"><strong>Response:</strong></p>
<pre class="language-json"><code>{
success: true,
message: 'snxravenmc has been banned from mc_342128351638585344'
}</code></pre>
</div>
<!-- POST /unban -->
<div class="feature-card tilt-card">
<h3 id="post-unban" class="text-xl minecraft-font mb-3 text-teal-400">POST /unban</h3>
<p class="text-sm opacity-90 leading-relaxed mb-4">Unban a user by their username.</p>
<p class="text-sm opacity-90 leading-relaxed mb-2"><strong>Payload:</strong></p>
<div class="code-block-wrapper">
<pre class="language-json"><code>{"username": "snxravenmc"}</code></pre>
<button class="copy-button" onclick="copyCode(this)">Copy</button>
</div>
<div class="code-block-wrapper">
<pre class="language-javascript"><code>var unirest = require('unirest');
unirest
.post('https://api.my-mc.link/unban')
.headers({'Accept': 'application/json', 'Content-Type': 'application/json', 'x-my-mc-auth': 'TokenHere'})
.send({"username": "snxravenmc"})
.then((response) => {
console.log(response.body)
})</code></pre>
<button class="copy-button" onclick="copyCode(this)">Copy</button>
</div>
<p class="text-sm opacity-90 leading-relaxed mt-4"><strong>Response:</strong></p>
<pre class="language-json"><code>{
success: true,
message: 'snxravenmc has been unbanned from mc_342128351638585344'
}</code></pre>
</div>
<!-- POST /say -->
<div class="feature-card tilt-card">
<h3 id="post-say" class="text-xl minecraft-font mb-3 text-teal-400">POST /say</h3>
<p class="text-sm opacity-90 leading-relaxed mb-4">Send a global message to the server via RCON.</p>
<p class="text-sm opacity-90 leading-relaxed mb-2"><strong>Payload:</strong></p>
<div class="code-block-wrapper">
<pre class="language-json"><code>{"message": "Hello There, This is a test!\nDid this work?"}</code></pre>
<button class="copy-button" onclick="copyCode(this)">Copy</button>
</div>
<div class="code-block-wrapper">
<pre class="language-javascript"><code>var unirest = require('unirest');
unirest
.post('https://api.my-mc.link/say')
.headers({'Accept': 'application/json', 'Content-Type': 'application/json', 'x-my-mc-auth': 'TokenHere'})
.send({"message": "Hello There, This is a test!\nDid this work?"})
.then((response) => {
console.log(response.body)
})</code></pre>
<button class="copy-button" onclick="copyCode(this)">Copy</button>
</div>
<p class="text-sm opacity-90 leading-relaxed mt-4"><strong>Response:</strong></p>
<pre class="language-json"><code>{ success: true, message: 'Message Sent Successfully!' }</code></pre>
</div>
<!-- POST /tell -->
<div class="feature-card tilt-card">
<h3 id="post-tell" class="text-xl minecraft-font mb-3 text-teal-400">POST /tell</h3>
<p class="text-sm opacity-90 leading-relaxed mb-4">Send a private message to a specific user via RCON.</p>
<p class="text-sm opacity-90 leading-relaxed mb-2"><strong>Payload:</strong></p>
<div class="code-block-wrapper">
<pre class="language-json"><code>{"username": "snxravenmc","message": "hiiiii"}</code></pre>
<button class="copy-button" onclick="copyCode(this)">Copy</button>
</div>
<div class="code-block-wrapper">
<pre class="language-javascript"><code>var unirest = require('unirest');
unirest
.post('https://api.my-mc.link/tell')
.headers({'Accept': 'application/json', 'Content-Type': 'application/json', 'x-my-mc-auth': 'TokenHere'})
.send({"username": "snxravenmc","message": "hiiiii"})
.then((response) => {
console.log(response.body)
})</code></pre>
<button class="copy-button" onclick="copyCode(this)">Copy</button>
</div>
<p class="text-sm opacity-90 leading-relaxed mt-4"><strong>Response:</strong></p>
<pre class="language-json"><code>{ success: true, message: 'Message Sent Successfully!' }</code></pre>
</div>
<!-- POST /console -->
<div class="feature-card tilt-card">
<h3 id="post-console" class="text-xl minecraft-font mb-3 text-teal-400">POST /console</h3>
<p class="text-sm opacity-90 leading-relaxed mb-4">Send RCON commands to your server.</p>
<p class="text-sm opacity-90 leading-relaxed mb-2"><strong>Payload:</strong></p>
<div class="code-block-wrapper">
<pre class="language-json"><code>{"command": "time set day"}</code></pre>
<button class="copy-button" onclick="copyCode(this)">Copy</button>
</div>
<div class="code-block-wrapper">
<pre class="language-javascript"><code>var unirest = require('unirest');
unirest
.post('https://api.my-mc.link/console')
.headers({'Accept': 'application/json', 'Content-Type': 'application/json', 'x-my-mc-auth': 'TokenHere'})
.send({"command": "time set day"})
.then((response) => {
console.log(response.body)
})</code></pre>
<button class="copy-button" onclick="copyCode(this)">Copy</button>
</div>
<p class="text-sm opacity-90 leading-relaxed mt-4"><strong>Response:</strong></p>
<pre class="language-json"><code>{ success: true, message: 'Set the time to 1000' }</code></pre>
</div>
<!-- POST /give -->
<div class="feature-card tilt-card">
<h3 id="post-give" class="text-xl minecraft-font mb-3 text-teal-400">POST /give</h3>
<p class="text-sm opacity-90 leading-relaxed mb-4">Give items to a specific user.</p>
<p class="text-sm opacity-90 leading-relaxed mb-2"><strong>Payload:</strong></p>
<div class="code-block-wrapper">
<pre class="language-json"><code>{"username": "snxravenmc", item: "torch", amount: 1}</code></pre>
<button class="copy-button" onclick="copyCode(this)">Copy</button>
</div>
<div class="code-block-wrapper">
<pre class="language-javascript"><code>var unirest = require('unirest');
unirest
.post('https://api.my-mc.link/give')
.headers({'Accept': 'application/json', 'Content-Type': 'application/json', 'x-my-mc-auth': 'TokenHere'})
.send({"username": "snxravenmc", item: "torch", amount: 1})
.then((response) => {
console.log(response.body)
})</code></pre>
<button class="copy-button" onclick="copyCode(this)">Copy</button>
</div>
<p class="text-sm opacity-90 leading-relaxed mt-4"><strong>Response:</strong></p>
<pre class="language-json"><code>{
success: true,
message: 'Gave snxravenmc 1 torch',
username: 'snxravenmc',
amount: 1,
item: 'torch'
}</code></pre>
</div>
<!-- POST /install -->
<div class="feature-card tilt-card">
<h3 id="post-install" class="text-xl minecraft-font mb-3 text-teal-400">POST /install</h3>
<p class="text-sm opacity-90 leading-relaxed mb-4">Install a mod using a Modrinth ID or keyword search.</p>
<p class="text-sm opacity-90 leading-relaxed mb-2"><strong>Payload:</strong></p>
<div class="code-block-wrapper">
<pre class="language-json"><code>{"mod": "IDHERE"}</code></pre>
<button class="copy-button" onclick="copyCode(this)">Copy</button>
</div>
<div class="code-block-wrapper">
<pre class="language-javascript"><code>var unirest = require('unirest');
unirest
.post('https://api.my-mc.link/install')
.headers({'Accept': 'application/json', 'Content-Type': 'application/json', 'x-my-mc-auth': 'TokenHere'})
.send({"mod": "IDHERE"})
.then((response) => {
console.log(response.body)
})</code></pre>
<button class="copy-button" onclick="copyCode(this)">Copy</button>
</div>
<p class="text-sm opacity-90 leading-relaxed mt-4"><strong>Response:</strong></p>
<pre class="language-json"><code>{
success: true,
message: 'Task Complete on mc_342128351638585344',
log: '- Searching for abooMhox...\n' +
'- Installing Tree Harvester...\n' +
'✔ Successfully installed Tree Harvester\n'
}</code></pre>
</div>
<!-- POST /uninstall -->
<div class="feature-card tilt-card">
<h3 id="post-uninstall" class="text-xl minecraft-font mb-3 text-teal-400">POST /uninstall</h3>
<p class="text-sm opacity-90 leading-relaxed mb-4">Uninstall a mod using a Modrinth ID or keyword search.</p>
<p class="text-sm opacity-90 leading-relaxed mb-2"><strong>Payload:</strong></p>
<div class="code-block-wrapper">
<pre class="language-json"><code>{"mod": "IDHERE"}</code></pre>
<button class="copy-button" onclick="copyCode(this)">Copy</button>
</div>
<div class="code-block-wrapper">
<pre class="language-javascript"><code>var unirest = require('unirest');
unirest
.post('https://api.my-mc.link/uninstall')
.headers({'Accept': 'application/json', 'Content-Type': 'application/json', 'x-my-mc-auth': 'TokenHere'})
.send({"mod": "IDHERE"})
.then((response) => {
console.log(response.body)
})</code></pre>
<button class="copy-button" onclick="copyCode(this)">Copy</button>
</div>
<p class="text-sm opacity-90 leading-relaxed mt-4"><strong>Response:</strong></p>
<pre class="language-json"><code>{
success: true,
message: 'Task Complete on mc_342128351638585344',
log: '- Uninstalling abooMhox...\n' +
'- Uninstalling abooMhox...\n' +
'✔ Tree Harvester successfully uninstalled!\n'
}</code></pre>
</div>
<!-- POST /search -->
<div class="feature-card tilt-card">
<h3 id="post-search" class="text-xl minecraft-font mb-3 text-teal-400">POST /search</h3>
<p class="text-sm opacity-90 leading-relaxed mb-4">Search for mods by keyword with compatibility checking.</p>
<p class="text-sm opacity-90 leading-relaxed mb-2"><strong>Payload:</strong></p>
<div class="code-block-wrapper">
<pre class="language-json"><code>{"mod": "Tree","offset": 0}</code></pre>
<button class="copy-button" onclick="copyCode(this)">Copy</button>
</div>
<div class="code-block-wrapper">
<pre class="language-javascript"><code>var unirest = require('unirest');
unirest
.post('https://api.my-mc.link/search')
.headers({'Accept': 'application/json', 'Content-Type': 'application/json', 'x-my-mc-auth': 'TokenHere'})
.send({"mod": "Tree","offset": 0})
.then((response) => {
console.log(response.body)
})</code></pre>
<button class="copy-button" onclick="copyCode(this)">Copy</button>
</div>
<p class="text-sm opacity-90 leading-relaxed mt-4"><strong>Response:</strong></p>
<pre class="language-json"><code>{
success: true,
message: 'Search Results',
limit: 10,
offset: 0,
totalHits: 23,
results: [
{
title: 'FallingTree',
description: 'Break down your trees by only cutting one piece of it',
server: 'required',
client: 'unsupported',
downloads: 894148,
installID: 'Fb4jn8m6'
},
...
]
}</code></pre>
</div>
<!-- GET /mod-list -->
<div class="feature-card tilt-card">
<h3 id="get-mod-list" class="text-xl minecraft-font mb-3 text-teal-400">GET /mod-list</h3>
<p class="text-sm opacity-90 leading-relaxed mb-4">List all mods installed on your server.</p>
<div class="code-block-wrapper">
<pre class="language-javascript"><code>var unirest = require('unirest');
unirest
.get('https://api.my-mc.link/mod-list')
.headers({'Accept': 'application/json', 'Content-Type': 'application/json', 'x-my-mc-auth': 'TokenHere'})
.then((response) => {
console.log(response.body)
})</code></pre>
<button class="copy-button" onclick="copyCode(this)">Copy</button>
</div>
<p class="text-sm opacity-90 leading-relaxed mt-4"><strong>Response:</strong></p>
<pre class="language-json"><code>{
success: true,
message: 'Mods listed for mc_342128351638585344',
mods: [
{
name: 'Adrenaserver',
id: 'H9OFWiay',
fileName: 'Adrenaserver-1.5.0+1.20.4.fabric.mrpack',
version: '1.5.0+1.20.4.fabric',
source: 'Modrinth',
essential: false,
dependencies: ''
},
...
]
}</code></pre>
</div>
</div>
</section>
<section id="explore-more" class="section-bg p-8 sm:p-10 text-center mb-12">
<h2 class="text-3xl minecraft-font mb-6 bg-clip-text text-transparent bg-gradient-to-r from-teal-400 to-blue-500">
Explore More</h2>
<p class="text-lg mb-8 max-w-2xl mx-auto opacity-90 leading-relaxed">
Ready to automate your server?<BR>Join our community, dive into our resources, and start building with the My-MC.Link API.
</p>
<div class="flex justify-center gap-4 flex-wrap">
<a href="https://join.my-mc.link" class="btn-minecraft text-base" target="_blank">Join Our Discord</a>
<a href="https://wiki.my-mc.link" class="btn-minecraft text-base" target="_blank">Explore the Wiki</a>
</div>
</section>
</main>
<footer class="bg-gray-900/20 backdrop-filter backdrop-blur-xl py-8 text-center relative z-10">
<p class="text-sm opacity-90">© 2025 My-MC.Link. All rights reserved.</p>
<p class="text-sm opacity-90 mt-3">
Powered by <a href="https://holesail.io" class="underline" target="_blank">Holesail</a> with services
donated by <a href="https://raven-scott.fyi" class="underline">SNXRaven</a>
</p>
</footer>
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/prism.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/components/prism-javascript.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/components/prism-json.min.js"></script>
<script>
function copyCode(button) {
const codeBlock = button.previousElementSibling.querySelector('code');
const text = codeBlock.textContent;
navigator.clipboard.writeText(text).then(() => {
button.textContent = 'Copied!';
button.classList.add('copied');
setTimeout(() => {
button.textContent = 'Copy';
button.classList.remove('copied');
}, 2000);
}).catch(err => {
console.error('Failed to copy: ', err);
});
}
</script>
<script src="../../mc/js/main.js"></script>
</body>
</html>

475
wiki/index.html Normal file
View File

@ -0,0 +1,475 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>My-MC.Link Wiki</title>
<link rel="icon" href="https://minecraft.wiki/images/Favicon.png" type="image/png">
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;700;900&display=swap" rel="stylesheet">
<link href="https://my-mc.link/mc/css/style_min.css" rel="stylesheet">
<link href="https://my-mc.link/mc/favicon.ico" rel="icon" type="image/x-icon">
<style>
/* Table of Contents Styles */
.toc {
background: rgba(17, 24, 39, 0.8);
backdrop-filter: blur(10px);
border-radius: 12px;
padding: 1.5rem;
margin: 2rem auto;
max-width: 800px;
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}
.toc h2 {
font-family: 'minecraft-font', sans-serif;
font-size: 1.75rem;
text-align: center;
background: linear-gradient(to right, #14b8a6, #3b82f6);
-webkit-background-clip: text;
background-clip: text;
color: transparent;
margin-bottom: 1.5rem;
}
.toc ul {
list-style: none;
padding: 0;
}
.toc li {
margin: 0.75rem 0;
}
.toc a {
color: #d1d5db;
text-decoration: none;
font-size: 1.125rem;
font-weight: 500;
transition: color 0.3s ease, transform 0.3s ease;
display: block;
padding: 0.5rem 1rem;
border-radius: 8px;
}
.toc a:hover {
color: #14b8a6;
transform: translateX(10px);
background: rgba(255, 255, 255, 0.05);
}
@media (max-width: 640px) {
.toc {
padding: 1rem;
margin: 1rem;
}
.toc h2 {
font-size: 1.5rem;
}
.toc a {
font-size: 1rem;
}
}
</style>
</head>
<body>
<!-- Particle Effects -->
<div class="particle" style="left: 10%; top: 20%; animation-delay: 0s;"></div>
<div class="particle large" style="left: 30%; top: 50%; animation-delay: 2s;"></div>
<div class="particle" style="left: 50%; top: 30%; animation-delay: 4s;"></div>
<div class="particle large" style="left: 70%; top: 60%; animation-delay: 6s;"></div>
<div class="particle" style="left: 20%; top: 80%; animation-delay: 8s;"></div>
<header class="header-bg py-16 text-center relative z-10">
<div class="header-content flex items-center justify-between max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
<div>
<h1
class="text-5xl minecraft-font bg-clip-text text-transparent bg-gradient-to-r from-teal-400 to-blue-500">
<a href="https://info.my-mc.link/">My-MC.Link Wiki</a></h1>
<p class="text-lg mt-4 opacity-90 tracking-wide font-medium">Your Guide to Free Minecraft Hosting</p>
</div>
<a href="https://my-mc.link" class="btn-minecraft text-base self-center" target="_blank">Home</a>
</div>
</header>
<!-- Table of Contents -->
<nav class="toc">
<h2>Table of Contents</h2>
<ul>
<li><a href="#what-is-my-mc-link">What is My-MC.Link?</a></li>
<li><a href="#limitations">Limitations</a></li>
<li><a href="#getting-started">Getting Started</a></li>
<li><a href="#connecting-to-your-server">Connecting to Your Server</a></li>
<li><a href="#geyser-support">Geyser Support</a></li>
<li><a href="#mod-management">Mod Management</a></li>
<li><a href="#remote-console-access">Remote Console Access</a></li>
<li><a href="#automatic-website-hosting">Automatic Website Hosting</a></li>
<li><a href="#bluemap-integration">Bluemap Integration</a></li>
<li><a href="#plugin-support">Plugin Support</a></li>
<li><a href="#proxy-servers">Proxy Servers (BungeeCord/Velocity)</a></li>
<li><a href="#mymcrealms">MyMcRealms</a></li>
<li><a href="https://info.my-mc.link/api/" target="_blank">My-MC API</a></li>
<li><a href="https://info.my-mc.link/mymc-lib/" target="_blank">JavaScript Library</a></li>
<li><a href="https://info.my-mc.link/mymc-java/" target="_blank">Java Library</a></li>
<li><a href="#beta-phase-notice">Beta Phase Notice</a></li>
<li><a href="https://wiki.my-mc.link">Access Older Wiki</a></li>
</ul>
</nav>
<main class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 pb-16 relative z-10">
<section id="what-is-my-mc-link" class="section-bg p-8 sm:p-10 mb-12">
<h2
class="text-3xl minecraft-font mb-8 text-center bg-clip-text text-transparent bg-gradient-to-r from-teal-400 to-blue-500">
What is My-MC.Link?</h2>
<p class="text-lg mb-8 max-w-3xl mx-auto opacity-90 leading-relaxed">
My-MC.Link provides free Minecraft server hosting with a focus on security, flexibility, and ease of use. Powered by an innovative Peer-to-Peer (P2P) network, our platform offers secure, low-latency hosting with end-to-end encrypted connections, eliminating the need to expose IP addresses or ports.
</p>
<div class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-6">
<div class="feature-card tilt-card">
<h3 class="text-xl minecraft-font mb-3 text-teal-400">Peer-to-Peer Networking</h3>
<p class="text-sm opacity-90 leading-relaxed">Connect securely without sharing IPs or ports, using a fully encrypted P2P system powered by <a href="https://holesail.io" class="underline text-teal-400 hover:text-blue-400" target="_blank">Holesail</a>.</p>
</div>
<div class="feature-card tilt-card">
<h3 class="text-xl minecraft-font mb-3 text-teal-400">Portable Servers</h3>
<p class="text-sm opacity-90 leading-relaxed">Bind your server to any device—localhost, PC, or server—for unparalleled flexibility and security.</p>
</div>
<div class="feature-card tilt-card">
<h3 class="text-xl minecraft-font mb-3 text-teal-400">Automated Management</h3>
<p class="text-sm opacity-90 leading-relaxed">Our bot simplifies server creation, mod installation, and updates via a user-friendly interface and REST API.</p>
</div>
<div class="feature-card tilt-card">
<h3 class="text-xl minecraft-font mb-3 text-teal-400">My-MC Realms!</h3>
<p class="text-sm opacity-90 leading-relaxed">Replace Realms with our custom server browser for easy access to your server!</p>
</div>
</div>
</section>
<section id="limitations" class="section-bg p-6 sm:p-8 md:p-10 mb-12 bg-gray-900/80 rounded-xl shadow-lg">
<h2 class="text-2xl sm:text-3xl md:text-4xl minecraft-font mb-6 sm:mb-8 text-center bg-clip-text text-transparent bg-gradient-to-r from-teal-400 to-blue-500 font-bold tracking-tight">
Limitations
</h2>
<p class="text-base sm:text-lg mb-6 sm:mb-8 max-w-3xl mx-auto opacity-90 leading-relaxed text-gray-200 text-center">
While My-MC.Link is powerful, there are some constraints to be aware of:
</p>
<ul class="text-base sm:text-lg max-w-3xl mx-auto opacity-90 leading-relaxed list-disc list-inside space-y-4 text-gray-300">
<li><strong class="text-teal-400">Fixed Environment</strong>: Servers use pre-built FabricMC images, and custom environments are not supported.</li>
<li><strong class="text-teal-400">Public IP Access</strong>: The <code class="bg-gray-800 text-teal-400 px-1.5 py-0.5 rounded font-mono text-sm">my-mc.link</code> public IP is available for a limited time.</li>
<li><strong class="text-teal-400">Inactivity Policy</strong>: Servers idle for 1 month are automatically deleted.</li>
<li><strong class="text-teal-400">Beta Status</strong>: As a test service, uptime and support may not be 24/7.</li>
</ul>
</section>
<section id="getting-started" class="section-bg p-8 sm:p-10 mb-12">
<h2
class="text-3xl minecraft-font mb-8 text-center bg-clip-text text-transparent bg-gradient-to-r from-teal-400 to-blue-500">
Getting Started</h2>
<h3 class="text-xl minecraft-font mb-6 text-teal-400">Prerequisites</h3>
<p class="text-lg mb-8 max-w-3xl mx-auto opacity-90 leading-relaxed">
Before you begin, ensure you:
</p>
<ul class="text-lg max-w-3xl mx-auto opacity-90 leading-relaxed list-disc list-inside mb-8">
<li> Agree to the <a href="https://my-mc.link/terms.html" class="underline text-teal-400 hover:text-blue-400">Terms of Service</a>.</li>
<li>Join our Discord and review the <a href="https://discord.com/channels/1199050279069425835/1199122629559320647" class="underline text-teal-400 hover:text-blue-400">rules</a>.</li>
</ul>
<h3 class="text-xl minecraft-font mb-6 text-teal-400">Creating a Server</h3>
<p class="text-lg mb-8 max-w-3xl mx-auto opacity-90 leading-relaxed">
1. Run the following command in Discord:<br>
<code class="bg-gray-800 text-teal-400 px-1 rounded">/create-server</code><br>
2. Wait 12 minutes for server initialization.
</p>
<h3 class="text-xl minecraft-font mb-6 text-teal-400">Connecting via Jump Host</h3>
<p class="text-lg mb-8 max-w-3xl mx-auto opacity-90 leading-relaxed">
- Create a Connection:<br>
<code class="bg-gray-800 text-teal-400 px-1 rounded">/my-mc-link</code><br>
- Monitor logs at <a href="https://panel.my-mc.link/" class="underline text-teal-400 hover:text-blue-400" target="_blank">panel.my-mc.link</a>.<BR><BR>
No Login?<BR>Run <code class="bg-gray-800 text-teal-400 px-1 rounded">/panel-login</code> to generate a one-time login link.
</p>
</section>
<section id="connecting-to-your-server" class="section-bg p-8 sm:p-12 lg:p-16 mb-12 bg-gray-900 rounded-xl shadow-xl">
<h2 class="text-3xl sm:text-4xl minecraft-font mb-10 text-center bg-clip-text text-transparent bg-gradient-to-r from-teal-400 to-blue-500 font-bold">
Connecting to Your Server
</h2>
<!-- Simple Connection Section -->
<div class="mb-12">
<h3 class="text-xl sm:text-2xl minecraft-font mb-6 text-teal-400 font-semibold">Simple Connection</h3>
<div class="text-lg max-w-3xl mx-auto opacity-90 leading-relaxed space-y-6">
<p>
Follow these steps to connect quickly:
</p>
<ol class="list-decimal list-inside space-y-2">
<li>Generate a P2P proxy link:<br>
<code class="bg-gray-800 text-teal-400 px-2 py-1 rounded font-mono">/my-mc-link</code>
</li>
<li>Use the provided URL to connect in Minecraft.</li>
<li>For SFTP access:<br>
<code class="bg-gray-800 text-teal-400 px-2 py-1 rounded font-mono">/my-mc-sftp</code>
</li>
</ol>
<p class="mt-6">
<strong class="text-teal-300">Troubleshooting</strong>:<BR> If the connection fails, rerun
<code class="bg-gray-800 text-teal-400 px-2 py-1 rounded font-mono">/my-mc-link</code> or
<code class="bg-gray-800 text-teal-400 px-2 py-1 rounded font-mono">/my-mc-sftp</code> to generate a new link.<BR>
All connections reset at <strong>12 AM EST every Sunday</strong>. SFTP connections close daily at <strong>12 AM EST</strong>.
</p>
</div>
</div>
<!-- Advanced Connection Section -->
<div>
<h3 class="text-xl sm:text-2xl minecraft-font mb-6 text-teal-400 font-semibold">Advanced Connection</h3>
<div class="text-lg max-w-3xl mx-auto opacity-90 leading-relaxed space-y-6">
<p>
For full control, bind your server using Holesail.
</p>
<!-- Manual Setup -->
<div>
<p class="font-semibold text-teal-300">Manual Setup</p>
<ol class="list-decimal list-inside space-y-2">
<li>Get your connector key:<br>
<code class="bg-gray-800 text-teal-400 px-2 py-1 rounded font-mono">/connection-details</code>
</li>
<li>Install Node.js and Holesail:<br>
<code class="bg-gray-800 text-teal-400 px-2 py-1 rounded font-mono">npm i holesail -g</code>
</li>
<li>Bind your server (replace <code class="inline bg-gray-800 text-teal-400 px-1 rounded font-mono">yourConnectorHere</code> with your key):<br>
<code class="bg-gray-800 text-teal-400 px-2 py-1 rounded font-mono">holesail --port 25565 yourConnectorHere</code><br>
- Connect to <code class="bg-gray-800 text-teal-400 px-2 py-1 rounded font-mono">127.0.0.1:25565</code>.<br>
- For public access:<br>
<code class="bg-gray-800 text-teal-400 px-2 py-1 rounded font-mono">holesail --port 25565 --host 0.0.0.0 yourConnectorHere</code>
</li>
</ol>
</div>
<!-- Automated Setup -->
<div>
<p class="font-semibold text-teal-300">Automated Setup</p>
<ol class="list-decimal list-inside space-y-2">
<li>Run the setup script:<br>
<code class="bg-gray-800 text-teal-400 px-2 py-1 rounded font-mono">bash <(curl -s https://my-mc.link/connectMC)</code>
</li>
<li>Enter your connection hash and port when prompted.</li>
<li>Connect to <code class="bg-gray-800 text-teal-400 px-2 py-1 rounded font-mono">localhost:<port></code> in Minecraft.</li>
</ol>
</div>
</div>
</div>
</section>
<section id="geyser-support" class="section-bg p-8 sm:p-10 mb-12">
<h2
class="text-3xl minecraft-font mb-8 text-center bg-clip-text text-transparent bg-gradient-to-r from-teal-400 to-blue-500">
Geyser Support</h2>
<p class="text-lg mb-8 max-w-3xl mx-auto opacity-90 leading-relaxed">
My-MC.Link supports Geyser, enabling cross-platform play between Java and Bedrock editions.
</p>
<p class="text-lg mb-8 max-w-3xl mx-auto opacity-90 leading-relaxed">
<strong>Setup Instructions</strong>:<br>
1. Install Geyser:<br>
<code class="bg-gray-800 text-teal-400 px-1 rounded">/mod-install mod: wKkoqHrH</code><br>
2. Reboot your server:<br>
<code class="bg-gray-800 text-teal-400 px-1 rounded">/reboot</code><br>
- Confirm in logs: <code>Connection 'geyser' created successfully on port 19132</code>.<br>
3. Generate a Geyser link:<br>
<code class="bg-gray-800 text-teal-400 px-1 rounded">/my-mc-geyser</code><br>
4. Use the provided port to connect via Bedrock.
</p>
<p class="text-lg mb-8 max-w-3xl mx-auto opacity-90 leading-relaxed">
<strong>Note</strong>: Geyser and standard connections can run simultaneously.
</p>
</section>
<section id="mod-management" class="section-bg p-8 sm:p-10 mb-12">
<h2
class="text-3xl minecraft-font mb-8 text-center bg-clip-text text-transparent bg-gradient-to-r from-teal-400 to-blue-500">
Mod Management</h2>
<p class="text-lg mb-8 max-w-3xl mx-auto opacity-90 leading-relaxed">
Manage mods effortlessly with our bot.
</p>
<ul class="text-lg max-w-3xl mx-auto opacity-90 leading-relaxed list-disc list-inside mb-8">
<li><strong>Search Mods</strong>:<br>
<code class="bg-gray-800 text-teal-400 px-1 rounded">/mod-search</code><br>
Or browse <a href="https://modrinth.com/mods" class="underline text-teal-400 hover:text-blue-400">Modrinth</a>.</li>
<li><strong>Install a Mod</strong>:<br>
<code class="bg-gray-800 text-teal-400 px-1 rounded">/mod-install mod: <modID></code></li>
<li><strong>Update Mods</strong>:<br>
<code class="bg-gray-800 text-teal-400 px-1 rounded">/mods-update</code></li>
<li><strong>Uninstall a Mod</strong>:<br>
<code class="bg-gray-800 text-teal-400 px-1 rounded">/uninstall-mod mod: <modID></code></li>
</ul>
</section>
<section id="remote-console-access" class="section-bg p-8 sm:p-10 mb-12">
<h2
class="text-3xl minecraft-font mb-8 text-center bg-clip-text text-transparent bg-gradient-to-r from-teal-400 to-blue-500">
Remote Console Access</h2>
<p class="text-lg mb-8 max-w-3xl mx-auto opacity-90 leading-relaxed">
Run RCON commands via our bot.
</p>
<ul class="text-lg max-w-3xl mx-auto opacity-90 leading-relaxed list-disc list-inside mb-8">
<li><strong>Execute a Command</strong>:<br>
<code class="bg-gray-800 text-teal-400 px-1 rounded">/mc-cmd cmd: <command></code></li>
<li><strong>Convenience Commands</strong>:<br>
- List players: <code class="bg-gray-800 text-teal-400 px-1 rounded">/list-players</code><br>
- Give items: <code class="bg-gray-800 text-teal-400 px-1 rounded">/give username: <user> item: <item> amount: <amount></code><br>
- Add to whitelist: <code class="bg-gray-800 text-teal-400 px-1 rounded">/whitelist username: <user></code><br>
- Remove from whitelist: <code class="bg-gray-800 text-teal-400 px-1 rounded">/delist username: <user></code></li>
</ul>
</section>
<section id="automatic-website-hosting" class="section-bg p-8 sm:p-10 mb-12">
<h2
class="text-3xl minecraft-font mb-8 text-center bg-clip-text text-transparent bg-gradient-to-r from-teal-400 to-blue-500">
Automatic Website Hosting</h2>
<p class="text-lg mb-8 max-w-3xl mx-auto opacity-90 leading-relaxed">
Each server includes an Apache web server for hosting a basic website.
</p>
<p class="text-lg mb-8 max-w-3xl mx-auto opacity-90 leading-relaxed">
1. Connect via SFTP to <code class="bg-gray-800 text-teal-400 px-1 rounded">/Minecraft/www</code> and upload your files.<br>
2. Get your website URL:<br>
<code class="bg-gray-800 text-teal-400 px-1 rounded">/my-website-url</code>
</p>
<p class="text-lg mb-8 max-w-3xl mx-auto opacity-90 leading-relaxed">
<strong>Note</strong>: URLs are cryptographically generated and use our P2P proxy.
</p>
</section>
<section id="bluemap-integration" class="section-bg p-8 sm:p-10 mb-12">
<h2
class="text-3xl minecraft-font mb-8 text-center bg-clip-text text-transparent bg-gradient-to-r from-teal-400 to-blue-500">
Bluemap Integration</h2>
<p class="text-lg mb-8 max-w-3xl mx-auto opacity-90 leading-relaxed">
Every server includes a <a href="https://modrinth.com/plugin/bluemap" class="underline text-teal-400 hover:text-blue-400">Bluemap</a> instance for interactive maps.
</p>
<p class="text-lg mb-8 max-w-3xl mx-auto opacity-90 leading-relaxed">
- Get your Bluemap URL:<br>
<code class="bg-gray-800 text-teal-400 px-1 rounded">/bluemap-url</code>
</p>
<p class="text-lg mb-8 max-w-3xl mx-auto opacity-90 leading-relaxed">
<strong>Note</strong>: URLs are long and P2P-based.
</p>
</section>
<section id="plugin-support" class="section-bg p-8 sm:p-10 mb-12">
<h2
class="text-3xl minecraft-font mb-8 text-center bg-clip-text text-transparent bg-gradient-to-r from-teal-400 to-blue-500">
Plugin Support</h2>
<p class="text-lg mb-8 max-w-3xl mx-auto opacity-90 leading-relaxed">
Plugins can be enabled using <a href="https://github.com/CardboardPowered/cardboard" class="underline text-teal-400 hover:text-blue-400">Cardboard</a> or <a href="https://github.com/MohistMC/Banner" class="underline text-teal-400 hover:text-blue-400">Banner</a>, but they may cause instability.
</p>
<p class="text-lg mb-8 max-w-3xl mx-auto opacity-90 leading-relaxed">
<strong>Recommended Mod Alternatives</strong>:
</p>
<ul class="text-lg max-w-3xl mx-auto opacity-90 leading-relaxed list-disc list-inside mb-8">
<li>AuthMe: <a href="https://modrinth.com/mod/easyauth" class="underline text-teal-400 hover:text-blue-400">EasyAuth</a></li>
<li>CoreProtect: <a href="https://modrinth.com/mod/ledger" class="underline text-teal-400 hover:text-blue-400">Ledger</a></li>
<li>DiscordSRV: <a href="https://modrinth.com/mod/discord-mc-chat" class="underline text-teal-400 hover:text-blue-400">Discord-MC-Chat</a></li>
<li>Profiling: <a href="https://modrinth.com/mod/spark" class="underline text-teal-400 hover:text-blue-400">Spark</a></li>
<li>Whitelist: <a href="https://modrinth.com/mod/easywhitelist" class="underline text-teal-400 hover:text-blue-400">EasyWhitelist</a></li>
<li>SkinsRestorer: <a href="https://modrinth.com/mod/fabrictailor" class="underline text-teal-400 hover:text-blue-400">FabricTailor</a></li>
<li>LuckPerms: <a href="https://modrinth.com/mod/luckperms" class="underline text-teal-400 hover:text-blue-400">LuckPerms</a></li>
</ul>
<p class="text-lg mb-8 max-w-3xl mx-auto opacity-90 leading-relaxed">
<strong>Note</strong>: Use AuthMe/SkinsRestorer only for offline-mode servers.
</p>
</section>
<section id="proxy-servers" class="section-bg p-8 sm:p-10 mb-12">
<h2
class="text-3xl minecraft-font mb-8 text-center bg-clip-text text-transparent bg-gradient-to-r from-teal-400 to-blue-500">
Proxy Servers (BungeeCord/Velocity)</h2>
<p class="text-lg mb-8 max-w-3xl mx-auto opacity-90 leading-relaxed">
Proxy servers like Velocity connect multiple Minecraft servers, allowing seamless player transfers. Players connect to a lightweight proxy, which redirects them to “slave” servers.
</p>
<p class="text-lg mb-8 max-w-3xl mx-auto opacity-90 leading-relaxed">
<strong>Recommended Proxy</strong>: Use <strong>Velocity</strong> for stability and performance. Avoid BungeeCord (outdated) or Waterfall (unsupported).
</p>
<p class="text-lg mb-8 max-w-3xl mx-auto opacity-90 leading-relaxed">
<strong>Connecting to My-MC.Link</strong>:<br>
1. Use <code class="bg-gray-800 text-teal-400 px-1 rounded">/my-mc-link</code> for a temporary domain (7-day limit) or the Advanced Connection method.<br>
2. Install <a href="https://modrinth.com/mod/fabricproxy-lite" class="underline text-teal-400 hover:text-blue-400">FabricProxy-Lite</a> on your Fabric server to prevent direct connections.
</p>
</section>
<section id="mymcrealms" class="section-bg p-8 sm:p-10 mb-12">
<h2
class="text-3xl minecraft-font mb-8 text-center bg-clip-text text-transparent bg-gradient-to-r from-teal-400 to-blue-500">
MyMcRealms</h2>
<p class="text-lg mb-8 max-w-3xl mx-auto opacity-90 leading-relaxed">
<strong>MyMcRealms</strong> is a free alternative to Minecraft Realms, integrated with My-MC.Link.
</p>
<p class="text-lg mb-8 max-w-3xl mx-auto opacity-90 leading-relaxed">
<strong>How to Connect</strong>:<br>
1. Install the Fabric mod loader.<br>
2. Download the MyMcRealms mod: <a href="https://realms.my-mc.link/public/mod/MyMcRealms-1.0.jar" class="underline text-teal-400 hover:text-blue-400">MyMcRealms-1.0.jar</a>.<br>
3. Place it in your Minecraft <code>mods</code> folder (e.g., <code>.minecraft/versions/1.21/mods</code>).<br>
4. Launch Minecraft and click the <strong>Minecraft Realms</strong> button.
</p>
<p class="text-lg mb-8 max-w-3xl mx-auto opacity-90 leading-relaxed">
<strong>Troubleshooting</strong>:<br>
- <strong>Server Not Visible</strong>: Run <code class="bg-gray-800 text-teal-400 px-1 rounded">/my-mc-link</code> and wait ~1 minute or restart the game.<br>
- <strong>Not the Owner</strong>: Claim ownership with:<br>
<code class="bg-gray-800 text-teal-400 px-1 rounded">/mc-cmd cmd: op <yourUsername></code>
</p>
<p class="text-lg mb-8 max-w-3xl mx-auto opacity-90 leading-relaxed">
<strong>Managing Players</strong>:<br>
- <strong>Operator Status</strong>:<br>
- In-game: <code class="bg-gray-800 text-teal-400 px-1 rounded">/op <username></code><br>
- Via Realms: <code>Configure</code><code>Players</code><br>
- <strong>Whitelist</strong>:<br>
- In-game: <code class="bg-gray-800 text-teal-400 px-1 rounded">/whitelist <username></code><br>
- Via Realms: <code>Configure</code><code>Players</code> or <code>Settings</code>
</p>
<p class="text-lg mb-8 max-w-3xl mx-auto opacity-90 leading-relaxed">
<strong>Note</strong>: MyMcRealms is free, unlike Mojangs premium Realms.
</p>
</section>
<section id="my-mc-api" class="section-bg p-8 sm:p-10 mb-12">
<h2
class="text-3xl minecraft-font mb-8 text-center bg-clip-text text-transparent bg-gradient-to-r from-teal-400 to-blue-500">
My-MC API</h2>
<p class="text-lg mb-8 max-w-3xl mx-auto opacity-90 leading-relaxed">
The My-MC API allows programmatic server management via HTTP requests.
</p>
<p class="text-lg mb-8 max-w-3xl mx-auto opacity-90 leading-relaxed">
<strong>Key Features</strong>:
</p>
<ul class="text-lg max-w-3xl mx-auto opacity-90 leading-relaxed list-disc list-inside mb-8">
<li><strong>Authentication</strong>: Generate a 365-day API key with <code class="bg-gray-800 text-teal-400 px-1 rounded">/api-key</code> in Discord.</li>
<li><strong>Server Management</strong>: Start, stop, or restart servers (<code>GET /start</code>, <code>/stop</code>, <code>/restart</code>).</li>
<li><strong>Player Management</strong>: List players (<code>GET /list-players</code>), ban/unban (<code>POST /ban</code>, <code>/unban</code>), send messages (<code>POST /say</code>, <code>/tell</code>).</li>
<li><strong>Mod Management</strong>: Install/uninstall mods (<code>POST /install</code>, <code>/uninstall</code>), search mods (<code>POST /search</code>), list mods (<code>GET /mod-list</code>).</li>
<li><strong>Monitoring</strong>: View stats (<code>GET /stats</code>) and logs (<code>GET /log</code>).</li>
</ul>
<p class="text-lg mb-8 max-w-3xl mx-auto opacity-90 leading-relaxed">
<strong>Documentation</strong>:<br>
- API: <a href="https://info.my-mc.link/api/" class="underline text-teal-400 hover:text-blue-400">API Docs</a><br>
- JavaScript Library: <a href="https://info.my-mc.link/mymc-lib/" class="underline text-teal-400 hover:text-blue-400">MyMC Lib Docs</a>
</p>
</section>
<section id="beta-phase-notice" class="section-bg p-8 sm:p-10 text-center">
<h2
class="text-3xl minecraft-font mb-6 bg-clip-text text-transparent bg-gradient-to-r from-teal-400 to-blue-500">
Beta Phase Notice</h2>
<p class="text-lg max-w-3xl mx-auto opacity-90 leading-relaxed">
My-MC.Link is in beta, so minor issues may arise. Please review our
<a href="https://my-mc.link/terms.html" class="underline text-teal-400 hover:text-blue-400">Terms of
Service</a> and
<a href="https://discord.com/guidelines" class="underline text-teal-400 hover:text-blue-400">Discord
Rules</a> before getting started.
</p>
</section>
</main>
<footer class="bg-gray-900/20 backdrop-filter backdrop-blur-xl py-8 text-center relative z-10">
<p class="text-sm opacity-90">© 2025 My-MC.Link. All rights reserved.</p>
<p class="text-sm opacity-90 mt-3">
Powered by <a href="https://holesail.io" class="underline" target="_blank">Holesail</a> with services
donated by <a href="https://raven-scott.fyi" class="underline">SNXRaven</a>
</p>
</footer>
<script src="https://my-mc.link/mc/js/main.js"></script>
</body>
</html>

564
wiki/mymc-java/index.html Normal file
View File

@ -0,0 +1,564 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>MyMCLib Library Documentation</title>
<link rel="icon" href="https://minecraft.wiki/images/Favicon.png" type="image/png">
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;700;900&display=swap" rel="stylesheet">
<link href="https://my-mc.link/mc/css/style_min.css" rel="stylesheet">
<link href="https://my-mc.link/mc/favicon.ico" rel="icon" type="image/x-icon">
<!-- Prism.js for syntax highlighting -->
<link href="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/themes/prism-okaidia.min.css" rel="stylesheet">
<style>
.code-block-wrapper {
position: relative;
margin-bottom: 1rem;
}
.copy-button {
position: absolute;
top: 0.5rem;
right: 0.5rem;
background: #2d3748;
color: #e2e8f0;
border: none;
padding: 0.5rem;
border-radius: 0.25rem;
cursor: pointer;
font-size: 0.875rem;
transition: background 0.2s;
}
.copy-button:hover {
background: #4a5568;
}
.copy-button.copied {
background: #2f855a;
}
pre[class*="language-"] {
margin: 0;
padding: 1rem;
border-radius: 0.5rem;
position: relative;
}
/* Table of Contents Styles */
.toc {
background: rgba(17, 24, 39, 0.8);
backdrop-filter: blur(10px);
border-radius: 12px;
padding: 1.5rem;
margin: 2rem auto;
max-width: 800px;
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}
.toc h2 {
font-family: 'minecraft-font', sans-serif;
font-size: 1.75rem;
text-align: center;
background: linear-gradient(to right, #14b8a6, #3b82f6);
-webkit-background-clip: text;
background-clip: text;
color: transparent;
margin-bottom: 1.5rem;
}
.toc ul {
list-style: none;
padding: 0;
}
.toc li {
margin: 0.75rem 0;
}
.toc a {
color: #d1d5db;
text-decoration: none;
font-size: 1.125rem;
font-weight: 500;
transition: color 0.3s ease, transform 0.3s ease;
display: block;
padding: 0.5rem 1rem;
border-radius: 8px;
}
.toc a:hover {
color: #14b8a6;
transform: translateX(10px);
background: rgba(255, 255, 255, 0.05);
}
@media (max-width: 640px) {
.toc {
padding: 1rem;
margin: 1rem;
}
.toc h2 {
font-size: 1.5rem;
}
.toc a {
font-size: 1rem;
}
}
</style>
</head>
<body>
<!-- Particle Effects -->
<div class="particle" style="left: 10%; top: 20%; animation-delay: 0s;"></div>
<div class="particle large" style="left: 30%; top: 50%; animation-delay: 2s;"></div>
<div class="particle" style="left: 50%; top: 30%; animation-delay: 4s;"></div>
<div class="particle large" style="left: 70%; top: 60%; animation-delay: 6s;"></div>
<div class="particle" style="left: 20%; top: 80%; animation-delay: 8s;"></div>
<header class="header-bg py-16 text-center relative z-10">
<div class="header-content flex items-center justify-between max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
<div>
<h1 class="text-5xl minecraft-font bg-clip-text text-transparent bg-gradient-to-r from-teal-400 to-blue-500">
<a href="https://info.my-mc.link/">MyMCLib Library Documentation</a></h1>
<p class="text-lg mt-4 opacity-90 tracking-wide font-medium">JavaScript Library for My-MC.Link API</p>
</div>
<a href="https://my-mc.link" class="btn-minecraft text-base self-center" target="_blank">Home</a>
</div>
</header>
<!-- Table of Contents -->
<nav class="toc">
<h2>Table of Contents</h2>
<ul>
<li><a href="#overview">Overview</a></li>
<li><a href="#installation">Installation</a></li>
<li><a href="#usage">Usage</a></li>
<li><a href="#code-examples">Code Examples</a></li>
<li><a href="#getting-server-time">Getting Server Time</a></li>
<li><a href="#getting-server-statistics">Getting Server Statistics</a></li>
<li><a href="#getting-server-logs">Getting Server Logs</a></li>
<li><a href="#starting-minecraft-server">Starting the Minecraft Server</a></li>
<li><a href="#stopping-minecraft-server">Stopping the Minecraft Server</a></li>
<li><a href="#restarting-minecraft-server">Restarting the Minecraft Server</a></li>
<li><a href="#creating-custom-link">Creating a Custom Link</a></li>
<li><a href="#deleting-custom-link">Deleting a Custom Link</a></li>
<li><a href="#creating-sftp-link">Creating an SFTP Link</a></li>
<li><a href="#deleting-sftp-link">Deleting an SFTP Link</a></li>
<li><a href="#getting-connection-hash">Getting Connection Hash</a></li>
<li><a href="#getting-sftp-connection-hash">Getting SFTP Connection Hash</a></li>
<li><a href="#getting-online-players">Getting Online Players</a></li>
<li><a href="#getting-website-url">Getting Server's Website URL</a></li>
<li><a href="#getting-map-url">Getting Server's Map URL</a></li>
<li><a href="#banning-player">Banning a Player</a></li>
<li><a href="#unbanning-player">Unbanning a Player</a></li>
<li><a href="#sending-message-all">Sending a Message to All Players</a></li>
<li><a href="#sending-private-message">Sending a Private Message to a Player</a></li>
<li><a href="#executing-console-command">Executing a Command in Server Console</a></li>
<li><a href="#giving-item">Giving an Item to a Player</a></li>
<li><a href="#installing-mod">Installing a Mod by ID</a></li>
<li><a href="#uninstalling-mod">Uninstalling a Mod by ID</a></li>
<li><a href="#retrieving-installed-mods">Retrieving a List of Installed Mods</a></li>
<li><a href="#api-reference">API Reference</a></li>
<li><a href="#explore-more">Explore More</a></li>
</ul>
</nav>
<main class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 pb-16 relative z-10">
<section id="overview" class="section-bg p-8 sm:p-10 mb-12">
<h2 class="text-3xl minecraft-font mb-8 text-center bg-clip-text text-transparent bg-gradient-to-r from-teal-400 to-blue-500">
Overview</h2>
<p class="text-lg mb-8 max-w-3xl mx-auto opacity-90 leading-relaxed">
The <code class="bg-gray-800 text-teal-400 px-1 rounded">MyMCLib</code> library provides a convenient way to interact with the My-MC.Link API for managing Minecraft servers. It includes methods for performing various actions such as retrieving server information, managing server settings, controlling gameplay, and interacting with players.
</p>
</section>
<section id="installation" class="section-bg p-8 sm:p-10 mb-12">
<h2 class="text-3xl minecraft-font mb-8 text-center bg-clip-text text-transparent bg-gradient-to-r from-teal-400 to-blue-500">
Installation</h2>
<p class="text-lg mb-8 max-w-3xl mx-auto opacity-90 leading-relaxed">
To use the <code class="bg-gray-800 text-teal-400 px-1 rounded">MyMCLib</code> library in your project, install it via npm:
</p>
<div class="code-block-wrapper">
<pre class="language-bash"><code>npm install mymc-lib</code></pre>
<button class="copy-button" onclick="copyCode(this)">Copy</button>
</div>
<p class="text-lg mb-8 max-w-3xl mx-auto opacity-90 leading-relaxed">
<strong>Proper Importing:</strong> To make use of this module, you'll need to either utilize the <code class="bg-gray-800 text-teal-400 px-1 rounded">.mjs</code> extension or incorporate <code class="bg-gray-800 text-teal-400 px-1 rounded">"type": "module"</code> in your <code class="bg-gray-800 text-teal-400 px-1 rounded">package.json</code> file. This requirement exists because modern JavaScript (ES6 and later) introduced the concept of modules, which allows for more organized and scalable code by encapsulating functionality within separate files.
</p>
</section>
<section id="usage" class="section-bg p-8 sm:p-10 mb-12">
<h2 class="text-3xl minecraft-font mb-8 text-center bg-clip-text text-transparent bg-gradient-to-r from-teal-400 to-blue-500">
Usage</h2>
<p class="text-lg mb-8 max-w-3xl mx-auto opacity-90 leading-relaxed">
First, import the library into your project:
</p>
<div class="code-block-wrapper">
<pre class="language-typescript"><code>import MyMCLib from "mymc-lib";</code></pre>
<button class="copy-button" onclick="copyCode(this)">Copy</button>
</div>
<p class="text-lg mb-8 max-w-3xl mx-auto opacity-90 leading-relaxed">
Then, create an instance of <code class="bg-gray-800 text-teal-400 px-1 rounded">MyMCLib</code> by providing your API token:
</p>
<div class="code-block-wrapper">
<pre class="language-typescript"><code>const MyMC = new MyMCLib("your-api-token");</code></pre>
<button class="copy-button" onclick="copyCode(this)">Copy</button>
</div>
<h3 class="text-xl minecraft-font mb-3 text-teal-400 mt-8">Example Usage</h3>
<div class="code-block-wrapper">
<pre class="language-typescript"><code>import MyMCLib from "mymc-lib";
// Instantiate MyMCLib with your API token
const MyMC = new MyMCLib("your-api-token");
// Will print information about API key expiration date
let keyData = await MyMC.getTime();
console.log(keyData);</code></pre>
<button class="copy-button" onclick="copyCode(this)">Copy</button>
</div>
<p class="text-sm opacity-90 leading-relaxed mt-4"><strong>Output:</strong></p>
<div class="code-block-wrapper">
<pre class="language-bash"><code>root@test:/home# node test
{
success: true,
keyexpireString: 'Tue Apr 15 2025 06:14:59 GMT-0400 (Eastern Daylight Time)',
expireDate: '2025-04-15T10:14:59.000Z',
expireEpoch: 1744712099000
}</code></pre>
<button class="copy-button" onclick="copyCode(this)">Copy</button>
</div>
</section>
<section id="code-examples" class="section-bg p-8 sm:p-10 mb-12">
<h2 class="text-3xl minecraft-font mb-8 text-center bg-clip-text text-transparent bg-gradient-to-r from-teal-400 to-blue-500">
Code Examples</h2>
<div class="grid grid-cols-1 gap-6">
<!-- 1. Getting Server Time -->
<div id="getting-server-time" class="feature-card tilt-card">
<h3 class="text-xl minecraft-font mb-3 text-teal-400">Getting Server Time</h3>
<div class="code-block-wrapper">
<pre class="language-javascript"><code>const timeData = await MyMC.getTime();
console.log(timeData);</code></pre>
<button class="copy-button" onclick="copyCode(this)">Copy</button>
</div>
</div>
<!-- 2. Getting Server Statistics -->
<div id="getting-server-statistics" class="feature-card tilt-card">
<h3 class="text-xl minecraft-font mb-3 text-teal-400">Getting Server Statistics</h3>
<div class="code-block-wrapper">
<pre class="language-javascript"><code>const statsData = await MyMC.getStats();
console.log(statsData);</code></pre>
<button class="copy-button" onclick="copyCode(this)">Copy</button>
</div>
</div>
<!-- 3. Getting Server Logs -->
<div id="getting-server-logs" class="feature-card tilt-card">
<h3 class="text-xl minecraft-font mb-3 text-teal-400">Getting Server Logs</h3>
<div class="code-block-wrapper">
<pre class="language-javascript"><code>const logData = await MyMC.getLog();
console.log(logData);</code></pre>
<button class="copy-button" onclick="copyCode(this)">Copy</button>
</div>
</div>
<!-- 4. Starting the Minecraft Server -->
<div id="starting-minecraft-server" class="feature-card tilt-card">
<h3 class="text-xl minecraft-font mb-3 text-teal-400">Starting the Minecraft Server</h3>
<div class="code-block-wrapper">
<pre class="language-javascript"><code>const startResult = await MyMC.startServer();
console.log(startResult);</code></pre>
<button class="copy-button" onclick="copyCode(this)">Copy</button>
</div>
</div>
<!-- 5. Stopping the Minecraft Server -->
<div id="stopping-minecraft-server" class="feature-card tilt-card">
<h3 class="text-xl minecraft-font mb-3 text-teal-400">Stopping the Minecraft Server</h3>
<div class="code-block-wrapper">
<pre class="language-javascript"><code>const stopResult = await MyMC.stopServer();
console.log(stopResult);</code></pre>
<button class="copy-button" onclick="copyCode(this)">Copy</button>
</div>
</div>
<!-- 6. Restarting the Minecraft Server -->
<div id="restarting-minecraft-server" class="feature-card tilt-card">
<h3 class="text-xl minecraft-font mb-3 text-teal-400">Restarting the Minecraft Server</h3>
<div class="code-block-wrapper">
<pre class="language-javascript"><code>const restartResult = await MyMC.restartServer();
console.log(restartResult);</code></pre>
<button class="copy-button" onclick="copyCode(this)">Copy</button>
</div>
</div>
<!-- 7. Creating a Custom Link -->
<div id="creating-custom-link" class="feature-card tilt-card">
<h3 class="text-xl minecraft-font mb-3 text-teal-400">Creating a Custom Link</h3>
<div class="code-block-wrapper">
<pre class="language-javascript"><code>const customLinkResult = await MyMC.createMyLink();
console.log(customLinkResult);</code></pre>
<button class="copy-button" onclick="copyCode(this)">Copy</button>
</div>
</div>
<!-- 8. Deleting a Custom Link -->
<div id="deleting-custom-link" class="feature-card tilt-card">
<h3 class="text-xl minecraft-font mb-3 text-teal-400">Deleting a Custom Link</h3>
<div class="code-block-wrapper">
<pre class="language-javascript"><code>const deleteLinkResult = await MyMC.deleteMyLink();
console.log(deleteLinkResult);</code></pre>
<button class="copy-button" onclick="copyCode(this)">Copy</button>
</div>
</div>
<!-- 9. Creating an SFTP Link -->
<div id="creating-sftp-link" class="feature-card tilt-card">
<h3 class="text-xl minecraft-font mb-3 text-teal-400">Creating an SFTP Link</h3>
<div class="code-block-wrapper">
<pre class="language-javascript"><code>const sftpLinkResult = await MyMC.createLinkSFTP();
console.log(sftpLinkResult);</code></pre>
<button class="copy-button" onclick="copyCode(this)">Copy</button>
</div>
</div>
<!-- 10. Deleting an SFTP Link -->
<div id="deleting-sftp-link" class="feature-card tilt-card">
<h3 class="text-xl minecraft-font mb-3 text-teal-400">Deleting an SFTP Link</h3>
<div class="code-block-wrapper">
<pre class="language-javascript"><code>const deleteSftpLinkResult = await MyMC.deleteLinkSFTP();
console.log(deleteSftpLinkResult);</code></pre>
<button class="copy-button" onclick="copyCode(this)">Copy</button>
</div>
</div>
<!-- 11. Getting Connection Hash -->
<div id="getting-connection-hash" class="feature-card tilt-card">
<h3 class="text-xl minecraft-font mb-3 text-teal-400">Getting Connection Hash</h3>
<div class="code-block-wrapper">
<pre class="language-javascript"><code>const hashData = await MyMC.getConnectionHash();
console.log(hashData);</code></pre>
<button class="copy-button" onclick="copyCode(this)">Copy</button>
</div>
</div>
<!-- 12. Getting SFTP Connection Hash -->
<div id="getting-sftp-connection-hash" class="feature-card tilt-card">
<h3 class="text-xl minecraft-font mb-3 text-teal-400">Getting SFTP Connection Hash</h3>
<div class="code-block-wrapper">
<pre class="language-javascript"><code>const sftpHashData = await MyMC.getConnectionHashSFTP();
console.log(sftpHashData);</code></pre>
<button class="copy-button" onclick="copyCode(this)">Copy</button>
</div>
</div>
<!-- 13. Getting Online Players -->
<div id="getting-online-players" class="feature-card tilt-card">
<h3 class="text-xl minecraft-font mb-3 text-teal-400">Getting Online Players</h3>
<div class="code-block-wrapper">
<pre class="language-javascript"><code>const playersData = await MyMC.getOnlinePlayers();
console.log(playersData);</code></pre>
<button class="copy-button" onclick="copyCode(this)">Copy</button>
</div>
</div>
<!-- 14. Getting Server's Website URL -->
<div id="getting-website-url" class="feature-card tilt-card">
<h3 class="text-xl minecraft-font mb-3 text-teal-400">Getting Server's Website URL</h3>
<div class="code-block-wrapper">
<pre class="language-javascript"><code>const websiteURL = await MyMC.getWebsiteURL();
console.log(websiteURL);</code></pre>
<button class="copy-button" onclick="copyCode(this)">Copy</button>
</div>
</div>
<!-- 15. Getting Server's Map URL -->
<div id="getting-map-url" class="feature-card tilt-card">
<h3 class="text-xl minecraft-font mb-3 text-teal-400">Getting Server's Map URL</h3>
<div class="code-block-wrapper">
<pre class="language-javascript"><code>const mapURL = await MyMC.getMapURL();
console.log(mapURL);</code></pre>
<button class="copy-button" onclick="copyCode(this)">Copy</button>
</div>
</div>
<!-- 16. Banning a Player -->
<div id="banning-player" class="feature-card tilt-card">
<h3 class="text-xl minecraft-font mb-3 text-teal-400">Banning a Player</h3>
<div class="code-block-wrapper">
<pre class="language-javascript"><code>const banResult = await MyMC.postBan("username");
console.log(banResult);</code></pre>
<button class="copy-button" onclick="copyCode(this)">Copy</button>
</div>
</div>
<!-- 17. Unbanning a Player -->
<div id="unbanning-player" class="feature-card tilt-card">
<h3 class="text-xl minecraft-font mb-3 text-teal-400">Unbanning a Player</h3>
<div class="code-block-wrapper">
<pre class="language-javascript"><code>const unbanResult = await MyMC.postUnban("username");
console.log(unbanResult);</code></pre>
<button class="copy-button" onclick="copyCode(this)">Copy</button>
</div>
</div>
<!-- 18. Sending a Message to All Players -->
<div id="sending-message-all" class="feature-card tilt-card">
<h3 class="text-xl minecraft-font mb-3 text-teal-400">Sending a Message to All Players</h3>
<div class="code-block-wrapper">
<pre class="language-javascript"><code>const sayResult = await MyMC.postSay("Hello, everyone!");
console.log(sayResult);</code></pre>
<button class="copy-button" onclick="copyCode(this)">Copy</button>
</div>
</div>
<!-- 19. Sending a Private Message to a Player -->
<div id="sending-private-message" class="feature-card tilt-card">
<h3 class="text-xl minecraft-font mb-3 text-teal-400">Sending a Private Message to a Player</h3>
<div class="code-block-wrapper">
<pre class="language-javascript"><code>const tellResult = await MyMC.postTell("username", "Hey, how are you?");
console.log(tellResult);</code></pre>
<button class="copy-button" onclick="copyCode(this)">Copy</button>
</div>
</div>
<!-- 20. Executing a Command in Server Console -->
<div id="executing-console-command" class="feature-card tilt-card">
<h3 class="text-xl minecraft-font mb-3 text-teal-400">Executing a Command in Server Console</h3>
<div class="code-block-wrapper">
<pre class="language-javascript"><code>const consoleResult = await MyMC.postConsole("say Hello, world!");
console.log(consoleResult);</code></pre>
<button class="copy-button" onclick="copyCode(this)">Copy</button>
</div>
</div>
<!-- 21. Giving an Item to a Player -->
<div id="giving-item" class="feature-card tilt-card">
<h3 class="text-xl minecraft-font mb-3 text-teal-400">Giving an Item to a Player</h3>
<div class="code-block-wrapper">
<pre class="language-javascript"><code>const giveResult = await MyMC.postGive("username", "item", 1);
console.log(giveResult);</code></pre>
<button class="copy-button" onclick="copyCode(this)">Copy</button>
</div>
</div>
<!-- 22. Installing a Mod by ID -->
<div id="installing-mod" class="feature-card tilt-card">
<h3 class="text-xl minecraft-font mb-3 text-teal-400">Installing a Mod by ID</h3>
<div class="code-block-wrapper">
<pre class="language-javascript"><code>const modID = "exampleMod123";
const installResult = await MyMC.installMod(modID);
console.log(installResult);</code></pre>
<button class="copy-button" onclick="copyCode(this)">Copy</button>
</div>
</div>
<!-- 23. Uninstalling a Mod by ID -->
<div id="uninstalling-mod" class="feature-card tilt-card">
<h3 class="text-xl minecraft-font mb-3 text-teal-400">Uninstalling a Mod by ID</h3>
<div class="code-block-wrapper">
<pre class="language-javascript"><code>const modID = "exampleMod123";
const uninstallResult = await MyMC.uninstallMod(modID);
console.log(uninstallResult);</code></pre>
<button class="copy-button" onclick="copyCode(this)">Copy</button>
</div>
</div>
<!-- 24. Retrieving a List of Installed Mods -->
<div id="retrieving-installed-mods" class="feature-card tilt-card">
<h3 class="text-xl minecraft-font mb-3 text-teal-400">Retrieving a List of Installed Mods</h3>
<div class="code-block-wrapper">
<pre class="language-javascript"><code>const installedMods = await MyMC.getInstalledMods();
console.log(installedMods);</code></pre>
<button class="copy-button" onclick="copyCode(this)">Copy</button>
</div>
</div>
</div>
</section>
<section id="api-reference" class="section-bg p-8 sm:p-10 mb-12">
<h2 class="text-3xl minecraft-font mb-8 text-center bg-clip-text text-transparent bg-gradient-to-r from-teal-400 to-blue-500">
API Reference</h2>
<h3 class="text-xl minecraft-font mb-3 text-teal-400">MyMCLib Class</h3>
<h4 class="text-lg font-bold mb-2">Constructor</h4>
<div class="code-block-wrapper">
<pre class="language-typescript"><code>constructor(token: string)</code></pre>
<button class="copy-button" onclick="copyCode(this)">Copy</button>
</div>
<p class="text-sm opacity-90 leading-relaxed mb-4">Creates an instance of the <code class="bg-gray-800 text-teal-400 px-1 rounded">MyMCLib</code> class with the provided API token.</p>
<h4 class="text-lg font-bold mb-2 mt-6">Methods</h4>
<ul class="text-sm opacity-90 leading-relaxed list-disc pl-6 mb-4">
<li><code class="bg-gray-800 text-teal-400 px-1 rounded">getTime(): Promise<any></code> - Retrieves the current server time.</li>
<li><code class="bg-gray-800 text-teal-400 px-1 rounded">getStats(): Promise<any></code> - Retrieves server statistics.</li>
<li><code class="bg-gray-800 text-teal-400 px-1 rounded">getLog(): Promise<any></code> - Retrieves server logs.</li>
<li><code class="bg-gray-800 text-teal-400 px-1 rounded">startServer(): Promise<any></code> - Starts the Minecraft server.</li>
<li><code class="bg-gray-800 text-teal-400 px-1 rounded">stopServer(): Promise<any></code> - Stops the Minecraft server.</li>
<li><code class="bg-gray-800 text-teal-400 px-1 rounded">restartServer(): Promise<any></code> - Restarts the Minecraft server.</li>
<li><code class="bg-gray-800 text-teal-400 px-1 rounded">createMyLink(): Promise<any></code> - Creates a custom link.</li>
<li><code class="bg-gray-800 text-teal-400 px-1 rounded">deleteMyLink(): Promise<any></code> - Deletes a custom link.</li>
<li><code class="bg-gray-800 text-teal-400 px-1 rounded">createLinkSFTP(): Promise<any></code> - Creates an SFTP link.</li>
<li><code class="bg-gray-800 text-teal-400 px-1 rounded">deleteLinkSFTP(): Promise<any></code> - Deletes an SFTP link.</li>
<li><code class="bg-gray-800 text-teal-400 px-1 rounded">getConnectionHash(): Promise<any></code> - Retrieves a connection hash.</li>
<li><code class="bg-gray-800 text-teal-400 px-1 rounded">getConnectionHashSFTP(): Promise<any></code> - Retrieves an SFTP connection hash.</li>
<li><code class="bg-gray-800 text-teal-400 px-1 rounded">getOnlinePlayers(): Promise<any></code> - Retrieves a list of online players.</li>
<li><code class="bg-gray-800 text-teal-400 px-1 rounded">getWebsiteURL(): Promise<any></code> - Retrieves the server's website URL.</li>
<li><code class="bg-gray-800 text-teal-400 px-1 rounded">getMapURL(): Promise<any></code> - Retrieves the server's map URL.</li>
<li><code class="bg-gray-800 text-teal-400 px-1 rounded">postBan(username: string): Promise<any></code> - Bans a player by username.</li>
<li><code class="bg-gray-800 text-teal-400 px-1 rounded">postUnban(username: string): Promise<any></code> - Unbans a player by username.</li>
<li><code class="bg-gray-800 text-teal-400 px-1 rounded">postSay(message: string): Promise<any></code> - Sends a message to all players.</li>
<li><code class="bg-gray-800 text-teal-400 px-1 rounded">postTell(username: string, message: string): Promise<any></code> - Sends a private message to a player.</li>
<li><code class="bg-gray-800 text-teal-400 px-1 rounded">postConsole(command: string): Promise<any></code> - Executes a command in the server console.</li>
<li><code class="bg-gray-800 text-teal-400 px-1 rounded">postGive(username: string, item: string, amount: number): Promise<any></code> - Gives an item to a player.</li>
<li><code class="bg-gray-800 text-teal-400 px-1 rounded">installMod(modID: string): Promise<any></code> - Installs a mod by ID.</li>
<li><code class="bg-gray-800 text-teal-400 px-1 rounded">uninstallMod(modID: string): Promise<any></code> - Uninstalls a mod by ID.</li>
<li><code class="bg-gray-800 text-teal-400 px-1 rounded">getInstalledMods(): Promise<any></code> - Retrieves a list of installed mods.</li>
</ul>
<h3 class="text-xl minecraft-font mb-3 text-teal-400 mt-8">ApiUtils Class</h3>
<h4 class="text-lg font-bold mb-2">Methods</h4>
<ul class="text-sm opacity-90 leading-relaxed list-disc pl-6 mb-4">
<li><code class="bg-gray-800 text-teal-400 px-1 rounded">getRequest(endpoint: ApiEndpoint, token: string): Promise<any></code> - Makes a GET request to the specified API endpoint.</li>
<li><code class="bg-gray-800 text-teal-400 px-1 rounded">deleteRequest(endpoint: ApiEndpoint, token: string): Promise<any></code> - Makes a DELETE request to the specified API endpoint.</li>
<li><code class="bg-gray-800 text-teal-400 px-1 rounded">postRequest(endpoint: ApiEndpoint, token: string, data: {}): Promise<any></code> - Makes a POST request to the specified API endpoint with the provided data.</li>
</ul>
</section>
<section id="explore-more" class="section-bg p-8 sm:p-10 text-center mb-12">
<h2 class="text-3xl minecraft-font mb-6 bg-clip-text text-transparent bg-gradient-to-r from-teal-400 to-blue-500">
Explore More</h2>
<p class="text-lg mb-8 max-w-2xl mx-auto opacity-90 leading-relaxed">
Ready to automate your server?<BR>Join our community, dive into our resources, and start building with the My-MC.Link API and MyMCLib.
</p>
<div class="flex justify-center gap-4 flex-wrap">
<a href="https://join.my-mc.link" class="btn-minecraft text-base" target="_blank">Join Our Discord</a>
<a href="https://info.my-mc.link" class="btn-minecraft text-base" target="_blank">Explore the Wiki</a>
</div>
</section>
</main>
<footer class="bg-gray-900/20 backdrop-filter backdrop-blur-xl py-8 text-center relative z-10">
<p class="text-sm opacity-90">© 2025 My-MC.Link. All rights reserved.</p>
<p class="text-sm opacity-90 mt-3">
Powered by <a href="https://holesail.io" class="underline" target="_blank">Holesail</a> with services
donated by <a href="https://raven-scott.fyi" class="underline">SNXRaven</a>
</p>
</footer>
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/prism.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/components/prism-javascript.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/components/prism-typescript.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/components/prism-bash.min.js"></script>
<script>
function copyCode(button) {
const codeBlock = button.previousElementSibling.querySelector('code');
const text = codeBlock.textContent;
navigator.clipboard.writeText(text).then(() => {
button.textContent = 'Copied!';
button.classList.add('copied');
setTimeout(() => {
button.textContent = 'Copy';
button.classList.remove('copied');
}, 2000);
}).catch(err => {
console.error('Failed to copy: ', err);
});
}
</script>
<script src="https://my-mc.link/mc/js/main.js"></script>
</body>
</html>

577
wiki/mymc-lib/index.html Normal file
View File

@ -0,0 +1,577 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>MyMCLib Library Documentation</title>
<link rel="icon" href="https://minecraft.wiki/images/Favicon.png" type="image/png">
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;700;900&display=swap" rel="stylesheet">
<link href="https://my-mc.link/mc/css/style_min.css" rel="stylesheet">
<link href="https://my-mc.link/mc/favicon.ico" rel="icon" type="image/x-icon">
<!-- Prism.js for syntax highlighting -->
<link href="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/themes/prism-okaidia.min.css" rel="stylesheet">
<style>
.code-block-wrapper {
position: relative;
margin-bottom: 1rem;
}
.copy-button {
position: absolute;
top: 0.5rem;
right: 0.5rem;
background: #2d3748;
color: #e2e8f0;
border: none;
padding: 0.5rem;
border-radius: 0.25rem;
cursor: pointer;
font-size: 0.875rem;
transition: background 0.2s;
}
.copy-button:hover {
background: #4a5568;
}
.copy-button.copied {
background: #2f855a;
}
pre[class*="language-"] {
margin: 0;
padding: 1rem;
border-radius: 0.5rem;
position: relative;
}
/* Table of Contents Styles */
.toc {
background: rgba(17, 24, 39, 0.8);
backdrop-filter: blur(10px);
border-radius: 12px;
padding: 1.5rem;
margin: 2rem auto;
max-width: 800px;
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}
.toc h2 {
font-family: 'minecraft-font', sans-serif;
font-size: 1.75rem;
text-align: center;
background: linear-gradient(to right, #14b8a6, #3b82f6);
-webkit-background-clip: text;
background-clip: text;
color: transparent;
margin-bottom: 1.5rem;
}
.toc ul {
list-style: none;
padding: 0;
}
.toc li {
margin: 0.75rem 0;
}
.toc a {
color: #d1d5db;
text-decoration: none;
font-size: 1.125rem;
font-weight: 500;
transition: color 0.3s ease, transform 0.3s ease;
display: block;
padding: 0.5rem 1rem;
border-radius: 8px;
}
.toc a:hover {
color: #14b8a6;
transform: translateX(10px);
background: rgba(255, 255, 255, 0.05);
}
@media (max-width: 640px) {
.toc {
padding: 1rem;
margin: 1rem;
}
.toc h2 {
font-size: 1.5rem;
}
.toc a {
font-size: 1rem;
}
}
</style>
</head>
<body>
<!-- Particle Effects -->
<div class="particle" style="left: 10%; top: 20%; animation-delay: 0s;"></div>
<div class="particle large" style="left: 30%; top: 50%; animation-delay: 2s;"></div>
<div class="particle" style="left: 50%; top: 30%; animation-delay: 4s;"></div>
<div class="particle large" style="left: 70%; top: 60%; animation-delay: 6s;"></div>
<div class="particle" style="left: 20%; top: 80%; animation-delay: 8s;"></div>
<header class="header-bg py-16 text-center relative z-10">
<div class="header-content flex items-center justify-between max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
<div>
<h1 class="text-5xl minecraft-font bg-clip-text text-transparent bg-gradient-to-r from-teal-400 to-blue-500">
<a href="https://info.my-mc.link/"> MyMCLib Library Documentation</a></h1>
<p class="text-lg mt-4 opacity-90 tracking-wide font-medium">A JavaScript library for interacting with the My-MC.Link API</p>
</div>
<a href="https://my-mc.link" class="btn-minecraft text-base self-center" target="_blank">Home</a>
</div>
</header>
<!-- Table of Contents -->
<nav class="toc">
<h2>Table of Contents</h2>
<ul>
<li><a href="#overview">Overview</a></li>
<li><a href="#installation">Installation</a></li>
<li><a href="#usage">Usage</a></li>
<li><a href="#code-examples">Code Examples</a></li>
<li><a href="#getting-server-time">Getting Server Time</a></li>
<li><a href="#getting-server-statistics">Getting Server Statistics</a></li>
<li><a href="#getting-server-logs">Getting Server Logs</a></li>
<li><a href="#starting-the-minecraft-server">Starting the Minecraft Server</a></li>
<li><a href="#stopping-the-minecraft-server">Stopping the Minecraft Server</a></li>
<li><a href="#restarting-the-minecraft-server">Restarting the Minecraft Server</a></li>
<li><a href="#creating-a-custom-link">Creating a Custom Link</a></li>
<li><a href="#deleting-a-custom-link">Deleting a Custom Link</a></li>
<li><a href="#creating-an-sftp-link">Creating an SFTP Link</a></li>
<li><a href="#deleting-an-sftp-link">Deleting an SFTP Link</a></li>
<li><a href="#getting-connection-hash">Getting Connection Hash</a></li>
<li><a href="#getting-sftp-connection-hash">Getting SFTP Connection Hash</a></li>
<li><a href="#getting-online-players">Getting Online Players</a></li>
<li><a href="#getting-servers-website-url">Getting Server's Website URL</a></li>
<li><a href="#getting-servers-map-url">Getting Server's Map URL</a></li>
<li><a href="#banning-a-player">Banning a Player</a></li>
<li><a href="#unbanning-a-player">Unbanning a Player</a></li>
<li><a href="#sending-a-message-to-all-players">Sending a Message to All Players</a></li>
<li><a href="#sending-a-private-message-to-a-player">Sending a Private Message to a Player</a></li>
<li><a href="#executing-a-command-in-server-console">Executing a Command in Server Console</a></li>
<li><a href="#giving-an-item-to-a-player">Giving an Item to a Player</a></li>
<li><a href="#installing-a-mod-by-id">Installing a Mod by ID</a></li>
<li><a href="#uninstalling-a-mod-by-id">Uninstalling a Mod by ID</a></li>
<li><a href="#retrieving-a-list-of-installed-mods">Retrieving a List of Installed Mods</a></li>
<li><a href="#api-reference">API Reference</a></li>
<li><a href="#java-client">Java Client</a></li>
<li><a href="#explore-more">Explore More</a></li>
</ul>
</nav>
<main class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 pb-16 relative z-10">
<section id="overview" class="section-bg p-8 sm:p-10 mb-12">
<h2 class="text-3xl minecraft-font mb-8 text-center bg-clip-text text-transparent bg-gradient-to-r from-teal-400 to-blue-500">
Overview</h2>
<p class="text-lg mb-8 max-w-3xl mx-auto opacity-90 leading-relaxed">
The <code class="bg-gray-800 text-teal-400 px-1 rounded">MyMCLib</code> library provides a convenient way to interact with the My-MC.Link API for managing Minecraft servers. It includes methods for performing various actions such as retrieving server information, managing server settings, controlling gameplay, and interacting with players.
</p>
</section>
<section id="installation" class="section-bg p-8 sm:p-10 mb-12">
<h2 class="text-3xl minecraft-font mb-8 text-center bg-clip-text text-transparent bg-gradient-to-r from-teal-400 to-blue-500">
Installation</h2>
<p class="text-lg mb-8 max-w-3xl mx-auto opacity-90 leading-relaxed">
To use the <code class="bg-gray-800 text-teal-400 px-1 rounded">MyMCLib</code> library in your project, install it via npm:
</p>
<div class="code-block-wrapper">
<pre class="language-bash"><code>npm install mymc-lib</code></pre>
<button class="copy-button" onclick="copyCode(this)">Copy</button>
</div>
<p class="text-lg mb-8 max-w-3xl mx-auto opacity-90 leading-relaxed">
<strong>Proper Importing:</strong> To make use of this module, you'll need to either utilize the <code class="bg-gray-800 text-teal-400 px-1 rounded">.mjs</code> extension or incorporate <code class="bg-gray-800 text-teal-400 px-1 rounded">"type": "module"</code> in your <code class="bg-gray-800 text-teal-400 px-1 rounded">package.json</code> file. This ensures compatibility with ECMAScript modules.
</p>
</section>
<section id="usage" class="section-bg p-8 sm:p-10 mb-12">
<h2 class="text-3xl minecraft-font mb-8 text-center bg-clip-text text-transparent bg-gradient-to-r from-teal-400 to-blue-500">
Usage</h2>
<p class="text-lg mb-8 max-w-3xl mx-auto opacity-90 leading-relaxed">
First, import the library and create an instance with your API token:
</p>
<div class="code-block-wrapper">
<pre class="language-typescript"><code>import MyMCLib from "mymc-lib";
const MyMC = new MyMCLib("your-api-token");
</code></pre>
<button class="copy-button" onclick="copyCode(this)">Copy</button>
</div>
<p class="text-lg mb-8 max-w-3xl mx-auto opacity-90 leading-relaxed">
<strong>Example Usage:</strong> Retrieve information about your API key's expiration date.
</p>
<div class="code-block-wrapper">
<pre class="language-typescript"><code>import MyMCLib from "mymc-lib";
// Instantiate MyMCLib with your API token
const MyMC = new MyMCLib("your-api-token");
// Will print information about API key expiration date
let keyData = await MyMC.getTime();
console.log(keyData);
</code></pre>
<button class="copy-button" onclick="copyCode(this)">Copy</button>
</div>
<p class="text-lg mb-8 max-w-3xl mx-auto opacity-90 leading-relaxed">
<strong>Output:</strong>
</p>
<div class="code-block-wrapper">
<pre class="language-json"><code>{
success: true,
keyexpireString: 'Tue Apr 15 2025 06:14:59 GMT-0400 (Eastern Daylight Time)',
expireDate: '2025-04-15T10:14:59.000Z',
expireEpoch: 1744712099000
}</code></pre>
<button class="copy-button" onclick="copyCode(this)">Copy</button>
</div>
</section>
<section id="code-examples" class="section-bg p-8 sm:p-10 mb-12">
<h2 class="text-3xl minecraft-font mb-8 text-center bg-clip-text text-transparent bg-gradient-to-r from-teal-400 to-blue-500">
Code Examples</h2>
<div class="grid grid-cols-1 gap-6">
<!-- 1. Getting Server Time -->
<div id="getting-server-time" class="feature-card tilt-card">
<h3 class="text-xl minecraft-font mb-3 text-teal-400">Getting Server Time</h3>
<div class="code-block-wrapper">
<pre class="language-javascript"><code>const timeData = await MyMC.getTime();
console.log(timeData);</code></pre>
<button class="copy-button" onclick="copyCode(this)">Copy</button>
</div>
</div>
<!-- 2. Getting Server Statistics -->
<div id="getting-server-statistics" class="feature-card tilt-card">
<h3 class="text-xl minecraft-font mb-3 text-teal-400">Getting Server Statistics</h3>
<div class="code-block-wrapper">
<pre class="language-javascript"><code>const statsData = await MyMC.getStats();
console.log(statsData);</code></pre>
<button class="copy-button" onclick="copyCode(this)">Copy</button>
</div>
</div>
<!-- 3. Getting Server Logs -->
<div id="getting-server-logs" class="feature-card tilt-card">
<h3 class="text-xl minecraft-font mb-3 text-teal-400">Getting Server Logs</h3>
<div class="code-block-wrapper">
<pre class="language-javascript"><code>const logData = await MyMC.getLog();
console.log(logData);</code></pre>
<button class="copy-button" onclick="copyCode(this)">Copy</button>
</div>
</div>
<!-- 4. Starting the Minecraft Server -->
<div id="starting-the-minecraft-server" class="feature-card tilt-card">
<h3 class="text-xl minecraft-font mb-3 text-teal-400">Starting the Minecraft Server</h3>
<div class="code-block-wrapper">
<pre class="language-javascript"><code>const startResult = await MyMC.startServer();
console.log(startResult);</code></pre>
<button class="copy-button" onclick="copyCode(this)">Copy</button>
</div>
</div>
<!-- 5. Stopping the Minecraft Server -->
<div id="stopping-the-minecraft-server" class="feature-card tilt-card">
<h3 class="text-xl minecraft-font mb-3 text-teal-400">Stopping the Minecraft Server</h3>
<div class="code-block-wrapper">
<pre class="language-javascript"><code>const stopResult = await MyMC.stopServer();
console.log(stopResult);</code></pre>
<button class="copy-button" onclick="copyCode(this)">Copy</button>
</div>
</div>
<!-- 6. Restarting the Minecraft Server -->
<div id="restarting-the-minecraft-server" class="feature-card tilt-card">
<h3 class="text-xl minecraft-font mb-3 text-teal-400">Restarting the Minecraft Server</h3>
<div class="code-block-wrapper">
<pre class="language-javascript"><code>const restartResult = await MyMC.restartServer();
console.log(restartResult);</code></pre>
<button class="copy-button" onclick="copyCode(this)">Copy</button>
</div>
</div>
<!-- 7. Creating a Custom Link -->
<div id="creating-a-custom-link" class="feature-card tilt-card">
<h3 class="text-xl minecraft-font mb-3 text-teal-400">Creating a Custom Link</h3>
<div class="code-block-wrapper">
<pre class="language-javascript"><code>const customLinkResult = await MyMC.createMyLink();
console.log(customLinkResult);</code></pre>
<button class="copy-button" onclick="copyCode(this)">Copy</button>
</div>
</div>
<!-- 8. Deleting a Custom Link -->
<div id="deleting-a-custom-link" class="feature-card tilt-card">
<h3 class="text-xl minecraft-font mb-3 text-teal-400">Deleting a Custom Link</h3>
<div class="code-block-wrapper">
<pre class="language-javascript"><code>const deleteLinkResult = await MyMC.deleteMyLink();
console.log(deleteLinkResult);</code></pre>
<button class="copy-button" onclick="copyCode(this)">Copy</button>
</div>
</div>
<!-- 9. Creating an SFTP Link -->
<div id="creating-an-sftp-link" class="feature-card tilt-card">
<h3 class="text-xl minecraft-font mb-3 text-teal-400">Creating an SFTP Link</h3>
<div class="code-block-wrapper">
<pre class="language-javascript"><code>const sftpLinkResult = await MyMC.createLinkSFTP();
console.log(sftpLinkResult);</code></pre>
<button class="copy-button" onclick="copyCode(this)">Copy</button>
</div>
</div>
<!-- 10. Deleting an SFTP Link -->
<div id="deleting-an-sftp-link" class="feature-card tilt-card">
<h3 class="text-xl minecraft-font mb-3 text-teal-400">Deleting an SFTP Link</h3>
<div class="code-block-wrapper">
<pre class="language-javascript"><code>const deleteSftpLinkResult = await MyMC.deleteLinkSFTP();
console.log(deleteSftpLinkResult);</code></pre>
<button class="copy-button" onclick="copyCode(this)">Copy</button>
</div>
</div>
<!-- 11. Getting Connection Hash -->
<div id="getting-connection-hash" class="feature-card tilt-card">
<h3 class="text-xl minecraft-font mb-3 text-teal-400">Getting Connection Hash</h3>
<div class="code-block-wrapper">
<pre class="language-javascript"><code>const hashData = await MyMC.getConnectionHash();
console.log(hashData);</code></pre>
<button class="copy-button" onclick="copyCode(this)">Copy</button>
</div>
</div>
<!-- 12. Getting SFTP Connection Hash -->
<div id="getting-sftp-connection-hash" class="feature-card tilt-card">
<h3 class="text-xl minecraft-font mb-3 text-teal-400">Getting SFTP Connection Hash</h3>
<div class="code-block-wrapper">
<pre class="language-javascript"><code>const sftpHashData = await MyMC.getConnectionHashSFTP();
console.log(sftpHashData);</code></pre>
<button class="copy-button" onclick="copyCode(this)">Copy</button>
</div>
</div>
<!-- 13. Getting Online Players -->
<div id="getting-online-players" class="feature-card tilt-card">
<h3 class="text-xl minecraft-font mb-3 text-teal-400">Getting Online Players</h3>
<div class="code-block-wrapper">
<pre class="language-javascript"><code>const playersData = await MyMC.getOnlinePlayers();
console.log(playersData);</code></pre>
<button class="copy-button" onclick="copyCode(this)">Copy</button>
</div>
</div>
<!-- 14. Getting Server's Website URL -->
<div id="getting-servers-website-url" class="feature-card tilt-card">
<h3 class="text-xl minecraft-font mb-3 text-teal-400">Getting Server's Website URL</h3>
<div class="code-block-wrapper">
<pre class="language-javascript"><code>const websiteURL = await MyMC.getWebsiteURL();
console.log(websiteURL);</code></pre>
<button class="copy-button" onclick="copyCode(this)">Copy</button>
</div>
</div>
<!-- 15. Getting Server's Map URL -->
<div id="getting-servers-map-url" class="feature-card tilt-card">
<h3 class="text-xl minecraft-font mb-3 text-teal-400">Getting Server's Map URL</h3>
<div class="code-block-wrapper">
<pre class="language-javascript"><code>const mapURL = await MyMC.getMapURL();
console.log(mapURL);</code></pre>
<button class="copy-button" onclick="copyCode(this)">Copy</button>
</div>
</div>
<!-- 16. Banning a Player -->
<div id="banning-a-player" class="feature-card tilt-card">
<h3 class="text-xl minecraft-font mb-3 text-teal-400">Banning a Player</h3>
<div class="code-block-wrapper">
<pre class="language-javascript"><code>const banResult = await MyMC.postBan("username");
console.log(banResult);</code></pre>
<button class="copy-button" onclick="copyCode(this)">Copy</button>
</div>
</div>
<!-- 17. Unbanning a Player -->
<div id="unbanning-a-player" class="feature-card tilt-card">
<h3 class="text-xl minecraft-font mb-3 text-teal-400">Unbanning a Player</h3>
<div class="code-block-wrapper">
<pre class="language-javascript"><code>const unbanResult = await MyMC.postUnban("username");
console.log(unbanResult);</code></pre>
<button class="copy-button" onclick="copyCode(this)">Copy</button>
</div>
</div>
<!-- 18. Sending a Message to All Players -->
<div id="sending-a-message-to-all-players" class="feature-card tilt-card">
<h3 class="text-xl minecraft-font mb-3 text-teal-400">Sending a Message to All Players</h3>
<div class="code-block-wrapper">
<pre class="language-javascript"><code>const sayResult = await MyMC.postSay("Hello, everyone!");
console.log(sayResult);</code></pre>
<button class="copy-button" onclick="copyCode(this)">Copy</button>
</div>
</div>
<!-- 19. Sending a Private Message to a Player -->
<div id="sending-a-private-message-to-a-player" class="feature-card tilt-card">
<h3 class="text-xl minecraft-font mb-3 text-teal-400">Sending a Private Message to a Player</h3>
<div class="code-block-wrapper">
<pre class="language-javascript"><code>const tellResult = await MyMC.postTell("username", "Hey, how are you?");
console.log(tellResult);</code></pre>
<button class="copy-button" onclick="copyCode(this)">Copy</button>
</div>
</div>
<!-- 20. Executing a Command in Server Console -->
<div id="executing-a-command-in-server-console" class="feature-card tilt-card">
<h3 class="text-xl minecraft-font mb-3 text-teal-400">Executing a Command in Server Console</h3>
<div class="code-block-wrapper">
<pre class="language-javascript"><code>const consoleResult = await MyMC.postConsole("say Hello, world!");
console.log(consoleResult);</code></pre>
<button class="copy-button" onclick="copyCode(this)">Copy</button>
</div>
</div>
<!-- 21. Giving an Item to a Player -->
<div id="giving-an-item-to-a-player" class="feature-card tilt-card">
<h3 class="text-xl minecraft-font mb-3 text-teal-400">Giving an Item to a Player</h3>
<div class="code-block-wrapper">
<pre class="language-javascript"><code>const giveResult = await MyMC.postGive("username", "item", 1);
console.log(giveResult);</code></pre>
<button class="copy-button" onclick="copyCode(this)">Copy</button>
</div>
</div>
<!-- 22. Installing a Mod by ID -->
<div id="installing-a-mod-by-id" class="feature-card tilt-card">
<h3 class="text-xl minecraft-font mb-3 text-teal-400">Installing a Mod by ID</h3>
<div class="code-block-wrapper">
<pre class="language-javascript"><code>const modID = "exampleMod123";
const installResult = await MyMC.installMod(modID);
console.log(installResult);</code></pre>
<button class="copy-button" onclick="copyCode(this)">Copy</button>
</div>
</div>
<!-- 23. Uninstalling a Mod by ID -->
<div id="uninstalling-a-mod-by-id" class="feature-card tilt-card">
<h3 class="text-xl minecraft-font mb-3 text-teal-400">Uninstalling a Mod by ID</h3>
<div class="code-block-wrapper">
<pre class="language-javascript"><code>const modID = "exampleMod123";
const uninstallResult = await MyMC.uninstallMod(modID);
console.log(uninstallResult);</code></pre>
<button class="copy-button" onclick="copyCode(this)">Copy</button>
</div>
</div>
<!-- 24. Retrieving a List of Installed Mods -->
<div id="retrieving-a-list-of-installed-mods" class="feature-card tilt-card">
<h3 class="text-xl minecraft-font mb-3 text-teal-400">Retrieving a List of Installed Mods</h3>
<div class="code-block-wrapper">
<pre class="language-javascript"><code>const installedMods = await MyMC.getInstalledMods();
console.log(installedMods);</code></pre>
<button class="copy-button" onclick="copyCode(this)">Copy</button>
</div>
</div>
</div>
</section>
<section id="api-reference" class="section-bg p-8 sm:p-10 mb-12">
<h2 class="text-3xl minecraft-font mb-8 text-center bg-clip-text text-transparent bg-gradient-to-r from-teal-400 to-blue-500">
API Reference</h2>
<h3 class="text-2xl minecraft-font mb-4 text-teal-400">MyMCLib Class</h3>
<h4 class="text-xl mb-3 text-teal-400">Constructor</h4>
<div class="code-block-wrapper">
<pre class="language-typescript"><code>constructor(token: string)</code></pre>
<button class="copy-button" onclick="copyCode(this)">Copy</button>
</div>
<p class="text-sm opacity-90 leading-relaxed mb-4">Creates an instance of the <code class="bg-gray-800 text-teal-400 px-1 rounded">MyMCLib</code> class with the provided API token.</p>
<h4 class="text-xl mb-3 text-teal-400">Methods</h4>
<ul class="text-sm opacity-90 leading-relaxed mb-4 list-disc list-inside">
<li><code class="bg-gray-800 text-teal-400 px-1 rounded">getTime(): Promise<any></code> - Retrieves the current server time.</li>
<li><code class="bg-gray-800 text-teal-400 px-1 rounded">getStats(): Promise<any></code> - Retrieves server statistics.</li>
<li><code class="bg-gray-800 text-teal-400 px-1 rounded">getLog(): Promise<any></code> - Retrieves server logs.</li>
<li><code class="bg-gray-800 text-teal-400 px-1 rounded">startServer(): Promise<any></code> - Starts the Minecraft server.</li>
<li><code class="bg-gray-800 text-teal-400 px-1 rounded">stopServer(): Promise<any></code> - Stops the Minecraft server.</li>
<li><code class="bg-gray-800 text-teal-400 px-1 rounded">restartServer(): Promise<any></code> - Restarts the Minecraft server.</li>
<li><code class="bg-gray-800 text-teal-400 px-1 rounded">createMyLink(): Promise<any></code> - Creates a custom link.</li>
<li><code class="bg-gray-800 text-teal-400 px-1 rounded">deleteMyLink(): Promise<any></code> - Deletes a custom link.</li>
<li><code class="bg-gray-800 text-teal-400 px-1 rounded">createLinkSFTP(): Promise<any></code> - Creates an SFTP link.</li>
<li><code class="bg-gray-800 text-teal-400 px-1 rounded">deleteLinkSFTP(): Promise<any></code> - Deletes an SFTP link.</li>
<li><code class="bg-gray-800 text-teal-400 px-1 rounded">getConnectionHash(): Promise<any></code> - Retrieves a connection hash.</li>
<li><code class="bg-gray-800 text-teal-400 px-1 rounded">getConnectionHashSFTP(): Promise<any></code> - Retrieves an SFTP connection hash.</li>
<li><code class="bg-gray-800 text-teal-400 px-1 rounded">getOnlinePlayers(): Promise<any></code> - Retrieves a list of online players.</li>
<li><code class="bg-gray-800 text-teal-400 px-1 rounded">getWebsiteURL(): Promise<any></code> - Retrieves the server's website URL.</li>
<li><code class="bg-gray-800 text-teal-400 px-1 rounded">getMapURL(): Promise<any></code> - Retrieves the server's map URL.</li>
<li><code class="bg-gray-800 text-teal-400 px-1 rounded">postBan(username: string): Promise<any></code> - Bans a player by username.</li>
<li><code class="bg-gray-800 text-teal-400 px-1 rounded">postUnban(username: string): Promise<any></code> - Unbans a player by username.</li>
<li><code class="bg-gray-800 text-teal-400 px-1 rounded">postSay(message: string): Promise<any></code> - Sends a message to all players.</li>
<li><code class="bg-gray-800 text-teal-400 px-1 rounded">postTell(username: string, message: string): Promise<any></code> - Sends a private message to a player.</li>
<li><code class="bg-gray-800 text-teal-400 px-1 rounded">postConsole(command: string): Promise<any></code> - Executes a command in the server console.</li>
<li><code class="bg-gray-800 text-teal-400 px-1 rounded">postGive(username: string, item: string, amount: number): Promise<any></code> - Gives an item to a player.</li>
<li><code class="bg-gray-800 text-teal-400 px-1 rounded">installMod(modID: string): Promise<any></code> - Installs a mod by ID.</li>
<li><code class="bg-gray-800 text-teal-400 px-1 rounded">uninstallMod(modID: string): Promise<any></code> - Uninstalls a mod by ID.</li>
<li><code class="bg-gray-800 text-teal-400 px-1 rounded">getInstalledMods(): Promise<any></code> - Retrieves a list of installed mods.</li>
</ul>
<h3 class="text-2xl minecraft-font mb-4 text-teal-400">ApiUtils Class</h3>
<h4 class="text-xl mb-3 text-teal-400">Methods</h4>
<ul class="text-sm opacity-90 leading-relaxed mb-4 list-disc list-inside">
<li><code class="bg-gray-800 text-teal-400 px-1 rounded">getRequest(endpoint: ApiEndpoint, token: string): Promise<any></code> - Makes a GET request to the specified API endpoint.</li>
<li><code class="bg-gray-800 text-teal-400 px-1 rounded">deleteRequest(endpoint: ApiEndpoint, token: string): Promise<any></code> - Makes a DELETE request to the specified API endpoint.</li>
<li><code class="bg-gray-800 text-teal-400 px-1 rounded">postRequest(endpoint: ApiEndpoint, token: string, data: {}): Promise<any></code> - Makes a POST request to the specified API endpoint with the provided data.</li>
</ul>
</section>
<section id="java-client" class="section-bg p-8 sm:p-10 mb-12">
<h2 class="text-3xl minecraft-font mb-8 text-center bg-clip-text text-transparent bg-gradient-to-r from-teal-400 to-blue-500">
Java Client</h2>
<p class="text-lg mb-8 max-w-3xl mx-auto opacity-90 leading-relaxed">
We also have a Java client that provides the same functionality. View the documentation at:
</p>
<p class="text-lg mb-8 max-w-3xl mx-auto opacity-90 leading-relaxed">
<a href="https://info.my-mc.link/mymc-java/" class="underline text-teal-400 hover:text-blue-400" target="_blank">Java Client Documentation</a>
</p>
</section>
<section id="explore-more" class="section-bg p-8 sm:p-10 text-center mb-12">
<h2 class="text-3xl minecraft-font mb-6 bg-clip-text text-transparent bg-gradient-to-r from-teal-400 to-blue-500">
Explore More</h2>
<p class="text-lg mb-8 max-w-2xl mx-auto opacity-90 leading-relaxed">
Ready to automate your server with <code class="bg-gray-800 text-teal-400 px-1 rounded">MyMCLib</code><BR>Join our community, dive into our resources, and start building with the My-MC.Link API.
</p>
<div class="flex justify-center gap-4 flex-wrap">
<a href="https://join.my-mc.link" class="btn-minecraft text-base" target="_blank">Join Our Discord</a>
<a href="https://info.my-mc.link" class="btn-minecraft text-base" target="_blank">Explore the Wiki</a>
</div>
</section>
</main>
<footer class="bg-gray-900/20 backdrop-filter backdrop-blur-xl py-8 text-center relative z-10">
<p class="text-sm opacity-90">© 2025 My-MC.Link. All rights reserved.</p>
<p class="text-sm opacity-90 mt-3">
Powered by <a href="https://holesail.io" class="underline" target="_blank">Holesail</a> with services
donated by <a href="https://raven-scott.fyi" class="underline">SNXRaven</a>
</p>
</footer>
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/prism.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/components/prism-javascript.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/components/prism-typescript.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/components/prism-json.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/components/prism-bash.min.js"></script>
<script>
function copyCode(button) {
const codeBlock = button.previousElementSibling.querySelector('code');
const text = codeBlock.textContent;
navigator.clipboard.writeText(text).then(() => {
button.textContent = 'Copied!';
button.classList.add('copied');
setTimeout(() => {
button.textContent = 'Copy';
button.classList.remove('copied');
}, 2000);
}).catch(err => {
console.error('Failed to copy: ', err);
});
}
</script>
<script src="../../mc/js/main.js"></script>
</body>
</html>