Skip to content
This repository was archived by the owner on Jun 7, 2022. It is now read-only.
11 changes: 5 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
[![Build Status](https://ci.cloudnetservice.eu/buildStatus/icon?job=CloudNetService/CloudNet/master)](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).

[![star this repo](http://githubbadges.com/star.svg?user=CloudNetService&repo=CloudNet)](https://github.com/CloudNetService/CloudNet)
[![fork this repo](http://githubbadges.com/fork.svg?user=CloudNetService&repo=CloudNet)](https://github.com/CloudNetService/CloudNet/fork)
[![GitHub license](https://img.shields.io/github/license/CloudNetService/CloudNet.svg)](https://github.com/CloudNetService/CloudNet/blob/master/LICENSE)

[![DepShield Badge](https://depshield.sonatype.org/badges/CloudNetService/CloudNet/depshield.svg)](https://depshield.github.io)
[![GitHub issues](https://img.shields.io/github/issues/CloudNetService/CloudNet.svg)](https://github.com/CloudNetService/CloudNet/issues)
[![GitHub contributors](https://img.shields.io/github/contributors/CloudNetService/CloudNet.svg)](https://github.com/CloudNetService/CloudNet/graphs/contributors)
[![Github All Releases](https://img.shields.io/github/downloads/CloudNetService/CloudNet/total.svg)](https://github.com/CloudNetService/CloudNet/releases)
[![GitHub release](https://img.shields.io/github/release/CloudNetService/CloudNet.svg)](https://github.com/CloudNetService/CloudNet/releases)
Expand Down Expand Up @@ -52,7 +51,7 @@ Maven:
<repositories>
<repository>
<id>cloudnet-repo</id>
<url>https://cloudnetservice.eu/repositories</url>
<url>https://repo.cloudnetservice.eu/repository/releases/</url>
</repository>
</repositories>

Expand All @@ -61,14 +60,14 @@ Maven:
<dependency>
<groupId>de.dytanic.cloudnet</groupId>
<artifactId>cloudnet-api-bridge</artifactId>
<version>2.1.17</version>
<version>2.1.18</version>
<scope>provided</scope>
</dependency>
<!-- CloudNet Core -->
<dependency>
<groupId>de.dytanic.cloudnet</groupId>
<artifactId>cloudnet-core</artifactId>
<version>2.1.17</version>
<version>2.1.18</version>
<scope>provided</scope>
</dependency>
</dependencies>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -252,7 +252,7 @@ public String getHostAdress() {
/**
* Returns the serverConfig from this instance
*
* @return
* @return the current server configuration
*/
public ServerConfig getServerConfig() {
return serverConfig;
Expand All @@ -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;
Expand All @@ -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;
Expand All @@ -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;
Expand All @@ -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;
Expand All @@ -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;
Expand All @@ -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;
Expand All @@ -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;
Expand All @@ -341,7 +341,7 @@ public Template getTemplate() {
/**
* Registerd one command
*
* @param command
* @param command the command to register
*/
public void registerCommand(Command command) {
try {
Expand All @@ -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());
Expand All @@ -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;
Expand All @@ -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<ServerProcessMeta>() {}.getType());
}

/**
* @param player
* @param player the player
*/
public void updateNameTags(Player player) {
this.updateNameTags(player, null);
Expand Down Expand Up @@ -440,7 +440,7 @@ public void updateNameTags(Player player,
/**
* Returns the cached CloudPlayer Objectives
*
* @return
* @return a map containing all cloud players
*/
public Map<UUID, CloudPlayer> getCloudPlayers() {
return cloudPlayers;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,16 @@ public BukkitCloudEvent() {
/**
* Returns the CloudAPI instance
*
* @return
* @return the current cloud api instance
*/
public CloudAPI getCloud() {
return CloudAPI.getInstance();
}

/**
* Returns the CloudServer instance
*
* @return the current cloud server instance
*/
public CloudServer getCloudServer() {
return CloudServer.getInstance();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -25,7 +25,7 @@ public CloudAPI getCloud() {
/**
* Returns the CloudProxy instance
*
* @return
* @return the current cloud proxy instance
*/
public CloudProxy getCloudProxy() {
return CloudProxy.getInstance();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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) {
Expand All @@ -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) {
Expand Down Expand Up @@ -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) {
Expand All @@ -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) {
Expand All @@ -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) {
Expand Down
Loading