Giter Site home page Giter Site logo

andre601 / oneversionremake Goto Github PK

View Code? Open in Web Editor NEW
25.0 2.0 5.0 585 KB

An updated version of the BungeeCord plugin OneVersion. Only allow specific MC versions on your server network.

Home Page: https://spigotmc.org/resources/71727/

License: MIT License

Java 100.00%
minecraft-plugin minecraft-plugins bungeecord bungeecord-plugin velocitypowered velocity-plugin

oneversionremake's Introduction

OneVersionRemake

OneVersionRemake

OneVersionRemake is a plugin for Velocity and BungeeCord based on the original concept from OneVersion but with a lot of changes and improved code.

Changes from the original

OneVersionRemake has a few specifici differences that make it better than the original:

  • Improved Code
    The Code has been improved. The plugin no longer has everything in a single class and instead has things split up for better readability and understanding.
    Additionally are commonly used parts shared between the different plugin variants to reduce duplicate code.
  • Better configuration
    The configuration received a general overhaul.
    Not only is Configurate used for better config handling, but new features and settings have been added for you to use. No longer is a weird placeholder needed to add a line-break.
  • Placeholders to display MC Versions
    OneVersionRemake uses a JSON file containing known MC protocols and their versions.
    This allows you to use placeholders such as {version} and {clientVersion} in messages to display the Network's supported version and the client's used version respectively.
    The JSON file is automatically updated on proxy restarts (Can be disabled) and you can modify it to change the text displayed or add your own MC versions.
  • Allow the versions you want
    The configuration is very simple to understand. Just add the version protocols you want to allow on your network, reload OneVersionRemake and enjoy.
    The Wiki has a page listing all supported version protocols.

Downloads

modrinth spigot codemc

Build it yourself

You can build your own version of OneVersionRemake from this source.

Requirements

You need:

  • Java (Obviously)
  • Maven
  • Git-based terminal (i.e. Git-scm for windows)

Clone the repository

To clone the repository, first choose where you want to store the folder and open your terminal in there (For windows will you need to use Git Bash).
Next, run the following command:

git clone https://github.com/Andre601/OneVersionRemake

After everything has been cloned, head over to the now generated OneVersionRemake folder by using cd OneVersionRemake in your terminal.

Build the jars

Now you can build the jar files. Just execute mvn clean install and the jars should be build within a few minutes (Depends on your download speed).
Afterwards can you obtain the final jar from either bungeecord/target/ or velocity/target/.

Note: Make sure to use the jar file either labeled OneVersionRemake-BungeeCord-<version>.jar or OneVersionRemake-Velocity-<version>.jar. Do not use jars containing original in their name!

Contribute

Contributions towards OneVersionRemake are always welcome when it helps improving the plugin in one way or another.

Modules

The project is split into 4 different modules which all have their own purpose.

core

The core module contains all code that is used on either version of OneVersionRemake (That is platform-agnostic).

Your primary goal when adding new stuff to OneVersionRemake should be to make the code as platform-independand as possible. This helps to reduce duplicate code. So whenever possible, add new code to this module first and only to the other ones when it can't be avoided.

bungeecord

This module contains all the code used on BungeeCord and that can't be put into the core module itself.

When adding new BungeeCord features to OneVersionRemake, make sure that it also supports popular forks such as Waterfall, Flamecord, etc.

velocity

This module contains code used for making the Velocity version of OneVersionRemake.
The currently used major API version of Velocity is v3 and the old v1 API is not supported anymore, so please avoid adding v1 support here.

Links

ghpages discord revolt mastodon

oneversionremake's People

Contributors

andre601 avatar dependabot-preview[bot] avatar dependabot[bot] avatar johnnywoof avatar me1312 avatar mrrazamataz avatar realtriassic avatar renovate-bot avatar renovate[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

oneversionremake's Issues

1.17.1 is not supported.

Confirmation

  • My issue isn't already found on the Issue tracker.
  • I use the latest release or development build of the plugin.

Platform

Velocity v3.x

Other Proxy platform (Optional)

No response

What happens?

It does not recognize 1.17.1 (756) as a valid version in it's configuration and displays it as "?" whilst starting the plugin.

Expected Behaviour

756 should be recognized as Minecraft 1.17.1.

How to Reproduce

  1. Set 756 as a supported version.
  2. Whilst starting the server, it should display this
[03:59:47 INFO] [OneVersionRemake]: Loaded the following Protocol Version(s):
[03:59:47 INFO] [OneVersionRemake]: ?

Console Log

https://paste.helpch.at/foluviqaca.md

Errors

No response

Additional Info

No response

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

This repository currently has no open or pending branches.

Detected dependencies

github-actions
.github/workflows/publish-artifacts.yml
  • actions/checkout v4
  • actions/setup-java v4
  • Kir-Antipov/mc-publish v3.3
.github/workflows/wiki.yml
  • actions/checkout v4
  • SwiftDocOrg/github-wiki-publish-action v1
maven
bungeecord/pom.xml
  • net.md-5:bungeecord-api 1.20-R0.2
  • net.md-5:bungeecord-api 1.20-R0.2
  • net.kyori:adventure-platform-bungeecord 4.3.4
  • net.kyori:adventure-api 4.17.0
  • org.spongepowered:configurate-yaml 4.1.2
  • org.bstats:bstats-bungeecord 3.0.2
  • org.apache.maven.plugins:maven-compiler-plugin 3.13.0
  • org.apache.maven.plugins:maven-shade-plugin 3.6.0
core/pom.xml
  • com.google.code.gson:gson 2.11.0
  • org.spongepowered:configurate-yaml 4.1.2
  • net.kyori:adventure-api 4.17.0
  • net.kyori:adventure-text-minimessage 4.17.0
  • net.kyori:adventure-text-serializer-legacy 4.17.0
  • com.squareup.okhttp3:okhttp 4.12.0
  • org.apache.maven.plugins:maven-jar-plugin 3.4.2
  • org.apache.maven.plugins:maven-compiler-plugin 3.13.0
  • org.apache.maven.plugins:maven-shade-plugin 3.6.0
pom.xml
velocity/pom.xml
  • com.velocitypowered:velocity-api 3.1.2-SNAPSHOT
  • org.bstats:bstats-velocity 3.0.2
  • org.spongepowered:configurate-yaml 4.1.2
  • org.apache.maven.plugins:maven-compiler-plugin 3.13.0
  • org.apache.maven.plugins:maven-shade-plugin 3.6.0

  • Check this box to trigger a request for Renovate to run again on this repository

Couldn't pass ProxyInitializeEvent to oneversionremake - Velocity 3.0.0

Confirmation

  • My issue isn't already found on the Issue tracker.
  • I use the latest release or development build of the plugin.

Platform

Velocity v3.x

Other Proxy platform (Optional)

No response

What happens?

Plugins fails to initialize on startup of Velocity proxy with this error:

[20:28:33 ERROR]: Couldn't pass ProxyInitializeEvent to oneversionremake java.lang.NoClassDefFoundError: java/net/http/HttpClient at com.andre601.oneversionremake.core.proxy.ProtocolVersionResolver.<init>(ProtocolVersionResolver.java:44) ~[?:?] at com.andre601.oneversionremake.core.OneVersionRemake.<init>(OneVersionRemake.java:47) ~[?:?] at com.andre601.oneversionremake.velocity.VelocityCore.initialize(VelocityCore.java:68) ~[?:?] at com.andre601.oneversionremake.velocity.Lmbda$11.execute(Unknown Source) ~[?:?] at com.velocitypowered.proxy.event.UntargetedEventHandler$VoidHandler.lambda$buildHandler$0(UntargetedEventHandler.java:47) ~[velocity-3.0.0.jar:3.0.0] at com.velocitypowered.proxy.event.VelocityEventManager.fire(VelocityEventManager.java:587) ~[velocity-3.0.0.jar:3.0.0] at com.velocitypowered.proxy.event.VelocityEventManager.lambda$fire$6(VelocityEventManager.java:468) ~[velocity-3.0.0.jar:3.0.0] at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) ~[?:?] at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) ~[?:?] at java.lang.Thread.run(Unknown Source) [?:?] Caused by: java.lang.ClassNotFoundException: java.net.http.HttpClient at com.velocitypowered.proxy.plugin.PluginClassLoader.loadClass0(PluginClassLoader.java:83) ~[velocity-3.0.0.jar:3.0.0] at com.velocitypowered.proxy.plugin.PluginClassLoader.loadClass(PluginClassLoader.java:60) ~[velocity-3.0.0.jar:3.0.0] at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:?] ... 10 more

This is my first installation on this type of proxy.

Expected Behaviour

Expectations are to enable without error and successfully generate plugin folder and new config.

How to Reproduce

  1. Install Velocity 3.0.0
  2. Install OVR Velocity 3.8.1
  3. Observe error on startup

Console Log

No response

Errors

No response

Additional Info

No response

Nothing happen when join unsupported version on velocity

Confirmation

  • My issue isn't already found on the Issue tracker.
  • I use the latest release or development build of the plugin.

Platform

Velocity v3.x

Other Proxy platform (Optional)

No response

What happens?

image

Expected Behaviour

Need kick player and show kick messages

How to Reproduce

Protocol:
  Versions: [758]
  MajorOnly: true

Messages:
  Kick:
  - '<bold><gradient:#005CE6:#00d8E6>SC-Riber</gradient></bold>'
  - ''
  - '<yellow><bold>(!)</bold><newline><red>Sunucu sürümü <green>{version} <red>olduğundan giriş yapamıyorsun.'
  - '<red>Sürümünü kontrol edip tekrar dene.'
  - ''
  - '<purple>● <blue>Site <gray>- <gold>SC-Riber.Games <purple>●'

After,
Try to join server with unsupport version.

Console Log

No response

Errors

No response

Additional Info

No response

LogDenial not working on 2.0.0

Error on console when loading the plugin:
11:50:05 [SEVERE] SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
11:50:05 [SEVERE] SLF4J: Defaulting to no-operation (NOP) logger implementation
11:50:05 [SEVERE] SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
11:50:05 [INFO] Loaded plugin OneVersionRemake version 2.0.0 by Andre_601

OneVersionRemake is not logging denied logins at all. No further errors.

OneVersionRemake 2.0.0
BungeeCord build #1534

Add support for MC 1.19.1 & 1.19.2

Confirmation

  • My issue isn't already found on the Issue tracker.
  • I use the latest release or development build of the plugin.

Platform

Flamecord

Other Proxy platform (Optional)

No response

What happens?

It is impossible to connect with versions 1.19.1 and 1.19.2

Expected Behaviour

That we can connect, and that there is the protocol for these versions.

How to Reproduce

  • Launch MC 1.19.1 or 1.19.2

Config.yml

#################################################################################
# +---------------------------------------------------------------------------+ #
# |       ____ _    ______                                                    | #
# |      / __ \ |  / / __ \                               OneVersionRemake    | #
# |     / / / / | / / /_/ /                                   by Andre_601    | #
# |    / /_/ /| |/ / _, _/                                                    | #
# |    \____/ |___/_/ |_|                                                     | #
# |                                                                           | #
# |    GitHub: https://github.com/Andre601/OneVersionRemake                   | #
# |    Spigot: https://spigotmc.org/resources/71727/                          | #
# |    Wiki:   https://github.com/Andre601/OneVersionRemake/wiki              | #
# |                                                                           | #
# +---------------------------------------------------------------------------+ #
#################################################################################
#
# Created with Version 3.11.1
#
# +----------------------------------------------------------------------------+
# |                               Main Settings                                |
# |                                                                            |
# | Main Settings for the plugin.                                              |
# |                                                                            |
# | https://github.com/Andre601/OneVersionRemake/wiki/Config#settings          |
# +----------------------------------------------------------------------------+
Settings:
  # +--------------------------------------------------------------------------+
  # | Whether OneVersionRemake should download the latest versions.json on     |
  # | Proxy (re)start.                                                         |
  # |                                                                          |
  # | https://github.com/Andre601/OneVersionRemake/wiki/Config#updateversions  |
  # +--------------------------------------------------------------------------+
  UpdateVersions: true
  # +--------------------------------------------------------------------------+
  # | URL pointing to the file that contains the different Protocols OVR       |
  # | should use.                                                              |
  # |                                                                          |
  # | https://github.com/Andre601/OneVersionRemake/wiki/Config#versionsurl     |
  # +--------------------------------------------------------------------------+
  VersionsUrl: 'https://www.andre601.ch/oneversionremake/protocol_versions.json'

# +----------------------------------------------------------------------------+
# |                             Protocol Settings                              |
# |                                                                            |
# | Protocol Settings for the plugin.                                          |
# |                                                                            |
# | https://github.com/Andre601/OneVersionRemake/wiki/Config#protocol          |
# +----------------------------------------------------------------------------+
Protocol:
  # +--------------------------------------------------------------------------+
  # | The Protocol Versions that should be allowed to join the network.        |
  # |                                                                          |
  # | https://github.com/Andre601/OneVersionRemake/wiki/Config#versions        |
  # +--------------------------------------------------------------------------+
  Versions: [759,758,757]

  # +--------------------------------------------------------------------------+
  # | Should OneVersionRemake log denied Logins in the console?                |
  # |                                                                          |
  # | https://github.com/Andre601/OneVersionRemake/wiki/Config#logdenial       |
  # +--------------------------------------------------------------------------+
  LogDenial: false

  # +--------------------------------------------------------------------------+
  # | Should the {version} placeholder only show major MC versions?            |
  # |                                                                          |
  # | https://github.com/Andre601/OneVersionRemake/wiki/Config#majoronly       |
  # +--------------------------------------------------------------------------+
  MajorOnly: true

# +----------------------------------------------------------------------------+
# |                                  Messages                                  |
# |                                                                            |
# | This section contains all the messages that you can configure.             |
# |                                                                            |
# | https://github.com/Andre601/OneVersionRemake/wiki/Config#messages          |
# +----------------------------------------------------------------------------+
Messages:
  # +--------------------------------------------------------------------------+
  # | Message to display instead of the Player count (<online>/<max>) next to  |
  # | the ping icon.                                                           |
  # |                                                                          |
  # | https://github.com/Andre601/OneVersionRemake/wiki/Config#playercount     |
  # +--------------------------------------------------------------------------+
  PlayerCount: '<red>HeavenCube 1.19.x'

  # +--------------------------------------------------------------------------+
  # | Reason to display, when the player gets kicked for using a unsupported   |
  # | Minecraft Version.                                                       |
  # |                                                                          |
  # | https://github.com/Andre601/OneVersionRemake/wiki/Config#kick            |
  # +--------------------------------------------------------------------------+
  Kick:
  - '<gradient:#FFFE0B:#FF8B37><b>HeavenCube.fr</b></gradient>'
  - ''
  - '<color:#e62e39>Tu utilises une version non supportée par le serveur.</color>'
  - '<color:#e62e39>Versions compatibles : <color:#cccccc>{version}</color>'
  - ''
  - ''
  - '<color:#ff333f><i>Relance ton jeu avec une de ces versions</i></color>'

  # +--------------------------------------------------------------------------+
  # | Message to show when the player hovers over the player count with his    |
  # | cursor.                                                                  |
  # |                                                                          |
  # | https://github.com/Andre601/OneVersionRemake/wiki/Config#hover           |
  # +--------------------------------------------------------------------------+
  Hover: []

  # +--------------------------------------------------------------------------+
  # | Message to display in the MOTD of the server.                            |
  # |                                                                          |
  # | https://github.com/Andre601/OneVersionRemake/wiki/Config#motd            |
  # +--------------------------------------------------------------------------+
  Motd: []

Console Log

https://paste.helpch.at/cimigocupi.sql

Errors

No response

Additional Info

No response

java.net.UnknownHostException: www.andre601.ch: Name or service not known

Confirmation

  • My issue isn't already found on the Issue tracker.
  • I use the latest release or development build of the plugin.

Platform

BungeeCord

Other Proxy platform (Optional)

No response

What happens?

[09:11:27 WARN] [OneVersionRemake]: Encountered IOException!
java.net.UnknownHostException: www.andre601.ch: Name or service not known
        at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method) ~[?:?]
        at java.net.InetAddress$PlatformNameService.lookupAllHostAddr(InetAddress.java:934) ~[?:?]
        at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1543) ~[?:?]
        at java.net.InetAddress$NameServiceAddresses.get(InetAddress.java:852) ~[?:?]
        at java.net.InetAddress.getAllByName0(InetAddress.java:1533) ~[?:?]
        at java.net.InetAddress.getAllByName(InetAddress.java:1385) ~[?:?]
        at java.net.InetAddress.getAllByName(InetAddress.java:1306) ~[?:?]
        at okhttp3.Dns$Companion$DnsSystem.lookup(Dns.kt:49) ~[?:?]
        at okhttp3.internal.connection.RouteSelector.resetNextInetSocketAddress(RouteSelector.kt:164) ~[?:?]
        at okhttp3.internal.connection.RouteSelector.nextProxy(RouteSelector.kt:129) ~[?:?]
        at okhttp3.internal.connection.RouteSelector.next(RouteSelector.kt:71) ~[?:?]
        at okhttp3.internal.connection.ExchangeFinder.findConnection(ExchangeFinder.kt:205) ~[?:?]
        at okhttp3.internal.connection.ExchangeFinder.findHealthyConnection(ExchangeFinder.kt:106) ~[?:?]
        at okhttp3.internal.connection.ExchangeFinder.find(ExchangeFinder.kt:74) ~[?:?]
        at okhttp3.internal.connection.RealCall.initExchange$okhttp(RealCall.kt:255) ~[?:?]
        at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.kt:32) ~[?:?]
        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109) ~[?:?]
        at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.kt:95) ~[?:?]
        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109) ~[?:?]
        at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.kt:83) ~[?:?]
        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109) ~[?:?]
        at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.kt:76) ~[?:?]
        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109) ~[?:?]
        at okhttp3.internal.connection.RealCall.getResponseWithInterceptorChain$okhttp(RealCall.kt:201) ~[?:?]
        at okhttp3.internal.connection.RealCall.execute(RealCall.kt:154) ~[?:?]
        at com.andre601.oneversionremake.core.proxy.ProtocolVersionResolver.getSiteJson(ProtocolVersionResolver.java:152) ~[?:?]
        at com.andre601.oneversionremake.core.proxy.ProtocolVersionResolver.lambda$updateFile$1(ProtocolVersionResolver.java:67) ~[?:?]
        at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1768) ~[?:?]
        at java.util.concurrent.CompletableFuture$AsyncSupply.exec(CompletableFuture.java:1760) ~[?:?]
        at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373) ~[?:?]
        at java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182) ~[?:?]
        at java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655) ~[?:?]
        at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622) ~[?:?]
        at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165) ~[?:?]
[09:11:27 WARN] [OneVersionRemake]: Handling of versions.json was non-successful!
[09:11:27 WARN] [OneVersionRemake]: Please check previous entries for any errors.

Expected Behaviour

It should work without this error appearing in console.

How to Reproduce

  1. Use the latest version of the plugin.
  2. Start the server.
  3. Observe the error.

Config.yml

Not relevant.

Console Log

Not relevant.

Errors

No response

Additional Info

Indeed trying to access https://www.andre601.ch/oneversionremake/protocol_versions.json through the browser returns an unknown host error.

Velocity overrides OneVersionRemake

Velocity blocks -1.13 clients even when OneVersionRemake is told to enable support for them.

Logs seem normal

[06:39:43] [Velocity Event Executor - #0/INFO]: OneVersionRemake v3.3.1
[06:39:43] [Velocity Event Executor - #0/INFO]: Platform: Velocity
[06:39:43] [Velocity Event Executor - #0/INFO]: 
[06:39:43] [Velocity Event Executor - #0/INFO]: Loaded config.yml!
[06:39:43] [Velocity Event Executor - #0/INFO]: Loaded the following Protocol Version(s):
[06:39:43] [Velocity Event Executor - #0/INFO]: 1.16.5, 1.16.3, 1.16.2, 1.16.1, 1.16, 1.15.2, 1.15.1, 1.15, 1.14.4, 1.14.3, 1.14.2, 1.14.1, 1.14, 1.13.2, 1.13.1, 1.13, 1.12.2, 1.12.1, 1.12, 1.11.2, 1.11, 1.10.2, 1.9.4, 1.9.2, 1.9.1, 1.9, 1.8.9
[06:39:43] [Velocity Event Executor - #0/INFO]: Loading command /ovr...
[06:39:43] [Velocity Event Executor - #0/INFO]: Command loaded!
[06:39:43] [Velocity Event Executor - #0/INFO]: Loading Event Listeners...
[06:39:43] [Velocity Event Executor - #0/INFO]: Event Listeners loaded!
[06:39:43] [Velocity Event Executor - #0/INFO]: Loading Metrics...
[06:39:43] [Velocity Event Executor - #0/INFO]: Metrics loaded!
[06:39:43] [Velocity Event Executor - #0/INFO]: OneVersionRemake is ready!

image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.