Skip to content

Commit 36fb7cb

Browse files
committed
Update docs, Update README.md
1 parent b0e4902 commit 36fb7cb

File tree

121 files changed

+12254
-33
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

121 files changed

+12254
-33
lines changed

README.md

Lines changed: 16 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -183,32 +183,28 @@ import cz.foresttech.forestredis.shared.IForestRedisPlugin;
183183
import cz.foresttech.forestredis.shared.RedisManager;
184184
import org.bukkit.plugin.java.JavaPlugin;
185185

186-
/**
187-
* Use this ONLY if ForestRedisAPI plugin is not present and
188-
* for some reason you don't want to install it.
189-
*/
190-
public class MyExamplePlugin extends JavaPlugin implements IForestRedisPlugin {
186+
public class MyExamplePlugin extends JavaPlugin {
191187

188+
private RedisManager redisManager;
189+
192190
@Override
193191
public void onEnable() {
194192
// ...
195-
load();
193+
loadRedis();
196194
// ...
197195
}
198196

199197
@Override
200198
public void onDisable() {
201199
//...
202-
if (RedisManager.getAPI() == null) {
203-
return;
204-
}
205200
// Close the RedisManager
206-
RedisManager.getAPI().close();
201+
if (redisManager != null) {
202+
redisManager.close();
203+
}
207204
//...
208205
}
209206

210-
@Override
211-
public void load() {
207+
public void loadRedis() {
212208
// Construct RedisConfiguration object
213209
RedisConfiguration redisConfiguration = new RedisConfiguration(
214210
"localhost", //hostname
@@ -220,33 +216,20 @@ public class MyExamplePlugin extends JavaPlugin implements IForestRedisPlugin {
220216

221217
// Initialize RedisManager instance (singleton)
222218
// Since init, use RedisManager#getAPI() to obtain the instance
223-
RedisManager.init(this, serverIdentifier, redisConfiguration);
219+
redisManager = new RedisManager(this, "MyServer", redisConfiguration);
224220

225221
// Now setup the connection
226-
RedisManager.getAPI().setup(/*channels*/);
222+
redisManager.setup(/*channels*/);
227223

228224
// Now you can use #getAPI() call to get singleton instance
229-
RedisManager.getAPI().subscribe("MyChannel1");
230-
}
231-
232-
@Override
233-
public void runAsync(Runnable task) {
234-
// Required so RedisManager can run tasks async
235-
Bukkit.getScheduler().runTaskAsynchronously(instance, task);
225+
redisManager.subscribe("MyChannel1");
236226
}
237227

238-
@Override
239-
@SuppressWarnings("Called asynchronously!")
240-
public void onMessageReceived(String channel, MessageTransferObject messageTransferObject) {
241-
// Async call - what shall be done when the message arrives
242-
// You can completely remove lines below, but then built-in events won't work
243-
Bukkit.getPluginManager().callEvent(new AsyncRedisMessageReceivedEvent(channel, messageTransferObject));
244-
Bukkit.getScheduler().runTask(this, () -> Bukkit.getPluginManager().callEvent(new RedisMessageReceivedEvent(channel, messageTransferObject)));
245-
}
246-
247-
@Override
248-
public Logger logger() {
249-
return this.getLogger();
228+
public void reloadRedis() {
229+
// Just call reload function on the RedisManager object.
230+
// If you set something to "null", the already existing values are used.
231+
// In this case, the redis configuration is kept.
232+
redisManager.reload("MyNewServerName", null, true);
250233
}
251234
}
252235
```

docs/1.0.7/allclasses-index.html

Lines changed: 131 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,131 @@
1+
<!DOCTYPE HTML>
2+
<html lang="cs">
3+
<head>
4+
<!-- Generated by javadoc (17) on Mon Aug 22 11:47:51 CEST 2022 -->
5+
<title>All Classes and Interfaces</title>
6+
<meta name="viewport" content="width=device-width, initial-scale=1">
7+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
8+
<meta name="dc.created" content="2022-08-22">
9+
<meta name="description" content="class index">
10+
<meta name="generator" content="javadoc/AllClassesIndexWriter">
11+
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
12+
<link rel="stylesheet" type="text/css" href="script-dir/jquery-ui.min.css" title="Style">
13+
<link rel="stylesheet" type="text/css" href="jquery-ui.overrides.css" title="Style">
14+
<script type="text/javascript" src="script.js"></script>
15+
<script type="text/javascript" src="script-dir/jquery-3.5.1.min.js"></script>
16+
<script type="text/javascript" src="script-dir/jquery-ui.min.js"></script>
17+
</head>
18+
<body class="all-classes-index-page">
19+
<script type="text/javascript">var evenRowColor = "even-row-color";
20+
var oddRowColor = "odd-row-color";
21+
var tableTab = "table-tab";
22+
var activeTableTab = "active-table-tab";
23+
var pathtoroot = "./";
24+
loadScripts(document, 'script');</script>
25+
<noscript>
26+
<div>JavaScript is disabled on your browser.</div>
27+
</noscript>
28+
<div class="flex-box">
29+
<header role="banner" class="flex-header">
30+
<nav role="navigation">
31+
<!-- ========= START OF TOP NAVBAR ======= -->
32+
<div class="top-nav" id="navbar-top">
33+
<div class="skip-nav"><a href="#skip-navbar-top" title="Skip navigation links">Skip navigation links</a></div>
34+
<ul id="navbar-top-firstrow" class="nav-list" title="Navigation">
35+
<li><a href="index.html">Overview</a></li>
36+
<li>Package</li>
37+
<li>Class</li>
38+
<li>Use</li>
39+
<li><a href="overview-tree.html">Tree</a></li>
40+
<li><a href="index-files/index-1.html">Index</a></li>
41+
<li><a href="help-doc.html#all-classes">Help</a></li>
42+
</ul>
43+
</div>
44+
<div class="sub-nav">
45+
<div class="nav-list-search"><label for="search-input">SEARCH:</label>
46+
<input type="text" id="search-input" value="search" disabled="disabled">
47+
<input type="reset" id="reset-button" value="reset" disabled="disabled">
48+
</div>
49+
</div>
50+
<!-- ========= END OF TOP NAVBAR ========= -->
51+
<span class="skip-nav" id="skip-navbar-top"></span></nav>
52+
</header>
53+
<div class="flex-content">
54+
<main role="main">
55+
<div class="header">
56+
<h1 title="All Classes and Interfaces" class="title">All Classes and Interfaces</h1>
57+
</div>
58+
<div id="all-classes-table">
59+
<div class="table-tabs" role="tablist" aria-orientation="horizontal"><button id="all-classes-table-tab0" role="tab" aria-selected="true" aria-controls="all-classes-table.tabpanel" tabindex="0" onkeydown="switchTab(event)" onclick="show('all-classes-table', 'all-classes-table', 2)" class="active-table-tab">All Classes and Interfaces</button><button id="all-classes-table-tab1" role="tab" aria-selected="false" aria-controls="all-classes-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('all-classes-table', 'all-classes-table-tab1', 2)" class="table-tab">Interfaces</button><button id="all-classes-table-tab2" role="tab" aria-selected="false" aria-controls="all-classes-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('all-classes-table', 'all-classes-table-tab2', 2)" class="table-tab">Classes</button></div>
60+
<div id="all-classes-table.tabpanel" role="tabpanel">
61+
<div class="summary-table two-column-summary" aria-labelledby="all-classes-table-tab0">
62+
<div class="table-header col-first">Class</div>
63+
<div class="table-header col-last">Description</div>
64+
<div class="col-first even-row-color all-classes-table all-classes-table-tab2"><a href="cz/foresttech/forestredis/spigot/events/AsyncRedisMessageReceivedEvent.html" title="class in cz.foresttech.forestredis.spigot.events">AsyncRedisMessageReceivedEvent</a></div>
65+
<div class="col-last even-row-color all-classes-table all-classes-table-tab2">
66+
<div class="block">Asynchronous Spigot Event class used when message was received from subscribed channel.</div>
67+
</div>
68+
<div class="col-first odd-row-color all-classes-table all-classes-table-tab2"><a href="cz/foresttech/forestredis/bungee/adapter/BungeeConfigAdapter.html" title="class in cz.foresttech.forestredis.bungee.adapter">BungeeConfigAdapter</a></div>
69+
<div class="col-last odd-row-color all-classes-table all-classes-table-tab2">
70+
<div class="block">Implementation of <a href="cz/foresttech/forestredis/shared/adapter/IConfigurationAdapter.html" title="interface in cz.foresttech.forestredis.shared.adapter"><code>IConfigurationAdapter</code></a> for Bungee version</div>
71+
</div>
72+
<div class="col-first even-row-color all-classes-table all-classes-table-tab2"><a href="cz/foresttech/forestredis/bungee/commands/BungeeForestRedisCommand.html" title="class in cz.foresttech.forestredis.bungee.commands">BungeeForestRedisCommand</a></div>
73+
<div class="col-last even-row-color all-classes-table all-classes-table-tab2">
74+
<div class="block">BungeeCord Command Class for handling ForestRedisAPI commands</div>
75+
</div>
76+
<div class="col-first odd-row-color all-classes-table all-classes-table-tab2"><a href="cz/foresttech/forestredis/bungee/ForestRedisBungee.html" title="class in cz.foresttech.forestredis.bungee">ForestRedisBungee</a></div>
77+
<div class="col-last odd-row-color all-classes-table all-classes-table-tab2">
78+
<div class="block">Bootstrap BungeeCord plugin to setup the <a href="cz/foresttech/forestredis/shared/RedisManager.html" title="class in cz.foresttech.forestredis.shared"><code>RedisManager</code></a> using configuration file.</div>
79+
</div>
80+
<div class="col-first even-row-color all-classes-table all-classes-table-tab2"><a href="cz/foresttech/forestredis/spigot/ForestRedisSpigot.html" title="class in cz.foresttech.forestredis.spigot">ForestRedisSpigot</a></div>
81+
<div class="col-last even-row-color all-classes-table all-classes-table-tab2">
82+
<div class="block">Bootstrap Spigot plugin to setup the <a href="cz/foresttech/forestredis/shared/RedisManager.html" title="class in cz.foresttech.forestredis.shared"><code>RedisManager</code></a> using configuration file.</div>
83+
</div>
84+
<div class="col-first odd-row-color all-classes-table all-classes-table-tab1"><a href="cz/foresttech/forestredis/shared/adapter/IConfigurationAdapter.html" title="interface in cz.foresttech.forestredis.shared.adapter">IConfigurationAdapter</a></div>
85+
<div class="col-last odd-row-color all-classes-table all-classes-table-tab1">
86+
<div class="block">ConfigurationAdapter interface which handles differences between BungeeCord and Spigot in configuration structure.</div>
87+
</div>
88+
<div class="col-first even-row-color all-classes-table all-classes-table-tab1"><a href="cz/foresttech/forestredis/shared/IForestRedisPlugin.html" title="interface in cz.foresttech.forestredis.shared">IForestRedisPlugin</a></div>
89+
<div class="col-last even-row-color all-classes-table all-classes-table-tab1">
90+
<div class="block">Generic plugin interface.</div>
91+
</div>
92+
<div class="col-first odd-row-color all-classes-table all-classes-table-tab1"><a href="cz/foresttech/forestredis/shared/events/IRedisMessageReceivedEvent.html" title="interface in cz.foresttech.forestredis.shared.events">IRedisMessageReceivedEvent</a></div>
93+
<div class="col-last odd-row-color all-classes-table all-classes-table-tab1">
94+
<div class="block">Redis incoming message Event interface.</div>
95+
</div>
96+
<div class="col-first even-row-color all-classes-table all-classes-table-tab2"><a href="cz/foresttech/forestredis/shared/models/MessageTransferObject.html" title="class in cz.foresttech.forestredis.shared.models">MessageTransferObject</a></div>
97+
<div class="col-last even-row-color all-classes-table all-classes-table-tab2">
98+
<div class="block">DTO object used for sending data across network.</div>
99+
</div>
100+
<div class="col-first odd-row-color all-classes-table all-classes-table-tab2"><a href="cz/foresttech/forestredis/shared/models/RedisConfiguration.html" title="class in cz.foresttech.forestredis.shared.models">RedisConfiguration</a></div>
101+
<div class="col-last odd-row-color all-classes-table all-classes-table-tab2">
102+
<div class="block">RedisConfiguration object stores Redis server's credentials.</div>
103+
</div>
104+
<div class="col-first even-row-color all-classes-table all-classes-table-tab2"><a href="cz/foresttech/forestredis/shared/RedisManager.html" title="class in cz.foresttech.forestredis.shared">RedisManager</a></div>
105+
<div class="col-last even-row-color all-classes-table all-classes-table-tab2">
106+
<div class="block">Class for maintaining and handling connection to Redis server.</div>
107+
</div>
108+
<div class="col-first odd-row-color all-classes-table all-classes-table-tab2"><a href="cz/foresttech/forestredis/bungee/events/RedisMessageReceivedEvent.html" title="class in cz.foresttech.forestredis.bungee.events">RedisMessageReceivedEvent</a></div>
109+
<div class="col-last odd-row-color all-classes-table all-classes-table-tab2">
110+
<div class="block">BungeeCord Event class used when message was received from subscribed channel.</div>
111+
</div>
112+
<div class="col-first even-row-color all-classes-table all-classes-table-tab2"><a href="cz/foresttech/forestredis/spigot/events/RedisMessageReceivedEvent.html" title="class in cz.foresttech.forestredis.spigot.events">RedisMessageReceivedEvent</a></div>
113+
<div class="col-last even-row-color all-classes-table all-classes-table-tab2">
114+
<div class="block">Spigot Event class used when message was received from subscribed channel.</div>
115+
</div>
116+
<div class="col-first odd-row-color all-classes-table all-classes-table-tab2"><a href="cz/foresttech/forestredis/spigot/adapter/SpigotConfigAdapter.html" title="class in cz.foresttech.forestredis.spigot.adapter">SpigotConfigAdapter</a></div>
117+
<div class="col-last odd-row-color all-classes-table all-classes-table-tab2">
118+
<div class="block">Implementation of <a href="cz/foresttech/forestredis/shared/adapter/IConfigurationAdapter.html" title="interface in cz.foresttech.forestredis.shared.adapter"><code>IConfigurationAdapter</code></a> for Spigot version</div>
119+
</div>
120+
<div class="col-first even-row-color all-classes-table all-classes-table-tab2"><a href="cz/foresttech/forestredis/spigot/commands/SpigotForestRedisCommand.html" title="class in cz.foresttech.forestredis.spigot.commands">SpigotForestRedisCommand</a></div>
121+
<div class="col-last even-row-color all-classes-table all-classes-table-tab2">
122+
<div class="block">Spigot Command Class for handling ForestRedisAPI commands</div>
123+
</div>
124+
</div>
125+
</div>
126+
</div>
127+
</main>
128+
</div>
129+
</div>
130+
</body>
131+
</html>

docs/1.0.7/allpackages-index.html

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
<!DOCTYPE HTML>
2+
<html lang="cs">
3+
<head>
4+
<!-- Generated by javadoc (17) on Mon Aug 22 11:47:51 CEST 2022 -->
5+
<title>All Packages</title>
6+
<meta name="viewport" content="width=device-width, initial-scale=1">
7+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
8+
<meta name="dc.created" content="2022-08-22">
9+
<meta name="description" content="package index">
10+
<meta name="generator" content="javadoc/AllPackagesIndexWriter">
11+
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
12+
<link rel="stylesheet" type="text/css" href="script-dir/jquery-ui.min.css" title="Style">
13+
<link rel="stylesheet" type="text/css" href="jquery-ui.overrides.css" title="Style">
14+
<script type="text/javascript" src="script.js"></script>
15+
<script type="text/javascript" src="script-dir/jquery-3.5.1.min.js"></script>
16+
<script type="text/javascript" src="script-dir/jquery-ui.min.js"></script>
17+
</head>
18+
<body class="all-packages-index-page">
19+
<script type="text/javascript">var pathtoroot = "./";
20+
loadScripts(document, 'script');</script>
21+
<noscript>
22+
<div>JavaScript is disabled on your browser.</div>
23+
</noscript>
24+
<div class="flex-box">
25+
<header role="banner" class="flex-header">
26+
<nav role="navigation">
27+
<!-- ========= START OF TOP NAVBAR ======= -->
28+
<div class="top-nav" id="navbar-top">
29+
<div class="skip-nav"><a href="#skip-navbar-top" title="Skip navigation links">Skip navigation links</a></div>
30+
<ul id="navbar-top-firstrow" class="nav-list" title="Navigation">
31+
<li><a href="index.html">Overview</a></li>
32+
<li>Package</li>
33+
<li>Class</li>
34+
<li>Use</li>
35+
<li><a href="overview-tree.html">Tree</a></li>
36+
<li><a href="index-files/index-1.html">Index</a></li>
37+
<li><a href="help-doc.html#all-packages">Help</a></li>
38+
</ul>
39+
</div>
40+
<div class="sub-nav">
41+
<div class="nav-list-search"><label for="search-input">SEARCH:</label>
42+
<input type="text" id="search-input" value="search" disabled="disabled">
43+
<input type="reset" id="reset-button" value="reset" disabled="disabled">
44+
</div>
45+
</div>
46+
<!-- ========= END OF TOP NAVBAR ========= -->
47+
<span class="skip-nav" id="skip-navbar-top"></span></nav>
48+
</header>
49+
<div class="flex-content">
50+
<main role="main">
51+
<div class="header">
52+
<h1 title="All&amp;nbsp;Packages" class="title">All&nbsp;Packages</h1>
53+
</div>
54+
<div class="caption"><span>Package Summary</span></div>
55+
<div class="summary-table two-column-summary">
56+
<div class="table-header col-first">Package</div>
57+
<div class="table-header col-last">Description</div>
58+
<div class="col-first even-row-color"><a href="cz/foresttech/forestredis/bungee/package-summary.html">cz.foresttech.forestredis.bungee</a></div>
59+
<div class="col-last even-row-color">&nbsp;</div>
60+
<div class="col-first odd-row-color"><a href="cz/foresttech/forestredis/bungee/adapter/package-summary.html">cz.foresttech.forestredis.bungee.adapter</a></div>
61+
<div class="col-last odd-row-color">&nbsp;</div>
62+
<div class="col-first even-row-color"><a href="cz/foresttech/forestredis/bungee/commands/package-summary.html">cz.foresttech.forestredis.bungee.commands</a></div>
63+
<div class="col-last even-row-color">&nbsp;</div>
64+
<div class="col-first odd-row-color"><a href="cz/foresttech/forestredis/bungee/events/package-summary.html">cz.foresttech.forestredis.bungee.events</a></div>
65+
<div class="col-last odd-row-color">&nbsp;</div>
66+
<div class="col-first even-row-color"><a href="cz/foresttech/forestredis/shared/package-summary.html">cz.foresttech.forestredis.shared</a></div>
67+
<div class="col-last even-row-color">&nbsp;</div>
68+
<div class="col-first odd-row-color"><a href="cz/foresttech/forestredis/shared/adapter/package-summary.html">cz.foresttech.forestredis.shared.adapter</a></div>
69+
<div class="col-last odd-row-color">&nbsp;</div>
70+
<div class="col-first even-row-color"><a href="cz/foresttech/forestredis/shared/events/package-summary.html">cz.foresttech.forestredis.shared.events</a></div>
71+
<div class="col-last even-row-color">&nbsp;</div>
72+
<div class="col-first odd-row-color"><a href="cz/foresttech/forestredis/shared/models/package-summary.html">cz.foresttech.forestredis.shared.models</a></div>
73+
<div class="col-last odd-row-color">&nbsp;</div>
74+
<div class="col-first even-row-color"><a href="cz/foresttech/forestredis/spigot/package-summary.html">cz.foresttech.forestredis.spigot</a></div>
75+
<div class="col-last even-row-color">&nbsp;</div>
76+
<div class="col-first odd-row-color"><a href="cz/foresttech/forestredis/spigot/adapter/package-summary.html">cz.foresttech.forestredis.spigot.adapter</a></div>
77+
<div class="col-last odd-row-color">&nbsp;</div>
78+
<div class="col-first even-row-color"><a href="cz/foresttech/forestredis/spigot/commands/package-summary.html">cz.foresttech.forestredis.spigot.commands</a></div>
79+
<div class="col-last even-row-color">&nbsp;</div>
80+
<div class="col-first odd-row-color"><a href="cz/foresttech/forestredis/spigot/events/package-summary.html">cz.foresttech.forestredis.spigot.events</a></div>
81+
<div class="col-last odd-row-color">&nbsp;</div>
82+
</div>
83+
</main>
84+
</div>
85+
</div>
86+
</body>
87+
</html>

0 commit comments

Comments
 (0)