Skip to content

Commit

Permalink
Merge pull request #426 from Shynixn/development
Browse files Browse the repository at this point in the history
Merge changes to Master --release
  • Loading branch information
Shynixn committed Mar 7, 2022
2 parents ae2a10a + 243e119 commit f12ce24
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 13 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ RUN ./gradlew build pluginJar --no-daemon
# 4. Launch a minecraft server with jdk17 and plugin
FROM amazoncorretto:17
# Change to the current plugin version present in build.gradle
ENV PLUGIN_VERSION=6.29.0
ENV PLUGIN_VERSION=6.29.1
# Change to the server version you want to test.
ENV SERVER_VERSION=spigot-1.18.jar
# Port of the Minecraft Server.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.github.shynixn.blockball.bukkit.logic.business.service

import com.github.shynixn.blockball.api.bukkit.event.PacketEvent
import com.github.shynixn.blockball.api.business.enumeration.Version
import com.github.shynixn.blockball.api.business.proxy.PluginProxy
import com.github.shynixn.blockball.api.business.service.ProtocolService
import com.github.shynixn.blockball.core.logic.business.extension.accessible
Expand Down Expand Up @@ -41,18 +42,20 @@ class ProtocolServiceImpl @Inject constructor(private val plugin: PluginProxy, p
}
private val channelField by lazy {
try {
plugin.findClazz("net.minecraft.network.NetworkManager")
.getDeclaredField("m")
.accessible(true)
} catch (e: Exception) {
try {
if (plugin.getServerVersion().isVersionSameOrGreaterThan(Version.VERSION_1_18_R2)) {
plugin.findClazz("net.minecraft.network.NetworkManager")
.getDeclaredField("m")
.accessible(true)
} else if (plugin.getServerVersion().isVersionSameOrGreaterThan(Version.VERSION_1_17_R1)) {
plugin.findClazz("net.minecraft.network.NetworkManager")
.getDeclaredField("k")
.accessible(true)
}catch (e1 : Exception){
plugin.findClazz("net.minecraft.server.VERSION.NetworkManager")
.getDeclaredField("channel")
} else {
throw RuntimeException("Impl not found!")
}
} catch (e1: Exception) {
plugin.findClazz("net.minecraft.server.VERSION.NetworkManager")
.getDeclaredField("channel")
}
}

Expand Down
2 changes: 1 addition & 1 deletion blockball-bukkit-plugin/src/main/resources/plugin.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: BlockBall
version: 6.29.0
version: 6.29.1
author: Shynixn
website: https://www.spigotmc.org/members/shynixn.63455/
main: com.github.shynixn.blockball.bukkit.BlockBallPlugin
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ tasks.register("printVersion") {

subprojects {
group 'com.github.shynixn.blockball'
version '6.29.0'
version '6.29.1'

sourceCompatibility = 1.8

Expand Down
4 changes: 2 additions & 2 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@
# built documents.
#
# The short X.Y version.
version = '6.29.0'
version = '6.29.1'
# The full version, including alpha/beta/rc tags.
release = '6.29.0'
release = '6.29.1'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down

0 comments on commit f12ce24

Please sign in to comment.