-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocs.html
More file actions
213 lines (191 loc) · 13.1 KB
/
Copy pathdocs.html
File metadata and controls
213 lines (191 loc) · 13.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>TempFly — Documentation</title>
<meta name="description" content="TempFly documentation: install, how flight drains, Fly Vouchers, persistence, fall grace, WorldGuard, commands, permissions, and config.">
<link rel="icon" href="logo.svg">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@500&display=swap" rel="stylesheet">
<link rel="stylesheet" href="css/style.css">
<link rel="stylesheet" href="css/tempfly.css">
</head>
<body>
<nav class="nav">
<div class="nav-inner">
<div class="nav-logo"><a href="index.html" style="color:inherit;">Temp<span>Fly</span></a></div>
<ul class="nav-links" id="nav-links">
<li><a href="index.html">Home</a></li>
<li><a href="docs.html" class="active">Docs</a></li>
</ul>
<button class="nav-burger" onclick="toggleMenu()" aria-label="Menu"><span></span><span></span><span></span></button>
</div>
</nav>
<div style="height: 4rem;"></div>
<div class="docs-layout">
<aside class="docs-sidebar">
<div class="docs-sidebar-header">TempFly Docs</div>
<nav class="docs-toc">
<a href="#overview" class="active">Overview</a>
<a href="#install">Install</a>
<a href="#drain">How flight drains</a>
<a href="#vouchers">Fly Vouchers</a>
<a href="#features">Persistence & safety</a>
<a href="#commands">Commands</a>
<a href="#durations">Duration format</a>
<a href="#permissions">Permissions</a>
<a href="#config">Config</a>
<a href="#worldguard">WorldGuard</a>
<a href="#faq">FAQ</a>
</nav>
</aside>
<main class="docs-content">
<h1 class="docs-title">Documentation</h1>
<p class="docs-subtitle">Everything TempFly does, in plain English. Built for Paper / Minecraft 26.x, Java 21+.</p>
<section class="docs-section" id="overview">
<h2>Overview</h2>
<p>TempFly gives players temporary flight that drains <strong>only while they're airborne</strong> — standing on the ground pauses the timer. Time is granted through <strong>Fly Vouchers</strong>: signed feather items players right-click to top up their balance. Balances live in SQLite and survive restarts, and a fall-grace window keeps players safe when their time runs out.</p>
<div class="docs-callout">Because the timer only ticks in the air, players never "waste" flight time sorting chests or building on the ground. They pay for the part they actually use.</div>
</section>
<section class="docs-section" id="install">
<h2>Install</h2>
<ol class="docs-list">
<li>Download <span class="mono">TempFly-x.y.z.jar</span>.</li>
<li>Drop it in your server's <span class="mono">plugins/</span> folder (remove any older TempFly jar).</li>
<li>Restart the server.</li>
<li>Adjust <span class="mono">plugins/TempFly/config.yml</span> and run <span class="mono">/tempfly reload</span>. That's it.</li>
</ol>
<p>Optional soft-depend (auto-detected): WorldGuard, for the <span class="mono">temp-fly</span> region flag. SQLite storage is built in — no database server needed.</p>
</section>
<section class="docs-section" id="drain">
<h2>How flight drains</h2>
<p>Toggle flight with <span class="mono">/tempfly</span>. While you're in the air, your banked time counts down; the moment you land or stand still, the timer pauses. A live <strong>action-bar countdown</strong> shows the remaining time and shifts colour as it runs low:</p>
<ul class="docs-list">
<li><strong>Green</strong> — plenty of time left.</li>
<li><strong>Yellow</strong> — running low; think about landing.</li>
<li><strong>Red</strong> — almost out; flight is about to end.</li>
</ul>
<p>When the balance hits zero, flight switches off and the <a href="#features">fall-grace</a> window kicks in so you can glide down safely.</p>
</section>
<section class="docs-section" id="vouchers">
<h2>Fly Vouchers</h2>
<p>Fly Vouchers are the way time enters the economy. A voucher is a feather item (the material and name/lore are configurable) that grants a set amount of flight time when right-clicked.</p>
<div class="docs-grid">
<div class="docs-grid-item"><h4>Right-click to redeem</h4><p>The player right-clicks the voucher; the time is added to their balance and the item is consumed.</p></div>
<div class="docs-grid-item"><h4>HMAC-signed</h4><p>Every voucher carries an HMAC signature, so vouchers can't be forged, hand-crafted, or duplicated to mint free flight time.</p></div>
<div class="docs-grid-item"><h4>Give from console</h4><p>Use <span class="mono">/tempfly give <player> <duration> [count]</span> — wire it into crates, shops, or rewards.</p></div>
<div class="docs-grid-item"><h4>Stack & trade</h4><p>Vouchers are normal items players can carry, store, and trade until they redeem them.</p></div>
</div>
</section>
<section class="docs-section" id="features">
<h2>Persistence & safety</h2>
<div class="docs-grid">
<div class="docs-grid-item"><h4>SQLite storage</h4><p>Flight balances are stored in a built-in SQLite database and survive restarts and crashes.</p></div>
<div class="docs-grid-item"><h4>Mid-air restore</h4><p>Log off while flying and your flight is restored when you log back in, so a disconnect never strands you.</p></div>
<div class="docs-grid-item"><h4>Fall grace</h4><p>When flight ends, a few seconds of fall-damage immunity let you descend safely instead of taking the full drop.</p></div>
</div>
</section>
<section class="docs-section" id="commands">
<h2>Commands</h2>
<p>Base command <span class="mono">/tempfly</span> — alias <span class="mono">/tfly</span>. Admin subcommands require <span class="mono">tempfly.admin</span>.</p>
<div class="docs-table-wrap">
<table class="docs-table">
<thead><tr><th>Command</th><th>What it does</th></tr></thead>
<tbody>
<tr><td><span class="mono">/tempfly</span></td><td>Toggle your own temporary flight on or off.</td></tr>
<tr><td><span class="mono">/tempfly time</span></td><td>Check your remaining flight balance.</td></tr>
<tr><td><span class="mono">/tempfly give <player> <duration> [count]</span></td><td>Give a player <span class="mono">[count]</span> Fly Vouchers worth <span class="mono"><duration></span> each. <span class="docs-tag docs-tag-op">admin</span></td></tr>
<tr><td><span class="mono">/tempfly add <player> <duration></span></td><td>Add flight time directly to a player's balance. <span class="docs-tag docs-tag-op">admin</span></td></tr>
<tr><td><span class="mono">/tempfly set <player> <duration></span></td><td>Set a player's balance to an exact amount. <span class="docs-tag docs-tag-op">admin</span></td></tr>
<tr><td><span class="mono">/tempfly check <player></span></td><td>Check another player's balance. <span class="docs-tag docs-tag-op">admin</span></td></tr>
<tr><td><span class="mono">/tempfly reload</span></td><td>Reload the config. <span class="docs-tag docs-tag-op">admin</span></td></tr>
</tbody>
</table>
</div>
</section>
<section class="docs-section" id="durations">
<h2>Duration format</h2>
<p>Durations are written as compact time strings — combine units freely:</p>
<div class="docs-table-wrap">
<table class="docs-table">
<thead><tr><th>Example</th><th>Means</th></tr></thead>
<tbody>
<tr><td><span class="mono">90s</span></td><td>90 seconds</td></tr>
<tr><td><span class="mono">5m</span></td><td>5 minutes</td></tr>
<tr><td><span class="mono">1h30m</span></td><td>1 hour 30 minutes</td></tr>
</tbody>
</table>
</div>
</section>
<section class="docs-section" id="permissions">
<h2>Permissions</h2>
<div class="docs-table-wrap">
<table class="docs-table">
<thead><tr><th>Node</th><th>Default</th><th>Grants</th></tr></thead>
<tbody>
<tr><td><span class="mono">tempfly.use</span></td><td>everyone</td><td><span class="mono">/tempfly</span>, <span class="mono">/tempfly time</span>, and redeeming Fly Vouchers.</td></tr>
<tr><td><span class="mono">tempfly.admin</span></td><td>op</td><td><span class="mono">give</span>, <span class="mono">add</span>, <span class="mono">set</span>, <span class="mono">check</span>, and <span class="mono">reload</span>.</td></tr>
</tbody>
</table>
</div>
</section>
<section class="docs-section" id="config">
<h2>Config</h2>
<p>The whole <span class="mono">config.yml</span> is commented in plain language. The key knobs:</p>
<pre class="docs-code">voucher:
material: FEATHER # the item used for Fly Vouchers
name: "&b&lFly Voucher"
lore:
- "&7Right-click to bank flight time."
drain:
airborne-only: true # time only counts down while flying
actionbar: true # show the live green->yellow->red countdown
fall-grace:
enabled: true
seconds: 4 # fall-damage immunity when flight ends
storage:
type: sqlite # built-in, file-based; survives restarts
worldguard:
enabled: true # register the temp-fly region flag</pre>
</section>
<section class="docs-section" id="worldguard">
<h2>WorldGuard</h2>
<p>If WorldGuard is installed, TempFly registers a <span class="mono">temp-fly</span> region flag. Set it to <span class="mono">deny</span> on a region to forbid temporary flight there:</p>
<pre class="docs-code">/rg flag spawn temp-fly deny</pre>
<p>Players keep their banked time — they simply can't activate temp flight inside that region. Anywhere the flag isn't denied, flight works as normal.</p>
<div class="docs-callout">Use this to keep arenas, spawn, and event areas grounded without touching anyone's balance.</div>
</section>
<section class="docs-section" id="faq">
<h2>FAQ</h2>
<div class="docs-grid">
<div class="docs-grid-item"><h4>Does time drain while I'm standing still?</h4><p>No. With <span class="mono">airborne-only</span> on (the default), the timer only ticks while you're actually in the air.</p></div>
<div class="docs-grid-item"><h4>Can players dupe vouchers?</h4><p>No. Vouchers are HMAC-signed, so forged or hand-crafted copies are rejected.</p></div>
<div class="docs-grid-item"><h4>What happens if I log off mid-flight?</h4><p>Your balance is saved and your flight is restored when you log back in.</p></div>
<div class="docs-grid-item"><h4>Do I need a database server?</h4><p>No. Storage is built-in SQLite — a single file, no setup.</p></div>
<div class="docs-grid-item"><h4>Will I take fall damage when time runs out?</h4><p>No. A short fall-grace window lets you land safely.</p></div>
<div class="docs-grid-item"><h4>Do I need WorldGuard?</h4><p>No — it's an optional hook. Without it, flight simply works everywhere.</p></div>
</div>
</section>
<a href="index.html" class="docs-back">← Back to home</a>
</main>
</div>
<footer class="footer">
<div class="footer-inner">
<p>© ThConMan · Premium plugin · Closed source.</p>
</div>
</footer>
<script>
function toggleMenu() { document.getElementById('nav-links').classList.toggle('open'); }
// Highlight the current section in the sidebar.
const links = [...document.querySelectorAll('.docs-toc a')];
const sections = links.map(a => document.querySelector(a.getAttribute('href')));
window.addEventListener('scroll', () => {
let i = sections.findIndex((s, n) => s && s.getBoundingClientRect().top > 90 && (n === 0 || sections[n-1].getBoundingClientRect().top <= 90));
const active = i === -1 ? links.length - 1 : Math.max(0, i - 1);
links.forEach((a, n) => a.classList.toggle('active', n === active));
});
</script>
<script src="js/motion.js" defer></script>
</body>
</html>