diff --git a/README.md b/README.md
index 6f7aba05a..21a70fc9e 100644
--- a/README.md
+++ b/README.md
@@ -1,10 +1,9 @@
-[](https://ci.cloudnetservice.eu/job/CloudNetService/job/CloudNet/master)
+# This project is archived! Please consider using [CloudNet v3](https://github.com/CloudNetService/CloudNet-v3). The modules have been moved to a separate [organization](https://github.com/CloudNet-v2).
+
[](https://github.com/CloudNetService/CloudNet)
[](https://github.com/CloudNetService/CloudNet/fork)
[](https://github.com/CloudNetService/CloudNet/blob/master/LICENSE)
-[](https://depshield.github.io)
-[](https://github.com/CloudNetService/CloudNet/issues)
[](https://github.com/CloudNetService/CloudNet/graphs/contributors)
[](https://github.com/CloudNetService/CloudNet/releases)
[](https://github.com/CloudNetService/CloudNet/releases)
@@ -52,7 +51,7 @@ Maven:
cloudnet-repo
- https://cloudnetservice.eu/repositories
+ https://repo.cloudnetservice.eu/repository/releases/
@@ -61,14 +60,14 @@ Maven:
de.dytanic.cloudnet
cloudnet-api-bridge
- 2.1.17
+ 2.1.18
provided
de.dytanic.cloudnet
cloudnet-core
- 2.1.17
+ 2.1.18
provided
diff --git a/cloudnet-api/cloudnet-api-bridge/src/main/java/de/dytanic/cloudnet/bridge/CloudServer.java b/cloudnet-api/cloudnet-api-bridge/src/main/java/de/dytanic/cloudnet/bridge/CloudServer.java
index 187ce658f..bf757c897 100644
--- a/cloudnet-api/cloudnet-api-bridge/src/main/java/de/dytanic/cloudnet/bridge/CloudServer.java
+++ b/cloudnet-api/cloudnet-api-bridge/src/main/java/de/dytanic/cloudnet/bridge/CloudServer.java
@@ -106,7 +106,7 @@ public CloudServer(BukkitBootstrap bukkitBootstrap, CloudAPI cloudAPI) {
/**
* Returns the instance from the CloudServer
*
- * @return
+ * @return the cloud server instance
*/
public static CloudServer getInstance() {
return instance;
@@ -188,7 +188,7 @@ public void run() {
/**
* Checks if this instance can starting game servers auto
*
- * @return
+ * @return whether this server automatically starts servers
*/
public boolean isAllowAutoStart() {
return allowAutoStart;
@@ -221,7 +221,7 @@ public void update() {
/**
* You can disable the Autostart funtction from this server
*
- * @param allowAutoStart
+ * @param allowAutoStart whether this server automatically starts servers
*/
public void setAllowAutoStart(boolean allowAutoStart) {
this.allowAutoStart = allowAutoStart;
@@ -252,7 +252,7 @@ public String getHostAdress() {
/**
* Returns the serverConfig from this instance
*
- * @return
+ * @return the current server configuration
*/
public ServerConfig getServerConfig() {
return serverConfig;
@@ -261,7 +261,7 @@ public ServerConfig getServerConfig() {
/**
* Sets the serverConfig in a new default style
*
- * @param serverConfig
+ * @param serverConfig the new server configuration
*/
public void setServerConfig(ServerConfig serverConfig) {
this.serverConfig = serverConfig;
@@ -270,7 +270,7 @@ public void setServerConfig(ServerConfig serverConfig) {
/**
* Returns the ServerState from this instance
*
- * @return
+ * @return the current server state
*/
public ServerState getServerState() {
return serverState;
@@ -279,7 +279,7 @@ public ServerState getServerState() {
/**
* Set the serverState INGAME, LOBBY, OFFLINE for switching Signs or your API thinks
*
- * @param serverState
+ * @param serverState the new server state
*/
public void setServerState(ServerState serverState) {
this.serverState = serverState;
@@ -288,7 +288,7 @@ public void setServerState(ServerState serverState) {
/**
* Returns the max players from the acceptings
*
- * @return
+ * @return the maximum amount of players allowed
*/
public int getMaxPlayers() {
return maxPlayers;
@@ -297,7 +297,7 @@ public int getMaxPlayers() {
/**
* Set the maxPlayers from this instance
*
- * @param maxPlayers
+ * @param maxPlayers the maximum amount of players allowed
*/
public void setMaxPlayers(int maxPlayers) {
this.maxPlayers = maxPlayers;
@@ -316,7 +316,7 @@ public void setMotdAndUpdate(String motd) {
/**
* Returns the motd from the server marks for the cloud
*
- * @return
+ * @return the motd
*/
public String getMotd() {
return motd;
@@ -325,7 +325,7 @@ public String getMotd() {
/**
* Sets the Motd for the ServerInfo
*
- * @param motd
+ * @param motd the motd
*/
public void setMotd(String motd) {
this.motd = motd;
@@ -341,7 +341,7 @@ public Template getTemplate() {
/**
* Registerd one command
*
- * @param command
+ * @param command the command to register
*/
public void registerCommand(Command command) {
try {
@@ -361,7 +361,7 @@ public void registerCommand(Command command) {
/**
* Returns the SimpleServerGroup of the instance
*
- * @return
+ * @return the group data of this servers group
*/
public SimpleServerGroup getGroupData() {
return CloudAPI.getInstance().getCloudNetwork().getServerGroups().get(CloudAPI.getInstance().getGroup());
@@ -374,7 +374,7 @@ public double getPercentOfPlayerNowOnline() {
/**
* Returns the Plugin instance from this CLoud-System
*
- * @return
+ * @return this server's bootstrap plugin
*/
public JavaPlugin getPlugin() {
return bukkitBootstrap;
@@ -383,14 +383,14 @@ public JavaPlugin getPlugin() {
/**
* Returns the ServerProcessMeta for the bootstrap of the software
*
- * @return
+ * @return this server's process metadata
*/
public ServerProcessMeta getServerProcessMeta() {
return CloudAPI.getInstance().getConfig().getObject("serverProcess", new TypeToken() {}.getType());
}
/**
- * @param player
+ * @param player the player
*/
public void updateNameTags(Player player) {
this.updateNameTags(player, null);
@@ -440,7 +440,7 @@ public void updateNameTags(Player player,
/**
* Returns the cached CloudPlayer Objectives
*
- * @return
+ * @return a map containing all cloud players
*/
public Map getCloudPlayers() {
return cloudPlayers;
diff --git a/cloudnet-api/cloudnet-api-bridge/src/main/java/de/dytanic/cloudnet/bridge/event/bukkit/BukkitCloudEvent.java b/cloudnet-api/cloudnet-api-bridge/src/main/java/de/dytanic/cloudnet/bridge/event/bukkit/BukkitCloudEvent.java
index b61efbb4e..309ee65d9 100644
--- a/cloudnet-api/cloudnet-api-bridge/src/main/java/de/dytanic/cloudnet/bridge/event/bukkit/BukkitCloudEvent.java
+++ b/cloudnet-api/cloudnet-api-bridge/src/main/java/de/dytanic/cloudnet/bridge/event/bukkit/BukkitCloudEvent.java
@@ -24,7 +24,7 @@ public BukkitCloudEvent() {
/**
* Returns the CloudAPI instance
*
- * @return
+ * @return the current cloud api instance
*/
public CloudAPI getCloud() {
return CloudAPI.getInstance();
@@ -32,6 +32,8 @@ public CloudAPI getCloud() {
/**
* Returns the CloudServer instance
+ *
+ * @return the current cloud server instance
*/
public CloudServer getCloudServer() {
return CloudServer.getInstance();
diff --git a/cloudnet-api/cloudnet-api-bridge/src/main/java/de/dytanic/cloudnet/bridge/event/proxied/ProxiedCloudEvent.java b/cloudnet-api/cloudnet-api-bridge/src/main/java/de/dytanic/cloudnet/bridge/event/proxied/ProxiedCloudEvent.java
index 726631b33..51892fa07 100644
--- a/cloudnet-api/cloudnet-api-bridge/src/main/java/de/dytanic/cloudnet/bridge/event/proxied/ProxiedCloudEvent.java
+++ b/cloudnet-api/cloudnet-api-bridge/src/main/java/de/dytanic/cloudnet/bridge/event/proxied/ProxiedCloudEvent.java
@@ -16,7 +16,7 @@ public abstract class ProxiedCloudEvent extends Event {
/**
* Returns the CloudAPI instance
*
- * @return
+ * @return the current cloud api instance
*/
public CloudAPI getCloud() {
return CloudAPI.getInstance();
@@ -25,7 +25,7 @@ public CloudAPI getCloud() {
/**
* Returns the CloudProxy instance
*
- * @return
+ * @return the current cloud proxy instance
*/
public CloudProxy getCloudProxy() {
return CloudProxy.getInstance();
diff --git a/cloudnet-api/cloudnet-api-bridge/src/main/java/de/dytanic/cloudnet/bridge/internal/chat/DocumentRegistry.java b/cloudnet-api/cloudnet-api-bridge/src/main/java/de/dytanic/cloudnet/bridge/internal/chat/DocumentRegistry.java
index 21252af79..47f9cf8f8 100644
--- a/cloudnet-api/cloudnet-api-bridge/src/main/java/de/dytanic/cloudnet/bridge/internal/chat/DocumentRegistry.java
+++ b/cloudnet-api/cloudnet-api-bridge/src/main/java/de/dytanic/cloudnet/bridge/internal/chat/DocumentRegistry.java
@@ -9,18 +9,21 @@
import net.md_5.bungee.chat.TextComponentSerializer;
import net.md_5.bungee.chat.TranslatableComponentSerializer;
+import java.text.DateFormat;
+
public final class DocumentRegistry {
private DocumentRegistry() {
}
public static void fire() {
- Document.GSON = new GsonBuilder().serializeNulls().setPrettyPrinting().disableHtmlEscaping()
- //
- .registerTypeAdapter(BaseComponent.class, new ComponentSerializer()).registerTypeAdapter(
- TextComponent.class,
- new TextComponentSerializer()).registerTypeAdapter(TranslatableComponent.class, new TranslatableComponentSerializer())
- //
+ Document.GSON = new GsonBuilder().serializeNulls()
+ .setPrettyPrinting()
+ .disableHtmlEscaping()
+ .registerTypeAdapter(BaseComponent.class, new ComponentSerializer())
+ .registerTypeAdapter(TextComponent.class, new TextComponentSerializer())
+ .registerTypeAdapter(TranslatableComponent.class, new TranslatableComponentSerializer())
+ .setDateFormat(DateFormat.MEDIUM)
.create();
}
diff --git a/cloudnet-api/cloudnet-api-bridge/src/main/java/de/dytanic/cloudnet/bridge/internal/listener/proxied/ProxiedListener.java b/cloudnet-api/cloudnet-api-bridge/src/main/java/de/dytanic/cloudnet/bridge/internal/listener/proxied/ProxiedListener.java
index d0edf6d5d..7741a8d05 100644
--- a/cloudnet-api/cloudnet-api-bridge/src/main/java/de/dytanic/cloudnet/bridge/internal/listener/proxied/ProxiedListener.java
+++ b/cloudnet-api/cloudnet-api-bridge/src/main/java/de/dytanic/cloudnet/bridge/internal/listener/proxied/ProxiedListener.java
@@ -24,10 +24,6 @@
import de.dytanic.cloudnet.lib.server.ProxyGroup;
import de.dytanic.cloudnet.lib.server.info.ServerInfo;
import de.dytanic.cloudnet.lib.utility.document.Document;
-import io.netty.channel.Channel;
-import io.netty.channel.ChannelHandlerContext;
-import io.netty.handler.codec.MessageToMessageEncoder;
-import net.md_5.bungee.UserConnection;
import net.md_5.bungee.api.ChatColor;
import net.md_5.bungee.api.CommandSender;
import net.md_5.bungee.api.ProxyServer;
@@ -38,11 +34,7 @@
import net.md_5.bungee.api.plugin.Listener;
import net.md_5.bungee.event.EventHandler;
import net.md_5.bungee.event.EventPriority;
-import net.md_5.bungee.netty.ChannelWrapper;
-import net.md_5.bungee.protocol.DefinedPacket;
-import net.md_5.bungee.protocol.packet.Respawn;
-import java.lang.reflect.Field;
import java.util.List;
import java.util.UUID;
import java.util.concurrent.TimeUnit;
diff --git a/cloudnet-api/cloudnet-api-bridge/src/main/java/de/dytanic/cloudnet/bridge/internal/util/ItemStackBuilder.java b/cloudnet-api/cloudnet-api-bridge/src/main/java/de/dytanic/cloudnet/bridge/internal/util/ItemStackBuilder.java
index f82e72dcc..d31350113 100644
--- a/cloudnet-api/cloudnet-api-bridge/src/main/java/de/dytanic/cloudnet/bridge/internal/util/ItemStackBuilder.java
+++ b/cloudnet-api/cloudnet-api-bridge/src/main/java/de/dytanic/cloudnet/bridge/internal/util/ItemStackBuilder.java
@@ -32,6 +32,8 @@ public ItemStackBuilder(Material material) {
/**
* @deprecated will only work in versions lower than 1.13
+ *
+ * @param material the id of the material
*/
@Deprecated
public ItemStackBuilder(int material) {
@@ -46,6 +48,9 @@ public ItemStackBuilder(Material material, int amount) {
/**
* @deprecated will only work in versions lower than 1.13
+ *
+ * @param material the id of the material
+ * @param amount the amount
*/
@Deprecated
public ItemStackBuilder(int material, int amount) {
@@ -60,6 +65,10 @@ public ItemStackBuilder(Material material, int amount, int sub) {
/**
* @deprecated will only work in versions lower than 1.13
+ *
+ * @param material the id of the material
+ * @param amount the amount
+ * @param sub the damage value
*/
@Deprecated
public ItemStackBuilder(int material, int amount, int sub) {
@@ -107,6 +116,8 @@ public static ItemStackBuilder builder(Material material, int amount, int sub) {
/**
* @deprecated will only work in versions lower than 1.13
+ *
+ * @param material the id of the material
*/
@Deprecated
public static ItemStackBuilder builder(int material) {
@@ -115,6 +126,9 @@ public static ItemStackBuilder builder(int material) {
/**
* @deprecated will only work in versions lower than 1.13
+ *
+ * @param material the id of the material
+ * @param amount the amount
*/
@Deprecated
public static ItemStackBuilder builder(int material, int amount) {
@@ -123,6 +137,10 @@ public static ItemStackBuilder builder(int material, int amount) {
/**
* @deprecated will only work in versions lower than 1.13
+ *
+ * @param material the id of the material
+ * @param amount the amount
+ * @param sub the damage value
*/
@Deprecated
public static ItemStackBuilder builder(int material, int amount, int sub) {
diff --git a/cloudnet-api/cloudnet-api-core/src/main/java/de/dytanic/cloudnet/api/CloudAPI.java b/cloudnet-api/cloudnet-api-core/src/main/java/de/dytanic/cloudnet/api/CloudAPI.java
index e03db2e2a..a92ae0446 100644
--- a/cloudnet-api/cloudnet-api-core/src/main/java/de/dytanic/cloudnet/api/CloudAPI.java
+++ b/cloudnet-api/cloudnet-api-core/src/main/java/de/dytanic/cloudnet/api/CloudAPI.java
@@ -107,6 +107,8 @@ private void initDefaultHandlers() {
/**
* Returns the instance of the CloudAPI
+ *
+ * @return the instance of the CloudAPI
*/
public static CloudAPI getInstance() {
return instance;
@@ -147,6 +149,10 @@ public CloudAPI update(ProxyInfo proxyInfo) {
/**
* Returns synchronized the OnlineCount from the group
+ *
+ * @param group the name of the server group
+ *
+ * @return the amount of players currently online on the given server group
*/
public int getOnlineCount(String group) {
AtomicInteger integer = new AtomicInteger(0);
@@ -162,7 +168,9 @@ public void run(ServerInfo obj) {
/**
* Returns all serverInfos from group #group
*
- * @param group
+ * @param group the name of the server group
+ *
+ * @return a collection containing all servers of the given server group
*/
public Collection getServers(String group) {
if (cloudService != null && cloudService.isProxyInstance()) {
@@ -190,13 +198,17 @@ public void setCloudService(ICloudService cloudService) {
/**
* Returns the Configuration Loader from this Plugin
+ *
+ * @return the loader for the configuration of this cloud instance
*/
public CloudConfigLoader getCloudConfigLoader() {
return cloudConfigLoader;
}
/**
- * Returns the wingui Config
+ * Returns the configuration
+ *
+ * @return A document containing the current configuration
*/
public Document getConfig() {
return config;
@@ -204,6 +216,8 @@ public Document getConfig() {
/**
* Returns a simple cloudnetwork information base
+ *
+ * @return An instance of the current cloud network state
*/
public CloudNetwork getCloudNetwork() {
return cloudNetwork;
@@ -212,7 +226,7 @@ public CloudNetwork getCloudNetwork() {
/**
* Internal CloudNetwork update set
*
- * @param cloudNetwork
+ * @param cloudNetwork the new cloud network state instance
*/
public void setCloudNetwork(CloudNetwork cloudNetwork) {
this.cloudNetwork = cloudNetwork;
@@ -220,6 +234,8 @@ public void setCloudNetwork(CloudNetwork cloudNetwork) {
/**
* Returns the network server manager from cloudnet
+ *
+ * @return the provider for network handlers
*/
public NetworkHandlerProvider getNetworkHandlerProvider() {
return networkHandlerProvider;
@@ -227,6 +243,8 @@ public NetworkHandlerProvider getNetworkHandlerProvider() {
/**
* Returns the internal network connection to the cloudnet root
+ *
+ * @return the network connection to the cloudnet core
*/
public NetworkConnection getNetworkConnection() {
return networkConnection;
@@ -234,6 +252,8 @@ public NetworkConnection getNetworkConnection() {
/**
* Returns the cloud prefix
+ *
+ * @return The prefix for messages from the cloudnet process
*/
public String getPrefix() {
return cloudNetwork.getMessages().getString("prefix");
@@ -241,6 +261,8 @@ public String getPrefix() {
/**
* Returns the memory from this instance calc by Wrapper
+ *
+ * @return the configured maximum heap memory in mb
*/
public int getMemory() {
return memory;
@@ -248,6 +270,8 @@ public int getMemory() {
/**
* Returns the shutdownTask which is default init
+ *
+ * @return the task to run, when this cloud instance is shut down
*/
public Runnable getShutdownTask() {
return shutdownTask;
@@ -255,6 +279,8 @@ public Runnable getShutdownTask() {
/**
* Returns the ServiceId from this instance
+ *
+ * @return the service id of this instance
*/
public ServiceId getServiceId() {
return serviceId;
@@ -262,6 +288,8 @@ public ServiceId getServiceId() {
/**
* Returns the Database Manager for the CloudNetDB functions
+ *
+ * @return the database manager
*/
public DatabaseManager getDatabaseManager() {
return databaseManager;
@@ -269,6 +297,8 @@ public DatabaseManager getDatabaseManager() {
/**
* Returns the group name from this instance
+ *
+ * @return the name of the group of this running instance
*/
public String getGroup() {
return serviceId.getGroup();
@@ -276,6 +306,8 @@ public String getGroup() {
/**
* Returns the UUID from this instance
+ *
+ * @return the UUID of this running instance
*/
public UUID getUniqueId() {
return serviceId.getUniqueId();
@@ -283,13 +315,17 @@ public UUID getUniqueId() {
/**
* Returns the serverId (Lobby-1)
+ *
+ * @return the server id of this running instance
*/
public String getServerId() {
return serviceId.getServerId();
}
/**
- * Returns the Id (Lobby-1 -> "1")
+ * Returns the Id (Lobby-1 -> "1")
+ *
+ * @return the numerical id of this running instance
*/
public int getGroupInitId() {
return serviceId.getId();
@@ -297,6 +333,8 @@ public int getGroupInitId() {
/**
* Returns the wrapperid from this instance
+ *
+ * @return the wrapper id of this running instance
*/
public String getWrapperId() {
return serviceId.getWrapperId();
@@ -305,7 +343,9 @@ public String getWrapperId() {
/**
* Returns the SimpleServerGroup of the parameter
*
- * @param group
+ * @param group the name of the server group
+ *
+ * @return the server group with the given name, if available
*/
public SimpleServerGroup getServerGroupData(String group) {
return cloudNetwork.getServerGroups().get(group);
@@ -314,7 +354,9 @@ public SimpleServerGroup getServerGroupData(String group) {
/**
* Returns the ProxyGroup of the parameter
*
- * @param group
+ * @param group the name of the proxy group
+ *
+ * @return the proxy group with the given name, if available
*/
public ProxyGroup getProxyGroupData(String group) {
return cloudNetwork.getProxyGroups().get(group);
@@ -322,6 +364,8 @@ public ProxyGroup getProxyGroupData(String group) {
/**
* Returns the global onlineCount
+ *
+ * @return the amount of players online
*/
public int getOnlineCount() {
return cloudNetwork.getOnlineCount();
@@ -329,6 +373,8 @@ public int getOnlineCount() {
/**
* Returns the amount of players that are registered in the Cloud
+ *
+ * @return the total number of players registered on the cloud network
*/
public int getRegisteredPlayerCount() {
return cloudNetwork.getRegisteredPlayerCount();
@@ -337,7 +383,7 @@ public int getRegisteredPlayerCount() {
/**
* Returns all the module properties
*
- * @return
+ * @return a document with all module properties
*/
public Document getModuleProperties() {
return cloudNetwork.getModules();
@@ -345,6 +391,8 @@ public Document getModuleProperties() {
/**
* Returns the permissionPool of the cloudnetwork
+ *
+ * @return the permission pool
*/
public PermissionPool getPermissionPool() {
return cloudNetwork.getModules().getObject("permissionPool", PermissionPool.TYPE);
@@ -352,6 +400,8 @@ public PermissionPool getPermissionPool() {
/**
* Returns all active wrappers on cloudnet
+ *
+ * @return a collection of all wrappers
*/
public Collection getWrappers() {
return cloudNetwork.getWrappers();
@@ -359,6 +409,10 @@ public Collection getWrappers() {
/**
* Returns the permission group from the permissions-system
+ *
+ * @param group the name of the permission group
+ *
+ * @return the permission group with the given name, if available
*/
public PermissionGroup getPermissionGroup(String group) {
if (cloudNetwork.getModules().contains("permissionPool")) {
@@ -370,7 +424,9 @@ public PermissionGroup getPermissionGroup(String group) {
/**
* Returns one of the wrapper infos
*
- * @param wrapperId
+ * @param wrapperId the id/name of the wrapper
+ *
+ * @return the wrapper with the given name
*/
public WrapperInfo getWrapper(String wrapperId) {
return CollectionWrapper.filter(cloudNetwork.getWrappers(), new Acceptable() {
@@ -382,37 +438,55 @@ public boolean isAccepted(WrapperInfo value) {
}
/**
- * Sends the data of the custom channel message to all proxys
+ * Sends the custom channel message to all proxy instances.
+ *
+ * @param channel the channel to send the message on.
+ * @param message the message to send.
+ * @param value the document attached to the message.
*/
public void sendCustomSubProxyMessage(String channel, String message, Document value) {
networkConnection.sendPacket(new PacketOutCustomSubChannelMessage(DefaultType.BUNGEE_CORD, channel, message, value));
}
/**
- * Sends the data of the custom channel message to all server
+ * Sends the custom channel message to all server instances.
+ *
+ * @param channel the channel to send the message on.
+ * @param message the message to send.
+ * @param value the document attached to the message.
*/
public void sendCustomSubServerMessage(String channel, String message, Document value) {
networkConnection.sendPacket(new PacketOutCustomSubChannelMessage(DefaultType.BUKKIT, channel, message, value));
}
/**
- * Sends the data of the custom channel message to one server
+ * Sends the custom channel message to the specified server.
+ *
+ * @param channel the channel to send the message on.
+ * @param message the message to send.
+ * @param value the document attached to the message.
+ * @param serverName the name of the server that this message is going to be sent to.
*/
public void sendCustomSubServerMessage(String channel, String message, Document value, String serverName) {
networkConnection.sendPacket(new PacketOutCustomSubChannelMessage(DefaultType.BUKKIT, serverName, channel, message, value));
}
/**
- * Sends the data of the custom channel message to proxy server
+ * Sends the custom channel message to the specified server.
+ *
+ * @param channel the channel to send the message on.
+ * @param message the message to send.
+ * @param value the document attached to the message.
+ * @param proxyName the name of the proxy that this message is going to be sent to.
*/
- public void sendCustomSubProxyMessage(String channel, String message, Document value, String serverName) {
- networkConnection.sendPacket(new PacketOutCustomSubChannelMessage(DefaultType.BUNGEE_CORD, serverName, channel, message, value));
+ public void sendCustomSubProxyMessage(String channel, String message, Document value, String proxyName) {
+ networkConnection.sendPacket(new PacketOutCustomSubChannelMessage(DefaultType.BUNGEE_CORD, proxyName, channel, message, value));
}
/**
- * Update the server group
+ * Updates the given server group across the network.
*
- * @param serverGroup
+ * @param serverGroup the server group to update.
*/
public void updateServerGroup(ServerGroup serverGroup) {
networkConnection.sendPacket(new PacketOutUpdateServerGroup(serverGroup));
@@ -420,6 +494,8 @@ public void updateServerGroup(ServerGroup serverGroup) {
/**
* Update the permission group
+ *
+ * @param permissionGroup the permission group to update
*/
public void updatePermissionGroup(PermissionGroup permissionGroup) {
this.logger.logp(Level.FINEST,
@@ -430,87 +506,99 @@ public void updatePermissionGroup(PermissionGroup permissionGroup) {
}
/**
- * Update the proxy group
+ * Updates the given proxy group across the network.
*
- * @param proxyGroup
+ * @param proxyGroup the proxy group to update.
*/
public void updateProxyGroup(ProxyGroup proxyGroup) {
this.logger.logp(Level.FINEST,
this.getClass().getSimpleName(),
"updateProxyGroup",
- String.format("Updating proxy group: %s", proxyGroup));
+ String.format("Updating proxy group: %s%n", proxyGroup));
networkConnection.sendPacket(new PacketOutUpdateProxyGroup(proxyGroup));
}
/**
- * Dispatch a command on cloudnet-core
+ * Dispatch a command on the CloudNet master.
+ *
+ * @param commandLine the entire command line with space-separated arguments.
*/
public void sendCloudCommand(String commandLine) {
this.logger.logp(Level.FINEST,
this.getClass().getSimpleName(),
"sendCloudCommand",
- String.format("Sending cloud command: %s", commandLine));
+ String.format("Sending cloud command: %s%n", commandLine));
networkConnection.sendPacket(new PacketOutExecuteCommand(commandLine));
}
/**
- * Dispatch a console message
+ * Dispatches a console message to the CloudNet master.
*
- * @param output
+ * @param message the message to dispatch.
*/
- public void dispatchConsoleMessage(String output) {
+ public void dispatchConsoleMessage(String message) {
this.logger.logp(Level.FINEST,
this.getClass().getSimpleName(),
"dispatchConsoleMessage",
- String.format("Dispatching console message: %s", output));
- networkConnection.sendPacket(new PacketOutDispatchConsoleMessage(output));
+ String.format("Dispatching console message: %s%n", message));
+ networkConnection.sendPacket(new PacketOutDispatchConsoleMessage(message));
}
/**
- * Writes into the console of the server/proxy the command line
+ * Sends the given command line to the console of the given server or proxy.
*
- * @param defaultType
- * @param serverId
- * @param commandLine
+ * @param defaultType the type of service (server or proxy) to send the command line to.
+ * @param serverId the server id of the service.
+ * @param commandLine the command line to send.
*/
public void sendConsoleMessage(DefaultType defaultType, String serverId, String commandLine) {
this.logger.logp(Level.FINEST,
this.getClass().getSimpleName(),
"sendConsoleMessage",
- String.format("Sending console message: %s %s %s", defaultType, serverId, commandLine));
+ String.format("Sending console message: %s %s %s%n", defaultType, serverId, commandLine));
networkConnection.sendPacket(new PacketOutServerDispatchCommand(defaultType, serverId, commandLine));
}
+ /**
+ * @return a map containing all server groups mapped to their names.
+ */
public Map getServerGroupMap() {
return cloudNetwork.getServerGroups();
}
+ /**
+ * @return a map containing all proxy groups mapped to their names.
+ */
public Map getProxyGroupMap() {
return cloudNetwork.getProxyGroups();
}
/**
- * Stop a game server with the parameter of the serverId
+ * Stops a game server with the given server id
*
- * @param serverId the server-id to stop
+ * @param serverId the server id of the server to stop.
*/
public void stopServer(String serverId) {
- this.logger.logp(Level.FINEST, this.getClass().getSimpleName(), "stopServer", String.format("Stopping server: %s", serverId));
+ this.logger.logp(Level.FINEST, this.getClass().getSimpleName(), "stopServer", String.format("Stopping server: %s%n", serverId));
networkConnection.sendPacket(new PacketOutStopServer(serverId));
}
- /*=====================================================================================*/
-
/**
- * Stop a BungeeCord proxy server with the id @proxyId
+ * Stops the proxy server with the given proxy id.
+ *
+ * @param proxyId the proxy id of the proxy server to stop.
*/
public void stopProxy(String proxyId) {
- this.logger.logp(Level.FINEST, this.getClass().getSimpleName(), "stopProxy", String.format("Stopping proxy: %s", proxyId));
+ this.logger.logp(Level.FINEST, this.getClass().getSimpleName(), "stopProxy", String.format("Stopping proxy: %s%n", proxyId));
networkConnection.sendPacket(new PacketOutStopProxy(proxyId));
}
/**
- * Creates a custom server log url for one server screen
+ * Creates a custom server log url for a service screen.
+ *
+ * @param serverId the id of the service.
+ *
+ * @return the generated url
*/
public String createServerLogUrl(String serverId) {
this.logger.logp(Level.FINEST,
@@ -531,7 +619,7 @@ public String createServerLogUrl(String serverId) {
/**
* Start a proxy server with a group
*
- * @param proxyGroup
+ * @param proxyGroup the proxy group
*/
public void startProxy(ProxyGroup proxyGroup) {
startProxy(proxyGroup, proxyGroup.getMemory(), new String[] {});
@@ -540,7 +628,9 @@ public void startProxy(ProxyGroup proxyGroup) {
/**
* Start a proxy server with a group
*
- * @param proxyGroup
+ * @param proxyGroup the proxy group
+ * @param memory the amount of heap memory
+ * @param processParameters the parameters for the process
*/
public void startProxy(ProxyGroup proxyGroup, int memory, String[] processParameters) {
startProxy(proxyGroup, memory, processParameters, null, new ArrayList<>(), new Document());
@@ -549,7 +639,12 @@ public void startProxy(ProxyGroup proxyGroup, int memory, String[] processParame
/**
* Start a proxy server with a group
*
- * @param proxyGroup
+ * @param proxyGroup the proxy group
+ * @param memory the amount of heap memory
+ * @param processParameters the parameters for the process
+ * @param url the url to download the template from
+ * @param plugins a collection of plugins that should be installed
+ * @param properties additional properties
*/
public void startProxy(ProxyGroup proxyGroup,
int memory,
@@ -573,16 +668,20 @@ public void startProxy(ProxyGroup proxyGroup,
/**
* Start a proxy server with a group
*
- * @param proxyGroup
+ * @param proxyGroup the proxy group
+ * @param memory the amount of heap memory
+ * @param processParameters the parameters for the process
+ * @param properties additional properties
*/
- public void startProxy(ProxyGroup proxyGroup, int memory, String[] processParameters, Document document) {
- startProxy(proxyGroup, memory, processParameters, null, new ArrayList<>(), document);
+ public void startProxy(ProxyGroup proxyGroup, int memory, String[] processParameters, Document properties) {
+ startProxy(proxyGroup, memory, processParameters, null, new ArrayList<>(), properties);
}
/**
* Start a proxy server with a group
*
- * @param proxyGroup
+ * @param wrapperInfo the wrapper to start the proxy on
+ * @param proxyGroup the proxy group
*/
public void startProxy(WrapperInfo wrapperInfo, ProxyGroup proxyGroup) {
startProxy(wrapperInfo, proxyGroup, proxyGroup.getMemory(), new String[] {});
@@ -593,7 +692,10 @@ public void startProxy(WrapperInfo wrapperInfo, ProxyGroup proxyGroup) {
/**
* Start a proxy server with a group
*
- * @param proxyGroup
+ * @param wrapperInfo the wrapper to start the proxy on
+ * @param proxyGroup the proxy group
+ * @param memory the amount of heap memory
+ * @param processParameters the parameters for the process
*/
public void startProxy(WrapperInfo wrapperInfo, ProxyGroup proxyGroup, int memory, String[] processParameters) {
startProxy(wrapperInfo, proxyGroup, memory, processParameters, null, new ArrayList<>(), new Document());
@@ -602,7 +704,13 @@ public void startProxy(WrapperInfo wrapperInfo, ProxyGroup proxyGroup, int memor
/**
* Start a proxy server with a group
*
- * @param proxyGroup
+ * @param wrapperInfo the wrapper to start the proxy on
+ * @param proxyGroup the proxy group
+ * @param memory the amount of heap memory
+ * @param processParameters the parameters for the process
+ * @param url the url to download the template from
+ * @param plugins a collection of plugins that should be installed
+ * @param properties additional properties
*/
public void startProxy(WrapperInfo wrapperInfo,
ProxyGroup proxyGroup,
@@ -634,52 +742,66 @@ public void startProxy(WrapperInfo wrapperInfo,
/**
* Start a proxy server with a group
*
- * @param proxyGroup
+ * @param wrapperInfo the wrapper to start the proxy on
+ * @param proxyGroup the proxy group
+ * @param memory the amount of heap memory
+ * @param processParameters the parameters for the process
+ * @param properties additional properties
*/
- public void startProxy(WrapperInfo wrapperInfo, ProxyGroup proxyGroup, int memory, String[] processParameters, Document document) {
- startProxy(wrapperInfo, proxyGroup, memory, processParameters, null, new ArrayList<>(), document);
+ public void startProxy(WrapperInfo wrapperInfo, ProxyGroup proxyGroup, int memory, String[] processParameters, Document properties) {
+ startProxy(wrapperInfo, proxyGroup, memory, processParameters, null, new ArrayList<>(), properties);
}
/**
- * Start a game server
+ * Start a new game server with full parameters
*
- * @param simpleServerGroup
+ * @param simpleServerGroup the server group to start
*/
public void startGameServer(SimpleServerGroup simpleServerGroup) {
startGameServer(simpleServerGroup, new ServerConfig(false, "extra", new Document(), System.currentTimeMillis()));
}
/**
- * Start a game server
+ * Start a new game server with full parameters
*
- * @param simpleServerGroup
+ * @param simpleServerGroup the server group to start
+ * @param serverConfig the custom server configuration
*/
public void startGameServer(SimpleServerGroup simpleServerGroup, ServerConfig serverConfig) {
startGameServer(simpleServerGroup, serverConfig, false);
}
/**
- * Start a game server
+ * Start a new game server with full parameters
*
- * @param simpleServerGroup
+ * @param simpleServerGroup the server group to start
+ * @param serverConfig the custom server configuration
+ * @param priorityStop whether priority stop is enabled
*/
public void startGameServer(SimpleServerGroup simpleServerGroup, ServerConfig serverConfig, boolean priorityStop) {
startGameServer(simpleServerGroup, serverConfig, simpleServerGroup.getMemory(), priorityStop);
}
/**
- * Start a game server
+ * Start a new game server with full parameters
*
- * @param simpleServerGroup
+ * @param simpleServerGroup the server group to start
+ * @param serverConfig the custom server configuration
+ * @param memory the amount of heap memory
+ * @param priorityStop whether priority stop is enabled
*/
public void startGameServer(SimpleServerGroup simpleServerGroup, ServerConfig serverConfig, int memory, boolean priorityStop) {
startGameServer(simpleServerGroup, serverConfig, memory, priorityStop, new Properties());
}
/**
- * Start a game server
+ * Start a new game server with full parameters
*
- * @param simpleServerGroup
+ * @param simpleServerGroup the server group to start
+ * @param serverConfig the custom server configuration
+ * @param memory the amount of heap memory
+ * @param priorityStop whether priority stop is enabled
+ * @param properties additional properties
*/
public void startGameServer(SimpleServerGroup simpleServerGroup,
ServerConfig serverConfig,
@@ -702,16 +824,17 @@ public void startGameServer(SimpleServerGroup simpleServerGroup,
/**
* Start a new game server with full parameters
*
- * @param simpleServerGroup
- * @param serverConfig
- * @param memory
- * @param processParameters
- * @param template
- * @param onlineMode
- * @param priorityStop
- * @param properties
- * @param url
- * @param plugins
+ * @param simpleServerGroup the server group to start
+ * @param serverConfig the custom server configuration
+ * @param memory the amount of heap memory
+ * @param processParameters the parameters for the process
+ * @param template the template to start
+ * @param customServerName the name of the server, null if default
+ * @param onlineMode whether online mode is enabled
+ * @param priorityStop whether priority stop is enabled
+ * @param url the url to download the template from
+ * @param plugins a collection of plugins that should be installed
+ * @param properties additional properties
*/
public void startGameServer(SimpleServerGroup simpleServerGroup,
ServerConfig serverConfig,
@@ -753,36 +876,46 @@ public void startGameServer(SimpleServerGroup simpleServerGroup,
}
/**
- * Start a game server
+ * Start a new game server with full parameters
*
- * @param simpleServerGroup
+ * @param simpleServerGroup the server group to start
+ * @param serverId a custom server id for this server
*/
public void startGameServer(SimpleServerGroup simpleServerGroup, String serverId) {
startGameServer(simpleServerGroup, new ServerConfig(false, "extra", new Document(), System.currentTimeMillis()), serverId);
}
/**
- * Start a game server
+ * Start a new game server with full parameters
*
- * @param simpleServerGroup
+ * @param simpleServerGroup the server group to start
+ * @param serverConfig the custom server configuration
+ * @param serverId a custom server id for this server
*/
public void startGameServer(SimpleServerGroup simpleServerGroup, ServerConfig serverConfig, String serverId) {
startGameServer(simpleServerGroup, serverConfig, false, serverId);
}
/**
- * Start a game server
+ * Start a new game server with full parameters
*
- * @param simpleServerGroup
+ * @param simpleServerGroup the server group to start
+ * @param serverConfig the custom server configuration
+ * @param priorityStop whether priority stop is enabled
+ * @param serverId a custom server id for this server
*/
public void startGameServer(SimpleServerGroup simpleServerGroup, ServerConfig serverConfig, boolean priorityStop, String serverId) {
startGameServer(simpleServerGroup, serverConfig, simpleServerGroup.getMemory(), priorityStop, serverId);
}
/**
- * Start a game server
+ * Start a new game server with full parameters
*
- * @param simpleServerGroup
+ * @param simpleServerGroup the server group to start
+ * @param serverConfig the custom server configuration
+ * @param memory the amount of heap memory
+ * @param priorityStop whether priority stop is enabled
+ * @param serverId a custom server id for this server
*/
public void startGameServer(SimpleServerGroup simpleServerGroup,
ServerConfig serverConfig,
@@ -793,9 +926,14 @@ public void startGameServer(SimpleServerGroup simpleServerGroup,
}
/**
- * Start a game server
+ * Start a new game server with full parameters
*
- * @param simpleServerGroup
+ * @param simpleServerGroup the server group to start
+ * @param serverConfig the custom server configuration
+ * @param memory the amount of heap memory
+ * @param priorityStop whether priority stop is enabled
+ * @param properties additional properties
+ * @param serverId a custom server id for this server
*/
public void startGameServer(SimpleServerGroup simpleServerGroup,
ServerConfig serverConfig,
@@ -822,16 +960,18 @@ public void startGameServer(SimpleServerGroup simpleServerGroup,
/**
* Start a new game server with full parameters
*
- * @param simpleServerGroup
- * @param serverConfig
- * @param memory
- * @param processParameters
- * @param template
- * @param onlineMode
- * @param priorityStop
- * @param properties
- * @param url
- * @param plugins
+ * @param simpleServerGroup the server group to start
+ * @param serverConfig the custom server configuration
+ * @param memory the amount of heap memory
+ * @param processParameters the parameters for the process
+ * @param template the template to start
+ * @param customServerName the name of the server, null if default
+ * @param onlineMode whether online mode is enabled
+ * @param priorityStop whether priority stop is enabled
+ * @param url the url to download the template from
+ * @param plugins a collection of plugins that should be installed
+ * @param properties additional properties
+ * @param serverId a custom server id for this server
*/
public void startGameServer(SimpleServerGroup simpleServerGroup,
ServerConfig serverConfig,
@@ -875,36 +1015,46 @@ public void startGameServer(SimpleServerGroup simpleServerGroup,
}
/**
- * Start a game server
+ * Start a new game server with full parameters
*
- * @param simpleServerGroup
+ * @param simpleServerGroup the server group to start
+ * @param template the template to start
*/
public void startGameServer(SimpleServerGroup simpleServerGroup, Template template) {
startGameServer(simpleServerGroup, new ServerConfig(false, "extra", new Document(), System.currentTimeMillis()), template);
}
/**
- * Start a game server
+ * Start a new game server with full parameters
*
- * @param simpleServerGroup
+ * @param simpleServerGroup the server group to start
+ * @param serverConfig the custom server configuration
+ * @param template the template to start
*/
public void startGameServer(SimpleServerGroup simpleServerGroup, ServerConfig serverConfig, Template template) {
startGameServer(simpleServerGroup, serverConfig, false, template);
}
/**
- * Start a game server
+ * Start a new game server with full parameters
*
- * @param simpleServerGroup
+ * @param simpleServerGroup the server group to start
+ * @param serverConfig the custom server configuration
+ * @param template the template to start
+ * @param priorityStop whether priority stop is enabled
*/
public void startGameServer(SimpleServerGroup simpleServerGroup, ServerConfig serverConfig, boolean priorityStop, Template template) {
startGameServer(simpleServerGroup, serverConfig, simpleServerGroup.getMemory(), priorityStop, template);
}
/**
- * Start a game server
+ * Start a new game server with full parameters
*
- * @param simpleServerGroup
+ * @param simpleServerGroup the server group to start
+ * @param serverConfig the custom server configuration
+ * @param memory the amount of heap memory
+ * @param template the template to start
+ * @param priorityStop whether priority stop is enabled
*/
public void startGameServer(SimpleServerGroup simpleServerGroup,
ServerConfig serverConfig,
@@ -915,9 +1065,14 @@ public void startGameServer(SimpleServerGroup simpleServerGroup,
}
/**
- * Start a game server
+ * Start a new game server with full parameters
*
- * @param simpleServerGroup
+ * @param simpleServerGroup the server group to start
+ * @param serverConfig the custom server configuration
+ * @param memory the amount of heap memory
+ * @param template the template to start
+ * @param priorityStop whether priority stop is enabled
+ * @param properties additional properties
*/
public void startGameServer(SimpleServerGroup simpleServerGroup,
ServerConfig serverConfig,
@@ -939,9 +1094,12 @@ public void startGameServer(SimpleServerGroup simpleServerGroup,
}
/**
- * Start a game server
+ * Start a new game server with full parameters
*
- * @param simpleServerGroup
+ * @param simpleServerGroup the server group to start
+ * @param serverConfig the custom server configuration
+ * @param template the template to start
+ * @param serverId a custom server id for this server
*/
public void startGameServer(SimpleServerGroup simpleServerGroup, ServerConfig serverConfig, Template template, String serverId) {
startGameServer(simpleServerGroup, serverConfig, false, template, serverId);
@@ -950,9 +1108,13 @@ public void startGameServer(SimpleServerGroup simpleServerGroup, ServerConfig se
/*==================================================================*/
/**
- * Start a game server
+ * Start a new game server with full parameters
*
- * @param simpleServerGroup
+ * @param simpleServerGroup the server group to start
+ * @param serverConfig the custom server configuration
+ * @param template the template to start
+ * @param priorityStop whether priority stop is enabled
+ * @param serverId a custom server id for this server
*/
public void startGameServer(SimpleServerGroup simpleServerGroup,
ServerConfig serverConfig,
@@ -963,9 +1125,14 @@ public void startGameServer(SimpleServerGroup simpleServerGroup,
}
/**
- * Start a game server
+ * Start a new game server with full parameters
*
- * @param simpleServerGroup
+ * @param simpleServerGroup the server group to start
+ * @param serverConfig the custom server configuration
+ * @param memory the amount of heap memory
+ * @param template the template to start
+ * @param priorityStop whether priority stop is enabled
+ * @param serverId a custom server id for this server
*/
public void startGameServer(SimpleServerGroup simpleServerGroup,
ServerConfig serverConfig,
@@ -977,9 +1144,15 @@ public void startGameServer(SimpleServerGroup simpleServerGroup,
}
/**
- * Start a game server
+ * Start a new game server with full parameters
*
- * @param simpleServerGroup
+ * @param simpleServerGroup the server group to start
+ * @param serverConfig the custom server configuration
+ * @param memory the amount of heap memory
+ * @param template the template to start
+ * @param priorityStop whether priority stop is enabled
+ * @param properties additional properties
+ * @param serverId a custom server id for this server
*/
public void startGameServer(SimpleServerGroup simpleServerGroup,
ServerConfig serverConfig,
@@ -1003,27 +1176,33 @@ public void startGameServer(SimpleServerGroup simpleServerGroup,
}
/**
- * Start a game server
+ * Start a new game server with full parameters
*
- * @param simpleServerGroup
+ * @param wrapperInfo the wrapper to start this server on
+ * @param simpleServerGroup the server group to start
*/
public void startGameServer(WrapperInfo wrapperInfo, SimpleServerGroup simpleServerGroup) {
startGameServer(wrapperInfo, simpleServerGroup, new ServerConfig(false, "extra", new Document(), System.currentTimeMillis()));
}
/**
- * Start a game server
+ * Start a new game server with full parameters
*
- * @param simpleServerGroup
+ * @param wrapperInfo the wrapper to start this server on
+ * @param simpleServerGroup the server group to start
+ * @param serverConfig the custom server configuration
*/
public void startGameServer(WrapperInfo wrapperInfo, SimpleServerGroup simpleServerGroup, ServerConfig serverConfig) {
startGameServer(wrapperInfo, simpleServerGroup, serverConfig, false);
}
/**
- * Start a game server
+ * Start a new game server with full parameters
*
- * @param simpleServerGroup
+ * @param wrapperInfo the wrapper to start this server on
+ * @param simpleServerGroup the server group to start
+ * @param serverConfig the custom server configuration
+ * @param priorityStop whether priority stop is enabled
*/
public void startGameServer(WrapperInfo wrapperInfo,
SimpleServerGroup simpleServerGroup,
@@ -1033,9 +1212,13 @@ public void startGameServer(WrapperInfo wrapperInfo,
}
/**
- * Start a game server
+ * Start a new game server with full parameters
*
- * @param simpleServerGroup
+ * @param wrapperInfo the wrapper to start this server on
+ * @param simpleServerGroup the server group to start
+ * @param serverConfig the custom server configuration
+ * @param memory the amount of heap memory
+ * @param priorityStop whether priority stop is enabled
*/
public void startGameServer(WrapperInfo wrapperInfo,
SimpleServerGroup simpleServerGroup,
@@ -1046,9 +1229,14 @@ public void startGameServer(WrapperInfo wrapperInfo,
}
/**
- * Start a game server
+ * Start a new game server with full parameters
*
- * @param simpleServerGroup
+ * @param wrapperInfo the wrapper to start this server on
+ * @param simpleServerGroup the server group to start
+ * @param serverConfig the custom server configuration
+ * @param memory the amount of heap memory
+ * @param priorityStop whether priority stop is enabled
+ * @param properties additional properties
*/
public void startGameServer(WrapperInfo wrapperInfo,
SimpleServerGroup simpleServerGroup,
@@ -1073,16 +1261,18 @@ public void startGameServer(WrapperInfo wrapperInfo,
/**
* Start a new game server with full parameters
*
- * @param simpleServerGroup
- * @param serverConfig
- * @param memory
- * @param processParameters
- * @param template
- * @param onlineMode
- * @param priorityStop
- * @param properties
- * @param url
- * @param plugins
+ * @param wrapperInfo the wrapper to start this server on
+ * @param simpleServerGroup the server group to start
+ * @param serverConfig the custom server configuration
+ * @param memory the amount of heap memory
+ * @param processParameters the parameters for the process
+ * @param template the template to start
+ * @param customServerName the name of the server, null if default
+ * @param onlineMode whether online mode is enabled
+ * @param priorityStop whether priority stop is enabled
+ * @param url the url to download the template from
+ * @param plugins a collection of plugins that should be installed
+ * @param properties additional properties
*/
public void startGameServer(WrapperInfo wrapperInfo,
SimpleServerGroup simpleServerGroup,
@@ -1127,9 +1317,15 @@ public void startGameServer(WrapperInfo wrapperInfo,
}
/**
- * Start a game server
+ * Start a new game server with full parameters
*
- * @param simpleServerGroup
+ * @param wrapperInfo the wrapper to start this server on
+ * @param simpleServerGroup the server group to start
+ * @param serverConfig the custom server configuration
+ * @param memory the amount of heap memory
+ * @param template the template to start
+ * @param priorityStop whether priority stop is enabled
+ * @param properties additional properties
*/
public void startGameServer(WrapperInfo wrapperInfo,
SimpleServerGroup simpleServerGroup,
@@ -1155,16 +1351,19 @@ public void startGameServer(WrapperInfo wrapperInfo,
/**
* Start a new game server with full parameters
*
- * @param simpleServerGroup
- * @param serverConfig
- * @param memory
- * @param processParameters
- * @param template
- * @param onlineMode
- * @param priorityStop
- * @param properties
- * @param url
- * @param plugins
+ * @param wrapperInfo the wrapper to start this server on
+ * @param simpleServerGroup the server group to start
+ * @param serverId the custom server id for this server
+ * @param serverConfig the custom server configuration
+ * @param memory the amount of heap memory
+ * @param processParameters the parameters for the process
+ * @param template the template to start
+ * @param customServerName the name of the server, null if default
+ * @param onlineMode whether online mode is enabled
+ * @param priorityStop whether priority stop is enabled
+ * @param url the url to download the template from
+ * @param plugins a collection of plugins that should be installed
+ * @param properties additional properties
*/
public void startGameServer(WrapperInfo wrapperInfo,
SimpleServerGroup simpleServerGroup,
@@ -1212,14 +1411,25 @@ public void startGameServer(WrapperInfo wrapperInfo,
}
/**
- * Start a Cloud-Server with those Properties
+ * Start a new cloud server with full parameters
+ *
+ * @param wrapperInfo the wrapper to start this server on
+ * @param serverName the name of this server
+ * @param memory the amount of heap memory
+ * @param priorityStop whether priority stop is enabled
*/
public void startCloudServer(WrapperInfo wrapperInfo, String serverName, int memory, boolean priorityStop) {
startCloudServer(wrapperInfo, serverName, new BasicServerConfig(), memory, priorityStop);
}
/**
- * Start a Cloud-Server with those Properties
+ * Start a new cloud server with full parameters
+ *
+ * @param wrapperInfo the wrapper to start this server on
+ * @param serverName the name of this server
+ * @param serverConfig the custom server configuration
+ * @param memory the amount of heap memory
+ * @param priorityStop whether priority stop is enabled
*/
public void startCloudServer(WrapperInfo wrapperInfo, String serverName, ServerConfig serverConfig, int memory, boolean priorityStop) {
startCloudServer(wrapperInfo,
@@ -1234,7 +1444,17 @@ public void startCloudServer(WrapperInfo wrapperInfo, String serverName, ServerC
}
/**
- * Start a Cloud-Server with those Properties
+ * Start a new cloud server with full parameters
+ *
+ * @param wrapperInfo the wrapper to start this server on
+ * @param serverName the name of this server
+ * @param serverConfig the custom server configuration
+ * @param memory the amount of heap memory
+ * @param priorityStop whether priority stop is enabled
+ * @param processPreParameters parameters for the java process
+ * @param plugins a collection of plugins that should be installed
+ * @param properties additional properties
+ * @param serverGroupType the type of server group to start
*/
public void startCloudServer(WrapperInfo wrapperInfo,
String serverName,
@@ -1270,14 +1490,23 @@ public void startCloudServer(WrapperInfo wrapperInfo,
}
/**
- * Start a Cloud-Server with those Properties
+ * Start a new cloud server with full parameters
+ *
+ * @param serverName the name of this server
+ * @param memory the amount of heap memory
+ * @param priorityStop whether priority stop is enabled
*/
public void startCloudServer(String serverName, int memory, boolean priorityStop) {
startCloudServer(serverName, new BasicServerConfig(), memory, priorityStop);
}
/**
- * Start a Cloud-Server with those Properties
+ * Start a new cloud server with full parameters
+ *
+ * @param serverName the name of this server
+ * @param serverConfig the custom server configuration
+ * @param memory the amount of heap memory
+ * @param priorityStop whether priority stop is enabled
*/
public void startCloudServer(String serverName, ServerConfig serverConfig, int memory, boolean priorityStop) {
startCloudServer(serverName,
@@ -1293,7 +1522,16 @@ public void startCloudServer(String serverName, ServerConfig serverConfig, int m
/*==========================================================================*/
/**
- * Start a Cloud-Server with those Properties
+ * Start a new cloud server with full parameters
+ *
+ * @param serverName the name of this server
+ * @param serverConfig the custom server configuration
+ * @param memory the amount of heap memory
+ * @param priorityStop whether priority stop is enabled
+ * @param processPreParameters parameters for the java process
+ * @param plugins a collection of plugins that should be installed
+ * @param properties additional properties
+ * @param serverGroupType the type of server group to start
*/
public void startCloudServer(String serverName,
ServerConfig serverConfig,
@@ -1326,37 +1564,41 @@ public void startCloudServer(String serverName,
}
/**
- * Update the CloudPlayer objective
+ * Updates a player on the master.
*
- * @param cloudPlayer
+ * @param cloudPlayer the player to update.
*/
public void updatePlayer(CloudPlayer cloudPlayer) {
this.logger.logp(Level.FINEST,
this.getClass().getSimpleName(),
"updatePlayer",
- String.format(String.format("Updating cloud player: %s", cloudPlayer)));
+ String.format("Updating cloud player: %s%n", cloudPlayer));
networkConnection.sendPacket(new PacketOutUpdatePlayer(CloudPlayer.newOfflinePlayer(cloudPlayer)));
}
/**
- * Updates a offlinePlayer Objective on the database
+ * Updates an offline player on the master.
*
- * @param offlinePlayer
+ * @param offlinePlayer the offline player to update.
*/
public void updatePlayer(OfflinePlayer offlinePlayer) {
this.logger.logp(Level.FINEST,
this.getClass().getSimpleName(),
"updatePlayer",
- String.format("Updating offline player: %s", offlinePlayer));
+ String.format("Updating offline player: %s%n", offlinePlayer));
networkConnection.sendPacket(new PacketOutUpdatePlayer(offlinePlayer));
}
/**
- * Returns all servers on network
+ * Collects and returns all currently running servers on the network.
+ * When calling this function on a proxy, the cache is used.
+ * On servers this queries the master.
+ *
+ * @return a collection containing all currently running servers.
*/
public Collection getServers() {
if (cloudService != null && cloudService.isProxyInstance()) {
- return new LinkedList<>(cloudService.getServers().values());
+ return new ArrayList<>(cloudService.getServers().values());
}
Result result = networkConnection.getPacketManager().sendQuery(new PacketAPIOutGetServers(), networkConnection);
@@ -1365,6 +1607,8 @@ public Collection getServers() {
/**
* Returns the ServerInfo from all CloudGameServers
+ *
+ * @return a collection containing all currently running cloud servers.
*/
public Collection getCloudServers() {
if (cloudService != null && cloudService.isProxyInstance()) {
@@ -1381,7 +1625,9 @@ public boolean isAccepted(ServerInfo serverInfo) {
}
/**
- * Returns all proxyInfos on network
+ * Queries the master for all running proxies.
+ *
+ * @return a collection containing all running proxies.
*/
public Collection getProxys() {
Result result = networkConnection.getPacketManager().sendQuery(new PacketAPIOutGetProxys(), networkConnection);
@@ -1389,9 +1635,11 @@ public Collection getProxys() {
}
/**
- * Returns the ProxyInfos from all proxys in the group #group
+ * Queries the master for all running proxies in the given group.
+ *
+ * @param group the name of the proxy group to get the proxies for.
*
- * @param group
+ * @return a collection containing all running proxies of the given proxy group.
*/
public Collection getProxys(String group) {
Result result = networkConnection.getPacketManager().sendQuery(new PacketAPIOutGetProxys(group), networkConnection);
@@ -1399,7 +1647,10 @@ public Collection getProxys(String group) {
}
/**
- * Returns all OnlinePlayers on Network
+ * Returns all players currently online on the network.
+ * This methods queries the master so it may take a short moment.
+ *
+ * @return all players currently online.
*/
public Collection getOnlinePlayers() {
Result result = networkConnection.getPacketManager().sendQuery(new PacketAPIOutGetPlayers(), networkConnection);
@@ -1418,7 +1669,12 @@ public Collection getOnlinePlayers() {
}
/**
- * Retuns a online CloudPlayer on network or null if the player isn't online
+ * Returns an online player by their UUID.
+ * If the player is not cached, the master is queried.
+ *
+ * @param uniqueId the UUID of the player.
+ *
+ * @return the online player or null, if the player is not currently online on the network.
*/
public CloudPlayer getOnlinePlayer(UUID uniqueId) {
CloudPlayer instance = checkAndGet(uniqueId);
@@ -1440,9 +1696,12 @@ private CloudPlayer checkAndGet(UUID uniqueId) {
}
/**
- * Returns a offline player which registerd or null
+ * Returns an online player by their UUID.
+ * If the player is not cached, the master is queried.
+ *
+ * @param uniqueId the UUID of the player.
*
- * @param uniqueId
+ * @return the online player or null, if the player is not currently online on the network.
*/
public OfflinePlayer getOfflinePlayer(UUID uniqueId) {
CloudPlayer cloudPlayer = checkAndGet(uniqueId);
@@ -1455,9 +1714,12 @@ public OfflinePlayer getOfflinePlayer(UUID uniqueId) {
}
/**
- * Returns a offline player which registerd or null
+ * Returns an offline player by their exact name.
+ * If the player is not cached, the master is queried.
*
- * @param name
+ * @param name the exact name of the player.
+ *
+ * @return the offline player or null, if the player is not registered on the network.
*/
public OfflinePlayer getOfflinePlayer(String name) {
CloudPlayer cloudPlayer = checkAndGet(name);
@@ -1474,9 +1736,11 @@ private CloudPlayer checkAndGet(String name) {
}
/**
- * Returns the ServerGroup from the name or null
+ * Queries the master for a server group based on the given name.
+ *
+ * @param name the name of the server group.
*
- * @param name
+ * @return the server group object or null, if it doesn't exist.
*/
public ServerGroup getServerGroup(String name) {
Result result = networkConnection.getPacketManager().sendQuery(new PacketAPIOutGetServerGroup(name), networkConnection);
@@ -1484,7 +1748,12 @@ public ServerGroup getServerGroup(String name) {
}
/**
- * Returns from a registerd Player the uniqueId or null if the player doesn't exists
+ * Queries the unique id of the player with the given name.
+ *
+ * @param name the name of the player; case-insensitive.
+ *
+ * @return the unique id of the player with the given name or {@code null},
+ * if the player is not registered on the network.
*/
public UUID getPlayerUniqueId(String name) {
Result result = networkConnection.getPacketManager().sendQuery(new PacketAPIOutNameUUID(name), networkConnection);
@@ -1492,7 +1761,12 @@ public UUID getPlayerUniqueId(String name) {
}
/**
- * Returns from a registerd Player the name or null if the player doesn't exists
+ * Queries the name of the player with the given unique id.
+ *
+ * @param uniqueId the unique id of the player.
+ *
+ * @return the name of the player with the given unique id or {@code null},
+ * if the player is not registered on the network.
*/
public String getPlayerName(UUID uniqueId) {
Result result = networkConnection.getPacketManager().sendQuery(new PacketAPIOutNameUUID(uniqueId), networkConnection);
@@ -1500,7 +1774,11 @@ public String getPlayerName(UUID uniqueId) {
}
/**
- * Returns the ServerInfo from one gameServer where serverName = serverId
+ * Queries the master for the server information about a specific server.
+ *
+ * @param serverName the server id to query for.
+ *
+ * @return the server information of the server with the given sever id.
*/
public ServerInfo getServerInfo(String serverName) {
Result result = networkConnection.getPacketManager().sendQuery(new PacketAPIOutGetServer(serverName), networkConnection);
@@ -1508,9 +1786,10 @@ public ServerInfo getServerInfo(String serverName) {
}
/**
- * Returns a Document with all collected statistics
+ * Returns a document with all collected statistics.
+ * This method queries the master.
*
- * @return
+ * @return a document with collected statistics.
*/
public Document getStatistics() {
Result result = networkConnection.getPacketManager().sendQuery(new PacketAPIOutGetStatistic(), networkConnection);
@@ -1520,7 +1799,11 @@ public Document getStatistics() {
/*================================================================================*/
/**
+ * Copies the given directory from the currently running server to its template.
+ * This is done by requesting the master to handle the instructions for the wrapper.
*
+ * @param serverInfo the information about the currently running server.
+ * @param directory the directory which will be copied to the running server's template.
*/
public void copyDirectory(ServerInfo serverInfo, String directory) {
if (serverInfo == null || directory == null) {
@@ -1530,9 +1813,7 @@ public void copyDirectory(ServerInfo serverInfo, String directory) {
networkConnection.sendPacket(new PacketOutCopyDirectory(serverInfo, directory));
}
- /**
- * Unsafe Method
- */
+
@Deprecated
private Map getRegisteredPlayers() {
Result result = networkConnection.getPacketManager().sendQuery(new PacketAPIOutGetRegisteredPlayers(), networkConnection);
diff --git a/cloudnet-api/cloudnet-api-core/src/main/java/de/dytanic/cloudnet/api/handlers/NetworkHandler.java b/cloudnet-api/cloudnet-api-core/src/main/java/de/dytanic/cloudnet/api/handlers/NetworkHandler.java
index 97cbfe07f..720d4e1be 100644
--- a/cloudnet-api/cloudnet-api-core/src/main/java/de/dytanic/cloudnet/api/handlers/NetworkHandler.java
+++ b/cloudnet-api/cloudnet-api-core/src/main/java/de/dytanic/cloudnet/api/handlers/NetworkHandler.java
@@ -21,106 +21,110 @@ public interface NetworkHandler {
/**
* Called if a new server was add into the network
*
- * @param serverInfo
+ * @param serverInfo the server info
*/
void onServerAdd(ServerInfo serverInfo);
/**
* Called if the ServerInfo is updated from a game server
*
- * @param serverInfo
+ * @param serverInfo the server info
*/
void onServerInfoUpdate(ServerInfo serverInfo);
/**
* Called if a game server was removed
*
- * @param serverInfo
+ * @param serverInfo the server info
*/
void onServerRemove(ServerInfo serverInfo);
/**
* Called if one proxy server was add into the network
+ *
+ * @param proxyInfo the proxy info
*/
void onProxyAdd(ProxyInfo proxyInfo);
/**
* Called if the proxyinfo from some proxy server was updated
*
- * @param proxyInfo
+ * @param proxyInfo the proxy info
*/
void onProxyInfoUpdate(ProxyInfo proxyInfo);
/**
* Called if some proxy server is disconnected from network
*
- * @param proxyInfo
+ * @param proxyInfo the proxy info
*/
void onProxyRemove(ProxyInfo proxyInfo);
/**
* Called if the cloudnetwork object is updated
*
- * @param cloudNetwork
+ * @param cloudNetwork the cloud network instance
*/
void onCloudNetworkUpdate(CloudNetwork cloudNetwork);
/**
* Called if a custom channel message was received
*
- * @param channel
- * @param message
- * @param document
+ * @param channel the channel
+ * @param message the custom message
+ * @param document the accompanying document
*/
void onCustomChannelMessageReceive(String channel, String message, Document document);
/**
* Called if a custom channel message was received
*
- * @param channel
- * @param message
- * @param document
+ * @param channel the channel
+ * @param message the custom message
+ * @param document the accompanying document
*/
void onCustomSubChannelMessageReceive(String channel, String message, Document document);
/**
* Called if a Player Login to the network from the cloudnet successfully
*
- * @param cloudPlayer
+ * @param cloudPlayer the player
*/
void onPlayerLoginNetwork(CloudPlayer cloudPlayer);
/**
* Called if a Player Disconnect to the network from cloudnet
*
- * @param cloudPlayer
+ * @param cloudPlayer the player
*/
void onPlayerDisconnectNetwork(CloudPlayer cloudPlayer);
/**
* Called if a Player Disconnect to the network from cloudnet
*
- * @param cloudPlayer
+ * @param uniqueId the UUID of the player
*/
void onPlayerDisconnectNetwork(UUID uniqueId);
/**
* Called if a Player was updated on network
*
- * @param cloudPlayer
+ * @param cloudPlayer the player
*/
void onPlayerUpdate(CloudPlayer cloudPlayer);
/**
* Called if a OfflinePlayer was updated
+ *
+ * @param offlinePlayer the offline player
*/
void onOfflinePlayerUpdate(OfflinePlayer offlinePlayer);
/**
* Called if the player online count was changed
*
- * @param onlineCount
+ * @param onlineCount the online count
*/
void onUpdateOnlineCount(int onlineCount);
-}
\ No newline at end of file
+}
diff --git a/cloudnet-api/cloudnet-api-core/src/main/java/de/dytanic/cloudnet/api/handlers/NetworkHandlerProvider.java b/cloudnet-api/cloudnet-api-core/src/main/java/de/dytanic/cloudnet/api/handlers/NetworkHandlerProvider.java
index e2b0b45b0..a22d51f5c 100644
--- a/cloudnet-api/cloudnet-api-core/src/main/java/de/dytanic/cloudnet/api/handlers/NetworkHandlerProvider.java
+++ b/cloudnet-api/cloudnet-api-core/src/main/java/de/dytanic/cloudnet/api/handlers/NetworkHandlerProvider.java
@@ -20,7 +20,7 @@ public class NetworkHandlerProvider {
/**
* Registerd a network Handler
*
- * @param networkHandler
+ * @param networkHandler the handler to register
*/
public void registerHandler(NetworkHandler networkHandler) {
this.handlers.add(networkHandler);
@@ -29,7 +29,7 @@ public void registerHandler(NetworkHandler networkHandler) {
/**
* Iteration of all registed Handlers
*
- * @param handlerTask
+ * @param handlerTask the task to run on every network handler
*/
public void iterator(Runnabled handlerTask) {
CollectionWrapper.iterator(handlers, handlerTask);
diff --git a/cloudnet-api/pom.xml b/cloudnet-api/pom.xml
index b2804d4ed..edb5b57bc 100644
--- a/cloudnet-api/pom.xml
+++ b/cloudnet-api/pom.xml
@@ -21,20 +21,32 @@
- cloudnet-repo
- https://cloudnetservice.eu/repositories
+ cloudnet
+ CloudNet Snapshot Repository
+ https://repo.cloudnetservice.eu/repository/snapshots/
+
+ false
+
+
+ true
+
spigot-repo
https://hub.spigotmc.org/nexus/content/repositories/snapshots/
+
+
+ bungeecord-repo
+ https://oss.sonatype.org/content/repositories/snapshots
+
net.md-5
- bungeecord-bootstrap
+ bungeecord-api
${dependency.bungeecord.version}
provided
@@ -50,6 +62,10 @@
com.google.guava
guava
+
+ net.md-5
+ bungeecord-chat
+
diff --git a/cloudnet-cord/cloudnet-cloudflare/src/main/java/de/dytanic/cloudnet/cloudflare/CloudFlareService.java b/cloudnet-cord/cloudnet-cloudflare/src/main/java/de/dytanic/cloudnet/cloudflare/CloudFlareService.java
index 0612a0ae4..379cbe831 100644
--- a/cloudnet-cord/cloudnet-cloudflare/src/main/java/de/dytanic/cloudnet/cloudflare/CloudFlareService.java
+++ b/cloudnet-cord/cloudnet-cloudflare/src/main/java/de/dytanic/cloudnet/cloudflare/CloudFlareService.java
@@ -115,8 +115,7 @@ public void deleteRecord(PostResponse postResponse) {
try {
HttpURLConnection delete = (HttpURLConnection) new URL(PREFIX_URL + "zones/" + postResponse.getCloudFlareConfig()
- .getZoneId() + "/dns_records/" + postResponse
- .getId()).openConnection();
+ .getZoneId() + "/dns_records/" + postResponse.getId()).openConnection();
delete.setRequestMethod("DELETE");
delete.setRequestProperty("X-Auth-Email", postResponse.getCloudFlareConfig().getEmail());
@@ -143,7 +142,8 @@ public void deleteRecord(PostResponse postResponse) {
/**
* Creates a new DNS record in the configured zone.
*
- * @param dnsRecord the record to create
+ * @param cloudFlareConfig the configuration of the module
+ * @param dnsRecord the record to create
*
* @return the response from CloudFlare or null on failure
*/
@@ -236,8 +236,7 @@ public void addProxy(ProxyProcessMeta proxyServer, CloudFlareDatabase cloudFlare
if (cloudFlareProxyGroup.getSub().startsWith("@")) {
srvRecord = new SRVRecord("_minecraft._tcp." + cloudFlareConfig.getDomainName(),
"SRV 1 1 " + proxyServer.getPort() + ' ' + proxyServer.getServiceId()
- .getWrapperId() + '.' + cloudFlareConfig
- .getDomainName(),
+ .getWrapperId() + '.' + cloudFlareConfig.getDomainName(),
"_minecraft",
"_tcp",
cloudFlareConfig.getDomainName(),
@@ -248,8 +247,7 @@ public void addProxy(ProxyProcessMeta proxyServer, CloudFlareDatabase cloudFlare
} else {
srvRecord = new SRVRecord("_minecraft._tcp." + cloudFlareConfig.getDomainName(),
"SRV 1 1 " + proxyServer.getPort() + ' ' + proxyServer.getServiceId()
- .getWrapperId() + '.' + cloudFlareConfig
- .getDomainName(),
+ .getWrapperId() + '.' + cloudFlareConfig.getDomainName(),
"_minecraft",
"_tcp",
cloudFlareProxyGroup.getSub(),
@@ -271,7 +269,8 @@ public void addProxy(ProxyProcessMeta proxyServer, CloudFlareDatabase cloudFlare
/**
* Returns the first {@link CloudFlareProxyGroup} for a given {@code group} name.
*
- * @param group the CloudFlare Proxy Group to search for
+ * @param cloudFlareConfig the configuration of this module
+ * @param group the CloudFlare Proxy Group to search for
*
* @return the CloudFlareProxyGroup with the given group or null
*/
@@ -292,10 +291,10 @@ public void removeProxy(ProxyProcessMeta proxyServer, CloudFlareDatabase cloudFl
new Acceptable>() {
@Override
public boolean isAccepted(MultiValue postResponseStringMultiValue) {
- return postResponseStringMultiValue
- .getSecond()
- .equalsIgnoreCase(proxyServer.getServiceId()
- .getServerId());
+ return postResponseStringMultiValue.getSecond()
+ .equalsIgnoreCase(
+ proxyServer.getServiceId()
+ .getServerId());
}
});
diff --git a/cloudnet-cord/cloudnet-log/src/main/java/de/dytanic/cloudnet/logging/CloudLogger.java b/cloudnet-cord/cloudnet-log/src/main/java/de/dytanic/cloudnet/logging/CloudLogger.java
index c4d5a110e..6865f3bff 100644
--- a/cloudnet-cord/cloudnet-log/src/main/java/de/dytanic/cloudnet/logging/CloudLogger.java
+++ b/cloudnet-cord/cloudnet-log/src/main/java/de/dytanic/cloudnet/logging/CloudLogger.java
@@ -49,9 +49,6 @@ public class CloudLogger extends Logger {
*/
public CloudLogger() throws IOException, NoSuchFieldException, IllegalAccessException {
super("CloudNetServerLogger", null);
- Field field = Charset.class.getDeclaredField("defaultCharset");
- field.setAccessible(true);
- field.set(null, StandardCharsets.UTF_8);
if (!Files.exists(Paths.get("local"))) {
Files.createDirectory(Paths.get("local"));
diff --git a/cloudnet-cord/cloudnet-setup/src/main/java/de/dytanic/cloudnet/setup/spigot/PaperBuilder.java b/cloudnet-cord/cloudnet-setup/src/main/java/de/dytanic/cloudnet/setup/spigot/PaperBuilder.java
index 7cc609199..150b4148f 100644
--- a/cloudnet-cord/cloudnet-setup/src/main/java/de/dytanic/cloudnet/setup/spigot/PaperBuilder.java
+++ b/cloudnet-cord/cloudnet-setup/src/main/java/de/dytanic/cloudnet/setup/spigot/PaperBuilder.java
@@ -29,6 +29,7 @@ public final class PaperBuilder {
* Start the process of choice the paper version And build after choice
*
* @param reader Read the answer from console
+ * @param outputPath the path to write to
*/
public static boolean start(ConsoleReader reader, Path outputPath) {
try {
diff --git a/cloudnet-cord/cloudnet-setup/src/main/java/de/dytanic/cloudnet/setup/spigot/SpigotBuilder.java b/cloudnet-cord/cloudnet-setup/src/main/java/de/dytanic/cloudnet/setup/spigot/SpigotBuilder.java
index aa6c3f779..3eb301317 100644
--- a/cloudnet-cord/cloudnet-setup/src/main/java/de/dytanic/cloudnet/setup/spigot/SpigotBuilder.java
+++ b/cloudnet-cord/cloudnet-setup/src/main/java/de/dytanic/cloudnet/setup/spigot/SpigotBuilder.java
@@ -26,7 +26,8 @@ public final class SpigotBuilder {
/**
* Start the process to choice the Spigot version And build after choice
*
- * @param reader to read the answer
+ * @param reader to read the answer
+ * @param outputPath the path to write to
*/
public static boolean start(final ConsoleReader reader, Path outputPath) {
System.out.println("Fetching Spigot versions");
diff --git a/cloudnet-cord/cloudnet-web/src/main/java/de/dytanic/cloudnet/web/client/WebClient.java b/cloudnet-cord/cloudnet-web/src/main/java/de/dytanic/cloudnet/web/client/WebClient.java
index fb932a442..e01de2cf7 100644
--- a/cloudnet-cord/cloudnet-web/src/main/java/de/dytanic/cloudnet/web/client/WebClient.java
+++ b/cloudnet-cord/cloudnet-web/src/main/java/de/dytanic/cloudnet/web/client/WebClient.java
@@ -175,6 +175,8 @@ private boolean getEnvironment() {
/**
* Update the local wrapper (only on the master)
+ *
+ * @param outputPath the path to write the wrapper file to
*/
public void updateLocalCloudWrapper(Path outputPath) {
try {
diff --git a/cloudnet-core/src/main/java/de/dytanic/cloudnetcore/api/CoreModule.java b/cloudnet-core/src/main/java/de/dytanic/cloudnetcore/api/CoreModule.java
index 8357a6d9e..4111b4251 100644
--- a/cloudnet-core/src/main/java/de/dytanic/cloudnetcore/api/CoreModule.java
+++ b/cloudnet-core/src/main/java/de/dytanic/cloudnetcore/api/CoreModule.java
@@ -16,18 +16,15 @@
public class CoreModule extends Module {
/**
- * Registered a IEventListener objective to a Event Class
+ * Registered a IEventListener objective to an Event Class
*
- * @param eventListener
- * @param
+ * @param eventListener the event listener that should be registered
+ * @param the type of the event
*/
public void registerListener(IEventListener eventListener) {
CloudNet.getInstance().getEventManager().registerListener(this, eventListener);
}
- /**
- *
- */
public void appendModuleProperty(String key, Object value) {
CloudNet.getInstance().getNetworkManager().getModuleProperties().append(key, value);
}
@@ -35,7 +32,7 @@ public void appendModuleProperty(String key, Object value) {
/**
* Registered a command
*
- * @param command
+ * @param command the command to register
*/
public void registerCommand(Command command) {
CloudNet.getInstance().getCommandManager().registerCommand(command);
diff --git a/cloudnet-core/src/main/java/de/dytanic/cloudnetcore/network/CloudNetServer.java b/cloudnet-core/src/main/java/de/dytanic/cloudnetcore/network/CloudNetServer.java
index 2d1afe2c9..4d5d82388 100644
--- a/cloudnet-core/src/main/java/de/dytanic/cloudnetcore/network/CloudNetServer.java
+++ b/cloudnet-core/src/main/java/de/dytanic/cloudnetcore/network/CloudNetServer.java
@@ -13,6 +13,8 @@
import io.netty.handler.ssl.util.SelfSignedCertificate;
import joptsimple.OptionSet;
+import java.net.InetSocketAddress;
+
/**
* Created by Tareko on 26.05.2017.
*/
@@ -96,32 +98,21 @@ protected void initChannel(Channel channel) {
return;
}
- String[] address = channel.remoteAddress().toString().split(":");
- String host = address[0].replaceFirst(NetworkUtils.SLASH_STRING, NetworkUtils.EMPTY_STRING);
- for (Wrapper cn : CloudNet.getInstance().getWrappers().values()) {
- if (cn.getChannel() == null && cn.getNetworkInfo().getHostName().equalsIgnoreCase(host)) {
- if (sslContext != null) {
- channel.pipeline().addLast(sslContext.newHandler(channel.alloc()));
- }
+ if (channel.remoteAddress() instanceof InetSocketAddress) {
+ InetSocketAddress address = (InetSocketAddress) channel.remoteAddress();
+ final String hostAddress = address.getAddress().getHostAddress();
- NetworkUtils.initChannel(channel);
- channel.pipeline().addLast("client", new CloudNetClientAuth(channel, this));
- return;
- }
+ for (Wrapper wrapper : CloudNet.getInstance().getWrappers().values()) {
+ if (wrapper.getNetworkInfo().getHostName().equals(hostAddress)) {
- if (cn.getNetworkInfo().getHostName().equals(host)) {
- if (sslContext != null) {
- channel.pipeline().addLast(sslContext.newHandler(channel.alloc()));
+ NetworkUtils.initChannel(channel);
+ channel.pipeline().addLast("client", new CloudNetClientAuth(channel, this));
+ return;
}
-
- NetworkUtils.initChannel(channel);
- CloudNetClientAuth cloudNetProxyClientAuth = new CloudNetClientAuth(channel, this);
- channel.pipeline().addLast("client", cloudNetProxyClientAuth);
- return;
}
}
- channel.close().addListener(ChannelFutureListener.CLOSE_ON_FAILURE).addListener(ChannelFutureListener.CLOSE_ON_FAILURE);
+ channel.close().addListener(ChannelFutureListener.CLOSE_ON_FAILURE);
}
}
diff --git a/cloudnet-examples/pom.xml b/cloudnet-examples/pom.xml
index c6911e87d..351edc0f8 100644
--- a/cloudnet-examples/pom.xml
+++ b/cloudnet-examples/pom.xml
@@ -38,8 +38,8 @@
net.md-5
- bungeecord-bootstrap
- 1.8-1.12
+ bungeecord-api
+ ${dependency.bungeecord.version}
provided
diff --git a/cloudnet-lib/src/main/java/de/dytanic/cloudnet/lib/utility/document/Document.java b/cloudnet-lib/src/main/java/de/dytanic/cloudnet/lib/utility/document/Document.java
index 27822f8d6..834ec496a 100644
--- a/cloudnet-lib/src/main/java/de/dytanic/cloudnet/lib/utility/document/Document.java
+++ b/cloudnet-lib/src/main/java/de/dytanic/cloudnet/lib/utility/document/Document.java
@@ -9,6 +9,7 @@
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
+import java.text.DateFormat;
import java.util.*;
/**
@@ -17,10 +18,13 @@
public class Document implements DocumentAbstract {
protected static final JsonParser PARSER = new JsonParser();
- public static Gson GSON = new GsonBuilder().serializeNulls().setPrettyPrinting().disableHtmlEscaping().create();
+ public static Gson GSON = new GsonBuilder().serializeNulls()
+ .setPrettyPrinting()
+ .disableHtmlEscaping()
+ .setDateFormat(DateFormat.MEDIUM)
+ .create();
protected String name;
protected JsonObject dataCatcher;
- private File file;
public Document(String name) {
this.name = name;
@@ -32,11 +36,6 @@ public Document(String name, JsonObject source) {
this.dataCatcher = source;
}
- public Document(File file, JsonObject jsonObject) {
- this.file = file;
- this.dataCatcher = jsonObject;
- }
-
public Document(String key, String value) {
this.dataCatcher = new JsonObject();
this.append(key, value);
@@ -287,14 +286,6 @@ public void setName(String name) {
this.name = name;
}
- public File getFile() {
- return file;
- }
-
- public void setFile(File file) {
- this.file = file;
- }
-
public JsonObject obj() {
return dataCatcher;
}
@@ -387,7 +378,6 @@ public Document loadToExistingDocument(File backend) {
try (InputStreamReader reader = new InputStreamReader(new FileInputStream(backend), "UTF-8")) {
this.dataCatcher = PARSER.parse(reader).getAsJsonObject();
- this.file = backend;
return this;
} catch (Exception ex) {
ex.getStackTrace();
diff --git a/cloudnet-tools/pom.xml b/cloudnet-tools/pom.xml
index 0fa45cb7b..b0e0aff74 100644
--- a/cloudnet-tools/pom.xml
+++ b/cloudnet-tools/pom.xml
@@ -20,10 +20,6 @@
-
- cloudnet-repo
- https://cloudnetservice.eu/repositories
-
spigot-repo
diff --git a/cloudnet-wrapper/src/main/java/de/dytanic/cloudnetwrapper/CloudNetWrapperConfig.java b/cloudnet-wrapper/src/main/java/de/dytanic/cloudnetwrapper/CloudNetWrapperConfig.java
index 4343a90b0..9a3708a9c 100644
--- a/cloudnet-wrapper/src/main/java/de/dytanic/cloudnetwrapper/CloudNetWrapperConfig.java
+++ b/cloudnet-wrapper/src/main/java/de/dytanic/cloudnetwrapper/CloudNetWrapperConfig.java
@@ -71,7 +71,7 @@ public CloudNetWrapperConfig(ConsoleReader reader) throws Exception {
wrapperId = reader.readLine().replace(NetworkUtils.SPACE_STRING, NetworkUtils.EMPTY_STRING);
if (wrapperId.isEmpty()) {
- wrapperId = "Wrapper-" + NetworkUtils.RANDOM.nextInt();
+ wrapperId = "Wrapper-1";
}
}
diff --git a/cloudnet-wrapper/src/main/java/de/dytanic/cloudnetwrapper/bootstrap/CloudBootstrap.java b/cloudnet-wrapper/src/main/java/de/dytanic/cloudnetwrapper/bootstrap/CloudBootstrap.java
index 10dfa17f3..221e8ff69 100644
--- a/cloudnet-wrapper/src/main/java/de/dytanic/cloudnetwrapper/bootstrap/CloudBootstrap.java
+++ b/cloudnet-wrapper/src/main/java/de/dytanic/cloudnetwrapper/bootstrap/CloudBootstrap.java
@@ -118,7 +118,7 @@ public static void main(String[] args) throws Exception {
String user = System.getProperty("user.name");
- while (true) {
+ while (!Thread.interrupted()) {
try {
while ((commandLine = cloudNetLogging.readLine(user + '@' + cloudNetWrapper.getWrapperConfig()
.getWrapperId() + " $ ")) != null) {
@@ -132,11 +132,11 @@ public static void main(String[] args) throws Exception {
}
}
} catch (Exception ex) {
-
+ ex.printStackTrace();
}
}
} else {
- while (true) {
+ while (!Thread.interrupted()) {
NetworkUtils.sleepUninterruptedly(Long.MAX_VALUE);
}
}
diff --git a/cloudnet-wrapper/src/main/java/de/dytanic/cloudnetwrapper/bootstrap/CloudNetLauncher.java b/cloudnet-wrapper/src/main/java/de/dytanic/cloudnetwrapper/bootstrap/CloudNetLauncher.java
index 82e0ad4d2..3725a29aa 100644
--- a/cloudnet-wrapper/src/main/java/de/dytanic/cloudnetwrapper/bootstrap/CloudNetLauncher.java
+++ b/cloudnet-wrapper/src/main/java/de/dytanic/cloudnetwrapper/bootstrap/CloudNetLauncher.java
@@ -11,7 +11,7 @@ public class CloudNetLauncher {
public static void main(String[] args) throws Exception {
if (Float.parseFloat(System.getProperty("java.class.version")) < 52D) {
- System.out.println("This application needs Java 8 or 10.0.1");
+ System.out.println("This application needs Java 8");
return;
}
diff --git a/pom.xml b/pom.xml
index 8fff1bd27..2b2d93653 100644
--- a/pom.xml
+++ b/pom.xml
@@ -18,27 +18,29 @@
1.8
UTF-8
UTF-8
- 2.1.17
+ 2.1.18
RELEASE
- 4.1.42.Final
- 2.8.6
+ 4.1.65.Final
+ 2.8.7
2.14.6
5.0.4
- 1.25
- 1.8-1.12
+ 1.29
+ 1.17-R0.1-SNAPSHOT
1.8.8-R0.1-SNAPSHOT
1.7
- 0.6.1
+ 0.6.3
- 4.12
+ 4.13.2
- 3.2.1
- 3.1.1
- 3.1.2
- 3.1.0
- 1.8
- 3.1.0
+ 3.2.4
+ 3.3.0
+ 3.9.1
+ 3.2.0
+ 3.2.0
+ 3.0.0
+ 3.2.1
+ 3.1.2
@@ -47,6 +49,35 @@
Tarek H.
https://dytanic.de
+
+ GiantTreeLP
+ GiantTree
+ CloudNetService
+
+
+ TheMeinerLP
+ TheMeinerLP
+
+
+ byRoadrunner
+ byRoadrunner
+ CloudNetService
+
+
+ derrop
+ derrop
+ CloudNetService
+
+
+ Sarsum
+ Sarsum
+ CloudNetService
+
+
+ derklaro
+ derklaro
+ CloudNetService
+
@@ -59,50 +90,90 @@
cloudnet-modules
-
-
-
- org.apache.maven.plugins
- maven-javadoc-plugin
- ${plugin.javadoc.version}
-
- private
- -Xdoclint:none
-
-
-
- attach-javadocs
-
- jar
-
-
-
- aggregate
-
- aggregate-jar
-
- site
+
+
+ cloudnet
+ https://repo.cloudnetservice.eu/repository/releases/
+
+
+ cloudnet
+ https://repo.cloudnetservice.eu/repository/snapshots/
+
+
+
+
+
+ deployment
+
+
+
+ org.apache.maven.plugins
+ maven-site-plugin
+ ${plugin.site.version}
+
+
+ org.apache.maven.plugins
+ maven-javadoc-plugin
+ ${plugin.javadoc.version}
private
- -Xdoclint:none
-
+ -Xdoclint:none
-
-
-
-
- org.apache.maven.plugins
- maven-source-plugin
- ${plugin.source.version}
-
-
- attach-sources
-
- jar
-
-
-
-
-
-
+
+
+ attach-javadocs
+
+ jar
+
+
+
+ aggregate
+
+ aggregate-jar
+
+ site
+
+ private
+ -Xdoclint:none
+
+ -html5
+ true
+ true
+
+
+ org.spigotmc
+ spigot-api
+ https://hub.spigotmc.org/javadocs/bukkit
+
+
+ com.google.code.gson
+ gson
+ https://static.javadoc.io/com.google.code.gson/gson/2.8.7/
+
+
+ io.netty
+ https://netty.io/4.1/api
+
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-source-plugin
+ ${plugin.source.version}
+
+
+ attach-sources
+
+ jar
+
+
+
+
+
+
+
+