Skip to content

Merge dev #3

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 25 commits into from
Jan 23, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions .github/workflows/master.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Master CI

on:
push:
branches:
- "master"

jobs:
build:
runs-on: [ubuntu-latest]
steps:
- uses: actions/checkout@v1
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Make gradlew executable
run: chmod +x ./gradlew
- name: Build with Gradle
run: ./gradlew build -x copyJar
- name: Release
uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "latest"
prerelease: false
title: "Release Build"
files: |
NetworkClient/build/libs/*.jar
NetworkProxy/build/libs/*.jar
6 changes: 1 addition & 5 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,6 @@ fabric.properties
.mtj.tmp/

# Package Files #
*.jar
*.war
*.nar
*.ear
Expand All @@ -118,7 +117,7 @@ hs_err_pid*

### Gradle ###
.gradle
build/
**/build

# Ignore Gradle GUI config
gradle-app.setting
Expand All @@ -132,7 +131,4 @@ gradle-app.setting
# # Work around https://youtrack.jetbrains.com/issue/IDEA-116898
# gradle/wrapper/gradle-wrapper.properties

### Gradle Patch ###
**/build/

# End of https://www.gitignore.io/api/java,gradle,intellij
20 changes: 10 additions & 10 deletions NetworkClient/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,24 +14,24 @@ dependencies {
task copyJar {
doLast {
copy {
from "$projectDir\\build\\libs\\NetworkClient-1.0.jar"
into "E:\\Sektory\\Center\\plugins"
from "$projectDir/build/libs/NetworkClient-1.0.jar"
into "E:/Sektory/Center/plugins"
}
copy {
from "$projectDir\\build\\libs\\NetworkClient-1.0.jar"
into "E:\\Sektory\\North\\plugins"
from "$projectDir/build/libs/NetworkClient-1.0.jar"
into "E:/Sektory/North/plugins"
}
copy {
from "$projectDir\\build\\libs\\NetworkClient-1.0.jar"
into "E:\\Sektory\\South\\plugins"
from "$projectDir/build/libs/NetworkClient-1.0.jar"
into "E:/Sektory/South/plugins"
}
copy {
from "$projectDir\\build\\libs\\NetworkClient-1.0.jar"
into "E:\\Sektory\\East\\plugins"
from "$projectDir/build/libs/NetworkClient-1.0.jar"
into "E:/Sektory/East/plugins"
}
copy {
from "$projectDir\\build\\libs\\NetworkClient-1.0.jar"
into "E:\\Sektory\\West\\plugins"
from "$projectDir/build/libs/NetworkClient-1.0.jar"
into "E:/Sektory/West/plugins"
}
}
}
4 changes: 2 additions & 2 deletions NetworkProxy/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ dependencies {
task copyJar {
doLast {
copy {
from "$projectDir\\build\\libs\\NetworkProxy-1.0.jar"
into "E:\\Sektory\\aProxy\\plugins"
from "$projectDir/build/libs/NetworkProxy-1.0.jar"
into "E:/Sektory/aProxy/plugins"
}
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package org.mcservernetwork.proxy.listener.bungee;

import io.lettuce.core.RedisFuture;
import net.md_5.bungee.api.ProxyServer;
import net.md_5.bungee.api.chat.TextComponent;
import net.md_5.bungee.api.config.ServerInfo;
import net.md_5.bungee.api.connection.ProxiedPlayer;
Expand Down Expand Up @@ -29,11 +30,11 @@ public void onServerConnect(ServerConnectEvent event) {
data.thenAccept(packet -> {
PlayerSectorData sectorData = (PlayerSectorData) packet;

String current = player.getServer().getInfo().getName();
ServerInfo current = player.getServer().getInfo();
if (current == null)
current = event.getTarget().getName();
current = event.getTarget();

if (current.equals(sectorData.currentSectorName))
if (current.getName().equals(sectorData.currentSectorName))
return;

PacketStatus status = ClientStatusHandler.get(sectorData.currentSectorName);
Expand All @@ -42,10 +43,7 @@ public void onServerConnect(ServerConnectEvent event) {
return;
}

PacketTransfer transfer = new PacketTransfer();
transfer.targetSectorName = sectorData.currentSectorName;
transfer.uniqueId = player.getUniqueId().toString();
NetworkAPI.Net.publish(Channel.TRANSFER_REQUEST, transfer);
player.connect(current);
});
}

Expand Down