Skip to content

Commit 67f8230

Browse files
committed
Merge remote-tracking branch 'origin/master'
2 parents aec926b + 6b74116 commit 67f8230

File tree

1,068 files changed

+5874
-2423
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,068 files changed

+5874
-2423
lines changed

.github/FUNDING.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
github: kennytv
22
patreon: kennytv
3-
custom: ['https://florianmichael.de/donate']
3+
custom: ['https://florianreuth.de/donate']

.github/dependabot.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,9 @@ updates:
66
directory: "/"
77
schedule:
88
interval: "monthly"
9+
- package-ecosystem: "gradle"
10+
cooldown:
11+
default-days: 7
12+
directory: "/"
13+
schedule:
14+
interval: "monthly"

.github/workflows/build.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,16 @@ jobs:
88
# Only run on PRs if the source branch is on a different repo. We do not need to run everything twice.
99
if: ${{ github.event_name != 'pull_request' || github.repository != github.event.pull_request.head.repo.full_name }}
1010
runs-on: ubuntu-24.04
11+
timeout-minutes: 30
1112
steps:
1213
- name: Checkout Repository
13-
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # 6.0.0
14+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # 6.0.2
1415
with:
1516
persist-credentials: false
1617
- name: Set up Gradle
17-
uses: gradle/actions/setup-gradle@4d9f0ba0025fe599b4ebab900eb7f3a1d93ef4c2 # 5.0.0
18+
uses: gradle/actions/setup-gradle@f29f5a9d7b09a7c6b29859002d29d24e1674c884 # 5.0.1
1819
- name: Set up JDK 17
19-
uses: actions/setup-java@dded0888837ed1f317902acf8a20df0ad188d165 # 5.0.0
20+
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # 5.2.0
2021
with:
2122
distribution: 'temurin'
2223
java-version: 17
@@ -26,7 +27,8 @@ jobs:
2627
- name: Upload Artifacts to GitHub
2728
# Only upload on the preview repository as there is no CI job for it.
2829
if: ${{ github.repository == 'ViaVersion/ViaVersionDev' && github.ref_name == 'preview' }}
29-
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # 5.0.0
30+
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # 6.0.0
3031
with:
3132
name: Artifacts
3233
path: build/libs/
34+
if-no-files-found: error

.github/workflows/publish.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,16 @@ jobs:
1313
publish:
1414
if: github.repository_owner == 'ViaVersion'
1515
runs-on: ubuntu-24.04
16+
timeout-minutes: 30
1617
steps:
1718
- name: Checkout Repository
18-
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # 6.0.0
19+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # 6.0.2
1920
with:
2021
persist-credentials: false
2122
- name: Set up Gradle
22-
uses: gradle/actions/setup-gradle@4d9f0ba0025fe599b4ebab900eb7f3a1d93ef4c2 # 5.0.0
23+
uses: gradle/actions/setup-gradle@f29f5a9d7b09a7c6b29859002d29d24e1674c884 # 5.0.1
2324
- name: Set up JDK 17
24-
uses: actions/setup-java@dded0888837ed1f317902acf8a20df0ad188d165 # 5.0.0
25+
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # 5.2.0
2526
with:
2627
distribution: 'temurin'
2728
java-version: 17

.github/workflows/update-gradle-wrapper.yml

Lines changed: 0 additions & 21 deletions
This file was deleted.

README.md

Lines changed: 22 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,15 @@
77
**Allows the connection of higher client versions to lower server versions -
88
it works on any platform you can think of.**
99

10-
The base ViaVersion jar runs on Paper and Velocity. We also have projects integrating ViaVersion to run
11-
on Fabric, Forge, Sponge, or as a standalone proxy to join from basically any client version on
12-
any server version from the past decade. **See [HERE](https://viaversion.com) for an overview of the different Via\* projects.**
13-
14-
Note that ViaVersion will be able to **run best on either Paper servers or through [ViaFabricPlus](https://github.com/ViaVersion/ViaFabricPlus?tab=readme-ov-file#viafabricplus)** due to having
10+
The base ViaVersion jar runs on [Paper](https://papermc.io/software/paper/)
11+
and [Velocity](https://papermc.io/software/velocity/). We also have projects integrating ViaVersion to run
12+
on [Fabric](https://github.com/ViaVersion/ViaFabric), [Forge](https://github.com/ViaVersion/ViaForge), [Bungee](https://github.com/ViaVersion/ViaBungee), [Sponge](https://github.com/ViaVersion/ViaSponge),
13+
or as [a standalone proxy](https://github.com/ViaVersion/ViaProxy) to join from basically any client version on
14+
any server version from the past decade. **See [HERE](https://viaversion.com) for an overview of the different Via\*
15+
projects.**
16+
17+
Note that ViaVersion will be able to **run best on either Paper servers or
18+
through [ViaFabricPlus](https://github.com/ViaVersion/ViaFabricPlus?tab=readme-ov-file#viafabricplus)** due to having
1519
direct access to client/server state and more extensive API.
1620

1721
Supported Versions:
@@ -22,10 +26,16 @@ Supported Versions:
2226

2327
Snapshot support
2428
--------
25-
**ViaVersion will only be released a few days *after* a Minecraft update** unless the protocol changes of the update were trivial. If you want early-access, usually days or even weeks before the final release, you can subscribe to either:
26-
- [GitHub Sponsors](https://github.com/sponsors/kennytv/sponsorships?sponsor=kennytv&tier_id=385613&preview=false) (preferred option. Use the `/verify` command on this Discord after), or alternatively
27-
- [Patreon](https://www.patreon.com/kennytv/membership) (see the highest tier and make sure to link Patreon to your Discord account under Settings->Connections)
28-
This also includes access to a private repository with the code, which will be pushed to the public repository after the given delay on a Minecraft update.
29+
**ViaVersion will only be released a few days *after* a Minecraft update** unless the protocol changes of the update
30+
were trivial. If you want early-access, usually days or even weeks before the final release, you can subscribe to
31+
either:
32+
33+
- [GitHub Sponsors](https://github.com/sponsors/kennytv/sponsorships?sponsor=kennytv&tier_id=385613&preview=false) (
34+
preferred option. Use the `/verify` command on this Discord after), or alternatively
35+
- [Patreon](https://www.patreon.com/kennytv/membership) (see the highest tier and make sure to link Patreon to your
36+
Discord account under Settings->Connections)
37+
This also includes access to a private repository with the code, which will be pushed to the public repository after
38+
the given delay on a Minecraft update.
2939

3040
Releases/Dev Builds
3141
--------
@@ -78,7 +88,7 @@ If you need access to the existing protocol or platform implementations, use the
7888
Please note the [differences in licensing](#license).
7989

8090
Note: If you want to make your own platform implementation of ViaVersion (and additional addons),
81-
you can use the [ViaLoader](https://github.com/ViaVersion/ViaLoader) project.
91+
take a look at the [documentation](https://github.com/ViaVersion/ViaVersion/wiki/Creating-a-new-ViaVersion-platform).
8292

8393
Building
8494
--------
@@ -89,7 +99,8 @@ You need JDK 17 or newer to build ViaVersion.
8999

90100
Mapping Files
91101
--------------
92-
Mapping files are generated and managed in our [Mappings repository](https://github.com/ViaVersion/Mappings). The generated mapping output is stored [here](./common/src/main/resources/assets/viaversion).
102+
Mapping files are generated and managed in our [Mappings repository](https://github.com/ViaVersion/Mappings). The
103+
generated mapping output is stored [here](./common/src/main/resources/assets/viaversion).
93104

94105
Resources
95106
--------

api/src/main/java/com/viaversion/viaversion/api/Via.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
* This file is part of ViaVersion - https://github.com/ViaVersion/ViaVersion
3-
* Copyright (C) 2016-2025 ViaVersion and contributors
3+
* Copyright (C) 2016-2026 ViaVersion and contributors
44
*
55
* Permission is hereby granted, free of charge, to any person obtaining a copy
66
* of this software and associated documentation files (the "Software"), to deal
@@ -84,4 +84,8 @@ private static ViaManager manager() {
8484
Preconditions.checkArgument(manager != null, "ViaVersion has not loaded the platform yet");
8585
return manager;
8686
}
87+
88+
public static boolean isLoaded() {
89+
return manager != null;
90+
}
8791
}

api/src/main/java/com/viaversion/viaversion/api/ViaAPI.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
* This file is part of ViaVersion - https://github.com/ViaVersion/ViaVersion
3-
* Copyright (C) 2016-2025 ViaVersion and contributors
3+
* Copyright (C) 2016-2026 ViaVersion and contributors
44
*
55
* Permission is hereby granted, free of charge, to any person obtaining a copy
66
* of this software and associated documentation files (the "Software"), to deal

api/src/main/java/com/viaversion/viaversion/api/ViaManager.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
* This file is part of ViaVersion - https://github.com/ViaVersion/ViaVersion
3-
* Copyright (C) 2016-2025 ViaVersion and contributors
3+
* Copyright (C) 2016-2026 ViaVersion and contributors
44
*
55
* Permission is hereby granted, free of charge, to any person obtaining a copy
66
* of this software and associated documentation files (the "Software"), to deal
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
/*
2+
* This file is part of ViaVersion - https://github.com/ViaVersion/ViaVersion
3+
* Copyright (C) 2016-2026 ViaVersion and contributors
4+
*
5+
* Permission is hereby granted, free of charge, to any person obtaining a copy
6+
* of this software and associated documentation files (the "Software"), to deal
7+
* in the Software without restriction, including without limitation the rights
8+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
* copies of the Software, and to permit persons to whom the Software is
10+
* furnished to do so, subject to the following conditions:
11+
*
12+
* The above copyright notice and this permission notice shall be included in all
13+
* copies or substantial portions of the Software.
14+
*
15+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
* SOFTWARE.
22+
*/
23+
package com.viaversion.viaversion.api.command;
24+
25+
import com.viaversion.viaversion.api.Via;
26+
import com.viaversion.viaversion.api.connection.UserConnection;
27+
import java.util.UUID;
28+
29+
public class UserConnectionViaCommandSender implements ViaCommandSender {
30+
31+
private final UserConnection connection;
32+
33+
public UserConnectionViaCommandSender(final UserConnection connection) {
34+
this.connection = connection;
35+
}
36+
37+
@Override
38+
public boolean hasPermission(String permission) {
39+
return true;
40+
}
41+
42+
@Override
43+
public void sendMessage(String msg) {
44+
Via.getPlatform().sendMessage(connection, msg);
45+
}
46+
47+
@Override
48+
public UUID getUUID() {
49+
return connection.getProtocolInfo().getUuid();
50+
}
51+
52+
@Override
53+
public String getName() {
54+
return connection.getProtocolInfo().getUsername();
55+
}
56+
}

0 commit comments

Comments
 (0)