Skip to content
This repository has been archived by the owner on Jun 7, 2022. It is now read-only.

Commit

Permalink
Merge branch 'development'
Browse files Browse the repository at this point in the history
# Conflicts:
#	.travis.yml
#	cloudnet-wrapper/src/main/java/de/dytanic/cloudnetwrapper/setup/SetupSpigotVersion.java
  • Loading branch information
GiantTreeLP committed Sep 2, 2019
2 parents 543d878 + 5b7b2aa commit e17be3c
Show file tree
Hide file tree
Showing 254 changed files with 7,829 additions and 3,403 deletions.
2 changes: 2 additions & 0 deletions .template/CloudNet-Master/localwrapper_start.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
title CloudNet-Master
java -XX:+UseG1GC -XX:MaxGCPauseMillis=50 -XX:CompileThreshold=100 -XX:MaxPermSize=256M -Dcloudnet.localwrapper.disableConsole=true -Xmx128m -jar CloudNet-Master.jar --installWrapper
15 changes: 15 additions & 0 deletions .template/CloudNet-Master/localwrapper_start.command
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/bash
cd "$(dirname "$0")"
while true
do
java -XX:+UseG1GC -XX:MaxGCPauseMillis=50 -XX:MaxPermSize=256M -XX:CompileThreshold=100 -Dcloudnet.localwrapper.disableConsole=true -Xmx128m -jar CloudNet-Master.jar --installWrapper
echo "If you want to completely stop the server process now, press Ctrl+C before
the time is up!"
echo "Rebooting in:"
for i in 5 4 3 2 1
do
echo "$i..."
sleep 1
done
echo "Rebooting now!"
done
2 changes: 2 additions & 0 deletions .template/CloudNet-Master/localwrapper_start.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/sh
screen -RS CloudNet java -XX:+UseG1GC -XX:MaxGCPauseMillis=50 -XX:CompileThreshold=100 -XX:MaxPermSize=256M -Dcloudnet.localwrapper.disableConsole=true -Xmx128m -jar CloudNet-Master.jar --installWrapper
7 changes: 1 addition & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
language: java
jdk:
- openjdk8
dist: bionic
sudo: false
addons:
apt:
packages:
- openjdk8
notifications:
email: false
7 changes: 1 addition & 6 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ pipeline {
}
stage('Version') {
steps {
sh 'mvn versions:set -DnewVersion=2.1.15'
sh 'mvn versions:set -DnewVersion=2.1.16'
}
}
stage('Compile') {
Expand All @@ -39,11 +39,6 @@ pipeline {
sh 'mvn package javadoc:aggregate-jar'
}
}
stage('Install') {
steps {
sh 'mvn install'
}
}
stage('Release ZIP') {
steps {
sh '''mkdir -p temp;
Expand Down
4 changes: 2 additions & 2 deletions cloudnet-api/cloudnet-api-bridge/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,13 @@
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
<version>2.11.2</version>
<version>2.12.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>2.11.2</version>
<version>2.12.1</version>
<scope>provided</scope>
</dependency>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,19 +157,16 @@ public void run()
CloudServer.getInstance().getMotd(), Bukkit.getOnlinePlayers().size(), CloudServer.getInstance().getMaxPlayers()
);
Bukkit.getPluginManager().callEvent(serverListPingEvent);
if (!serverListPingEvent.getMotd().equals(CloudServer.getInstance().getMotd()))
{
if (!serverListPingEvent.getMotd().equalsIgnoreCase(CloudServer.getInstance().getMotd()) ||
serverListPingEvent.getMaxPlayers() != CloudServer.getInstance().getMaxPlayers()) {
CloudServer.getInstance().setMotd(serverListPingEvent.getMotd());
if (serverListPingEvent.getMotd().toLowerCase().contains("running") || serverListPingEvent.getMotd().toLowerCase().contains("ingame"))
{
CloudServer.getInstance().setMaxPlayers(serverListPingEvent.getMaxPlayers());
if (serverListPingEvent.getMotd().toLowerCase().contains("running") || serverListPingEvent.getMotd().toLowerCase().contains("ingame")) {
CloudServer.getInstance().changeToIngame();
} else {
CloudServer.getInstance().update();
}
}

if (serverListPingEvent.getMaxPlayers() != CloudServer.getInstance().getMaxPlayers())
{
CloudServer.getInstance().setMaxPlayers(serverListPingEvent.getMaxPlayers());
}
} catch (Exception ex)
{
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

import java.nio.file.Paths;
import java.util.concurrent.TimeUnit;
import java.util.logging.Level;

/**
* Created by Tareko on 17.08.2017.
Expand All @@ -37,6 +38,7 @@ public void run()
getProxy().stop("CloudNet-Stop!");
}
});
getLogger().setLevel(Level.INFO);
CloudAPI.getInstance().setLogger(getLogger());
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,21 @@
package de.dytanic.cloudnet.bridge.event.bukkit;

import de.dytanic.cloudnet.lib.CloudNetwork;
import lombok.AllArgsConstructor;
import org.bukkit.event.HandlerList;

/**
* Calls if the cloudnetwork objective was updated
*/
@AllArgsConstructor
public class BukkitCloudNetworkUpdateEvent extends BukkitCloudEvent {

private static HandlerList handlerList = new HandlerList();

private CloudNetwork cloudNetwork;

public BukkitCloudNetworkUpdateEvent(CloudNetwork cloudNetwork) {
this.cloudNetwork = cloudNetwork;
}

public CloudNetwork getCloudNetwork()
{
return cloudNetwork;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,21 @@
package de.dytanic.cloudnet.bridge.event.bukkit;

import de.dytanic.cloudnet.bridge.CloudServer;
import lombok.AllArgsConstructor;
import org.bukkit.event.HandlerList;

/**
* Calls before the first init update of the serverInfo for a online state
*/
@AllArgsConstructor
public class BukkitCloudServerInitEvent extends BukkitCloudEvent {

private static HandlerList handlerList = new HandlerList();

private CloudServer cloudServer;

public BukkitCloudServerInitEvent(CloudServer cloudServer) {
this.cloudServer = cloudServer;
}

public CloudServer getCloudServer()
{
return cloudServer;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,11 @@
package de.dytanic.cloudnet.bridge.event.bukkit;

import de.dytanic.cloudnet.lib.utility.document.Document;
import lombok.AllArgsConstructor;
import org.bukkit.event.HandlerList;

/**
* Called if a custom channel message was received
*/
@AllArgsConstructor
public class BukkitCustomChannelMessageReceiveEvent extends BukkitCloudEvent {

private static HandlerList handlerList = new HandlerList();
Expand All @@ -22,6 +20,12 @@ public class BukkitCustomChannelMessageReceiveEvent extends BukkitCloudEvent {

private Document document;

public BukkitCustomChannelMessageReceiveEvent(String channel, String message, Document document) {
this.channel = channel;
this.message = message;
this.document = document;
}

public String getMessage()
{
return message;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,21 @@
package de.dytanic.cloudnet.bridge.event.bukkit;

import de.dytanic.cloudnet.bridge.internal.serverselectors.MobSelector;
import lombok.AllArgsConstructor;
import org.bukkit.event.HandlerList;

/**
* Calls if a server mob is created
*/
@AllArgsConstructor
public class BukkitMobInitEvent extends BukkitCloudEvent {

private static HandlerList handlerList = new HandlerList();

private MobSelector.MobImpl mob;

public BukkitMobInitEvent(MobSelector.MobImpl mob) {
this.mob = mob;
}

public MobSelector.MobImpl getMob()
{
return mob;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,21 @@
package de.dytanic.cloudnet.bridge.event.bukkit;

import de.dytanic.cloudnet.lib.serverselectors.mob.ServerMob;
import lombok.AllArgsConstructor;
import org.bukkit.event.HandlerList;

/**
* Updates a ServerMob
*/
@AllArgsConstructor
public class BukkitMobUpdateEvent extends BukkitCloudEvent {

private static HandlerList handlerList = new HandlerList();

private ServerMob serverMob;

public BukkitMobUpdateEvent(ServerMob serverMob) {
this.serverMob = serverMob;
}

public ServerMob getServerMob()
{
return serverMob;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
package de.dytanic.cloudnet.bridge.event.bukkit;

import de.dytanic.cloudnet.lib.player.OfflinePlayer;
import lombok.Getter;
import org.bukkit.event.HandlerList;

@Getter
public class BukkitOfflinePlayerUpdateEvent extends BukkitCloudEvent {

private static final HandlerList handlerList = new HandlerList();
Expand All @@ -16,6 +14,10 @@ public BukkitOfflinePlayerUpdateEvent(OfflinePlayer offlinePlayer)
this.offlinePlayer = offlinePlayer;
}

public OfflinePlayer getOfflinePlayer() {
return offlinePlayer;
}

@Override
public HandlerList getHandlers()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,11 @@

package de.dytanic.cloudnet.bridge.event.bukkit;

import lombok.Getter;
import org.bukkit.event.HandlerList;

/**
* Created by Tareko on 11.10.2017.
*/
@Getter
public class BukkitOnlineCountUpdateEvent extends BukkitCloudEvent {

private static HandlerList handlerList = new HandlerList();
Expand All @@ -22,6 +20,10 @@ public BukkitOnlineCountUpdateEvent(int onlineCount)
this.onlineCount = onlineCount;
}

public int getOnlineCount() {
return onlineCount;
}

public static HandlerList getHandlerList()
{
return handlerList;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,21 @@
package de.dytanic.cloudnet.bridge.event.bukkit;

import de.dytanic.cloudnet.lib.player.CloudPlayer;
import lombok.AllArgsConstructor;
import org.bukkit.event.HandlerList;

/**
* Created by Tareko on 18.08.2017.
*/
@AllArgsConstructor
public class BukkitPlayerDisconnectEvent extends BukkitCloudEvent {

private static HandlerList handlerList = new HandlerList();

private CloudPlayer cloudPlayer;

public BukkitPlayerDisconnectEvent(CloudPlayer cloudPlayer) {
this.cloudPlayer = cloudPlayer;
}

public CloudPlayer getCloudPlayer()
{
return cloudPlayer;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,21 @@
package de.dytanic.cloudnet.bridge.event.bukkit;

import de.dytanic.cloudnet.lib.player.CloudPlayer;
import lombok.AllArgsConstructor;
import org.bukkit.event.HandlerList;

/**
* Calls if a player logins to the network successfully
*/
@AllArgsConstructor
public class BukkitPlayerLoginNetworkEvent extends BukkitCloudEvent {

private static HandlerList handlerList = new HandlerList();

private CloudPlayer cloudPlayer;

public BukkitPlayerLoginNetworkEvent(CloudPlayer cloudPlayer) {
this.cloudPlayer = cloudPlayer;
}

public CloudPlayer getCloudPlayer()
{
return cloudPlayer;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,11 @@
package de.dytanic.cloudnet.bridge.event.bukkit;

import de.dytanic.cloudnet.lib.player.CloudPlayer;
import lombok.AllArgsConstructor;
import org.bukkit.event.HandlerList;

/**
* Calls if a player was updated on network
*/
@AllArgsConstructor
public class BukkitPlayerUpdateEvent extends BukkitCloudEvent {

private static HandlerList handlerList = new HandlerList();
Expand All @@ -23,6 +21,10 @@ public static HandlerList getHandlerList()

private CloudPlayer cloudPlayer;

public BukkitPlayerUpdateEvent(CloudPlayer cloudPlayer) {
this.cloudPlayer = cloudPlayer;
}

public CloudPlayer getCloudPlayer()
{
return cloudPlayer;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,21 @@
package de.dytanic.cloudnet.bridge.event.bukkit;

import de.dytanic.cloudnet.lib.server.info.ProxyInfo;
import lombok.AllArgsConstructor;
import org.bukkit.event.HandlerList;

/**
* Called if a proxy server was add into network
*/
@AllArgsConstructor
public class BukkitProxyAddEvent extends BukkitCloudEvent {

private static HandlerList handlerList = new HandlerList();

private ProxyInfo serverInfo;

public BukkitProxyAddEvent(ProxyInfo serverInfo) {
this.serverInfo = serverInfo;
}

public ProxyInfo getProxyInfo()
{
return serverInfo;
Expand Down
Loading

0 comments on commit e17be3c

Please sign in to comment.