Skip to content

Commit

Permalink
Update README and default configs
Browse files Browse the repository at this point in the history
  • Loading branch information
Morphan1 committed Oct 11, 2016
1 parent 9821ef5 commit 3f72ecc
Show file tree
Hide file tree
Showing 7 changed files with 53 additions and 18 deletions.
30 changes: 27 additions & 3 deletions README.md
Expand Up @@ -6,9 +6,35 @@ Depenizen
- **Wiki**: http://wiki.citizensnpcs.co/Depenizen
- **IRC**: http://webchat.esper.net/?channels=denizen-dev
- **Denizen For Bukkit**: https://github.com/DenizenScript/Denizen-For-Bukkit
- **Denizen2Sponge**: https://github.com/DenizenScript/Denizen2Sponge
- **Builds**: http://ci.citizensnpcs.co/job/Depenizen/
- Use DepenizenBukkit for Bukkit/Spigot servers (install to `your_server_directory/plugins`)
- Use Depenizen2Sponge for Sponge servers (install to `your_server_directory/mods`)
- Use DepenizenBungee for BungeeCord servers (see below.)
- DepenizenBungee supports connections from both DepenizenBukkit and Depenizen2Sponge. It even allows you to use `bungeerun` for cross-compatible script running!

**Supported Plugins**: (And the sources we acquired Jar files from.)
**For communicating with a BungeeCord network, use the following instructions:**

1. Install DepenizenBungee on BungeeCord (`your_bungee_directory/plugins`)
2. Load your Bukkit/Spigot or Sponge server fully and stop it with `stop`.
3. Load BungeeCord fully and stop it with `end`.
4. Navigate to `your_bungee_directory/plugins/Depenizen` and open `config.yml`.
5. Set `Socket.Enabled` to `true`.
6. Set `Socket.Port` to an unused port number. ***NOT* your usual BungeeCord port!!!**
7. Set `Socket.Max Clients` to the number of Bukkit/Spigot/Sponge servers you're going to use to connect with.
8. Set `Socket.Password` to whatever you want. **KEEP THIS PASSWORD A SECRET!**
9. Save the file.
10. Install DepenizenBukkit or Depenizen2Sponge, depending on your server brand.
11. If using Bungee/Spigot, navigate to `your_server_directory/plugins/Depenizen`. If using Sponge, navigate to `your_server_directory/config/depenizen2sponge`.
12. Open `config.yml`.
13. Set `Socket.Enabled` to `true`.
14. Set `Socket.IP Address` to the external IP address of your BungeeCord network.
15. Set `Socket.Port` to the same value as in your BungeeCord `config.yml`.
16. Set `Socket.Password` to the same value as in your BungeeCord `config.yml`.
17. Set `Socket.Name` to a **unique** name to identify this server.
18. Repeat steps 10 through 17 for each server on the network.

**DepenizenBukkit Supported Plugins**: (And the sources we acquired Jar files from.)
- AreaShop (https://www.spigotmc.org/resources/areashop.2991/)
- ASkyBlock (https://www.spigotmc.org/resources/a-skyblock.1220/)
- BattleNight (http://dev.bukkit.org/bukkit-plugins/battlenight/) - **Very outdated, no evidence of further development**
Expand Down Expand Up @@ -41,5 +67,3 @@ Depenizen
- Votifier (http://dev.bukkit.org/bukkit-plugins/votifier/)
- WorldEdit (https://dev.bukkit.org/bukkit-plugins/worldedit/)
- WorldGuard (https://dev.bukkit.org/bukkit-plugins/worldguard/)

Also Bungee, using http://ci.citizensnpcs.co/job/DepenizenForBungee/
Expand Up @@ -37,7 +37,7 @@ public void onDisable() {
public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
if (cmd.getName().equalsIgnoreCase("depenizen")) {
sender.sendMessage(ChatColor.UNDERLINE + "Depenizen");
sender.sendMessage(ChatColor.GRAY + "Developers: " + ChatColor.AQUA + "Morphan1" + ChatColor.GRAY + ", " + ChatColor.GREEN + "Jeebiss" + ChatColor.GRAY + ", and GnomeffinWay");
sender.sendMessage(ChatColor.GRAY + "Developer: " + ChatColor.AQUA + "Morphan1");
sender.sendMessage(ChatColor.GRAY + "Current version: " + ChatColor.GOLD + this.getDescription().getVersion());
return true;
}
Expand Down
10 changes: 6 additions & 4 deletions bukkit/src/main/resources/config.yml
Expand Up @@ -13,8 +13,8 @@ Socket:
# YAML from thinking it's an invalid string (for example, if it's all numbers).
Password: "MySecretPassword"
# The name to connect with. Used for the Bungee dServer object.
# This does not have to be the same name that Bungee itself
# recognizes, but it is recommended to use that for consistency.
# This does not have to be the same name that Bungee itself recognizes,
# but it is recommended to use that for the sake of consistency.
Name: "MyServer1"
# The duration of inactivity that the client will send a ping
# packet to the server after.
Expand All @@ -24,6 +24,8 @@ Socket:
Ping Timeout: "30s"
# The duration to wait between attempts at reconnecting to the socket.
Reconnection Delay: "10s"
# The amount of times the socket should attempt to reconnect to the socket
# before giving up.
# The amount of times the client should attempt to reconnect to the socket
# before giving up. After the last try, the "bungee fails reconnect" event will fire,
# allowing for manual handling.
# Set to -1 to never stop trying to reconnect. (This also disables the fail event.)
Reconnection Attempts: 10
10 changes: 7 additions & 3 deletions bungee/src/main/resources/config.yml
Expand Up @@ -7,9 +7,13 @@ Debug:
# between servers without the need for online players on each
# sender and recipient
Socket:
# Whether the socket server is enabled and should automatically open on startup.
Enabled: false
# The port on which to host the socket server.
# This should be an unused port, NOT your usual BungeeCord port!!!
Port: 25578
# How many servers are allowed to be connected to the socket
# at one time
# How many servers are allowed to be connected to the socket at one time
Max clients: 3
Password: MySecretPassword
# The password required to connect with. Please leave this in "quotes" to keep
# YAML from thinking it's an invalid string (for example, if it's all numbers).
Password: "MySecretPassword"
Expand Up @@ -18,7 +18,7 @@ public ReconnectTask(SocketClient client, int attempts, long reconnectDelay) {

@Override
public void run() {
while (attemptsLeft > 0 && !client.isConnected()) {
while (attemptsLeft != 0 && !client.isConnected()) {
try {
Thread.sleep(reconnectDelay);
}
Expand All @@ -30,11 +30,13 @@ public void run() {
return;
}
try {
attemptsLeft--;
if (attemptsLeft > 0) {
attemptsLeft--;
}
client.connect();
}
catch (IOException e) {
if (attemptsLeft <= 0) {
if (attemptsLeft == 0) {
Depenizen.getImplementation().debugError("Failed to reconnect to BungeeCord Socket.");
client.fireReconnectFailEvent();
}
Expand Down
Expand Up @@ -31,6 +31,7 @@
id = Depenizen2Sponge.PLUGIN_ID,
name = Depenizen2Sponge.PLUGIN_NAME,
version = Depenizen2Sponge.PLUGIN_VERSION,
authors = "Morphan1",
dependencies = @Dependency(id = Denizen2Sponge.PLUGIN_ID)
)
public class Depenizen2Sponge implements DepenizenImplementation {
Expand Down
10 changes: 6 additions & 4 deletions sponge/src/main/resources/defaultConfig.yml
Expand Up @@ -13,8 +13,8 @@ Socket:
# YAML from thinking it's an invalid string (for example, if it's all numbers).
Password: "MySecretPassword"
# The name to connect with. Used for the Bungee dServer object.
# This does not have to be the same name that Bungee itself
# recognizes, but it is recommended to use that for consistency.
# This does not have to be the same name that Bungee itself recognizes,
# but it is recommended to use that for the sake of consistency.
Name: "MyServer1"
# The duration of inactivity that the client will send a ping
# packet to the server after.
Expand All @@ -24,6 +24,8 @@ Socket:
Ping Timeout: "30s"
# The duration to wait between attempts at reconnecting to the socket.
Reconnection Delay: "10s"
# The amount of times the socket should attempt to reconnect to the socket
# before giving up.
# The amount of times the client should attempt to reconnect to the socket
# before giving up. After the last try, the "bungee fails reconnect" event will fire,
# allowing for manual handling.
# Set to -1 to never stop trying to reconnect. (This also disables the fail event.)
Reconnection Attempts: 10

0 comments on commit 3f72ecc

Please sign in to comment.