Skip to content

Commit

Permalink
Updating to 1.15.x
Browse files Browse the repository at this point in the history
  • Loading branch information
paulolc committed Apr 29, 2020
1 parent d7bb14b commit 103cdf7
Show file tree
Hide file tree
Showing 10 changed files with 36 additions and 33 deletions.
6 changes: 3 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
dist: trusty
language: java
jdk:
- oraclejdk7
jdk: oraclejdk8
install: true
script: ./complete_build
script: ./complete_build
Binary file removed SpigotBuildTools/BuildTools.jar
Binary file not shown.
16 changes: 6 additions & 10 deletions complete_build
Original file line number Diff line number Diff line change
@@ -1,23 +1,19 @@
#!/usr/bin/env bash
# Generated with the command ./jsonapi build all
# Generated with the command ./jsonapi build 1.15.2

DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd $DIR

echo "Removing old builds"
rm -rf builds/*

BUILDTOOLSURL="https://hub.spigotmc.org/jenkins/job/BuildTools/lastSuccessfulBuild/artifact/target/BuildTools.jar"
mkdir -p spigot
( cd spigot ; rm -f BuildTools.jar ; wget $BUILDTOOLSURL ; java -jar BuildTools.jar --rev 1.15.2 )

echo "Building 1.11.2-R0.1-SNAPSHOT"
mvn clean install $@ -DmcPackage=v1_11_R1 -DspigotVersion=1.11.2-R0.1-SNAPSHOT -Dmc1120rNewer=no

rc=$?
if [[ $rc != 0 ]] ; then
exit $rc
fi

echo "Building 1.12-R0.1-SNAPSHOT"
mvn clean install $@ -DmcPackage=v1_12_R1 -DspigotVersion=1.12-R0.1-SNAPSHOT -Dmc1120rNewer=yes
echo "Building 1.15.2-R0.1-SNAPSHOT"
mvn clean install $@ -DmcPackage=v1_15_R1 -DspigotVersion=1.15.2-R0.1-SNAPSHOT -Dmc1120rNewer=yes

rc=$?
if [[ $rc != 0 ]] ; then
Expand Down
2 changes: 1 addition & 1 deletion dependency-reduced-pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@
<dependency>
<groupId>net.milkbowl.vault</groupId>
<artifactId>Vault</artifactId>
<version>1.2.27</version>
<version>1.7.3</version>
<scope>compile</scope>
</dependency>
</dependencies>
Expand Down
5 changes: 5 additions & 0 deletions jsonapi
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ versions = {}
versions['1.11.2'] = package: 'v1_11_R1', cb_version: '1.11.2-R0.1-SNAPSHOT'
versions['1.12'] = package: 'v1_12_R1', cb_version: '1.12-R0.1-SNAPSHOT'
versions['1.14.3'] = package: 'v1_14_R1', cb_version: '1.14.3-R0.1-SNAPSHOT'
versions['1.15.2'] = package: 'v1_15_R1', cb_version: '1.15.2-R0.1-SNAPSHOT'

# versions['1.4'] = versions['1.4.7']
# versions['1.5'] = versions['1.5.2']
Expand Down Expand Up @@ -99,6 +100,10 @@ cd $DIR
echo "Removing old builds"
rm -rf builds/*
BUILDTOOLSURL="https://hub.spigotmc.org/jenkins/job/BuildTools/lastSuccessfulBuild/artifact/target/BuildTools.jar"
mkdir -p spigot
( cd spigot ; rm -f BuildTools.jar ; wget $BUILDTOOLSURL ; java -jar BuildTools.jar --rev #{version} )
"""
console.log build(to_build).join("\n")
else
Expand Down
14 changes: 7 additions & 7 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
</profiles>

<properties>
<spigotVersion>1.14.3-R0.1-SNAPSHOT</spigotVersion>
<mcPackage>v1_14_R1</mcPackage>
<spigotVersion>1.15.2-R0.1-SNAPSHOT</spigotVersion>
<mcPackage>v1_15_R1</mcPackage>
<jsonapiDebug>no</jsonapiDebug>
</properties>

Expand Down Expand Up @@ -69,7 +69,7 @@
<artifactId>spigot</artifactId>
<version>${spigotVersion}</version>
<scope>system</scope>
<systemPath>${project.basedir}/test/spigot-1.14.3-R0.1-SNAPSHOT.jar</systemPath>
<systemPath>${project.basedir}/spigot/Spigot/Spigot-Server/target/spigot-${spigotVersion}.jar</systemPath>
</dependency>
<dependency>
<groupId>net.ess3</groupId>
Expand Down Expand Up @@ -159,7 +159,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.5</version>
<version>3.8.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
Expand All @@ -171,7 +171,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.10</version>
<version>3.1.1</version>
<executions>
<execution>
<id>install-test-jar</id>
Expand Down Expand Up @@ -258,7 +258,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>2.7</version>
<version>3.1.0</version>
<executions>
<execution>
<id>copy-prod-resources</id>
Expand Down Expand Up @@ -288,4 +288,4 @@
</plugin>
</plugins>
</build>
</project>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@
//$import org.bukkit.craftbukkit./*$mcversion$*/.entity.*;
//$import org.bukkit.craftbukkit./*$mcversion$*/.util.*;
//#else
import net.minecraft.server.v1_14_R1.*;
import net.minecraft.server.v1_15_R1.*;

import org.bukkit.craftbukkit.v1_14_R1.*;
import org.bukkit.craftbukkit.v1_14_R1.entity.*;
import org.bukkit.craftbukkit.v1_14_R1.util.*;
import org.bukkit.craftbukkit.v1_15_R1.*;
import org.bukkit.craftbukkit.v1_15_R1.entity.*;
import org.bukkit.craftbukkit.v1_15_R1.util.*;
//#endif

@SuppressWarnings("deprecation")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import java.lang.reflect.Field;
import java.lang.reflect.Method;
import java.util.List;
import java.util.Set;

import com.comphenix.protocol.reflect.FuzzyReflection;
import com.comphenix.protocol.reflect.VolatileField;
Expand Down Expand Up @@ -79,9 +80,10 @@ public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception
};

// Get the current NetworkMananger list
networkManagers = (List<Object>) FuzzyReflection.fromObject(serverConnection, true).
invokeMethod(null, "getNetworkManagers", List.class, serverConnection);

//networkManagers = (List<Object>) FuzzyReflection.fromObject(serverConnection, true).
// invokeMethod(null, "getNetworkManagers", List.class, serverConnection);


// Insert ProtocolLib's connection interceptor
bootstrapFields = getBootstrapFields(serverConnection);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
//$import net.minecraft.server./*$mcversion$*/.*;
//$import org.bukkit.craftbukkit./*$mcversion$*/.*;
//#else
import net.minecraft.server.v1_14_R1.EntityPlayer;
import net.minecraft.server.v1_14_R1.*;
import org.bukkit.craftbukkit.v1_14_R1.*;
import net.minecraft.server.v1_15_R1.EntityPlayer;
import net.minecraft.server.v1_15_R1.*;
import org.bukkit.craftbukkit.v1_15_R1.*;
//#endif

public class OfflinePlayerLoader {
Expand Down
4 changes: 2 additions & 2 deletions src/resources/plugin.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
name: JSONAPI
main: com.alecgorge.minecraft.jsonapi.JSONAPI
version: 5.8.0
version: 5.9.0
description: Control your server and fetch information from your server.
website: http://mcjsonapi.com/
author: Alec Gorge
depend: [Vault, ProtocolLib]
softdepend: [RemoteToolkitPlugin, dynmap]
api-version: 1.14
api-version: 1.15
commands:
reloadjsonapi:
description: Reloads the API methods for JSONAPI.
Expand Down

0 comments on commit 103cdf7

Please sign in to comment.