Skip to content

Commit

Permalink
Merge branch 'dev/3.0.0' into feature/no-known-channels
Browse files Browse the repository at this point in the history
# Conflicts:
#	proxy/src/main/java/com/velocitypowered/proxy/connection/client/ConnectedPlayer.java
#	proxy/src/main/java/com/velocitypowered/proxy/connection/client/InitialConnectSessionHandler.java
#	proxy/src/main/java/com/velocitypowered/proxy/util/collect/CappedSet.java
#	proxy/src/test/java/com/velocitypowered/proxy/util/collect/CappedSetTest.java
  • Loading branch information
astei committed Aug 18, 2023
2 parents 27167ff + 2aaf702 commit 453cc55
Show file tree
Hide file tree
Showing 472 changed files with 11,069 additions and 4,135 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# This workflow will build a Java project with Gradle
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle
# For more information see: https://docs.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle

name: Java CI with Gradle

Expand All @@ -9,11 +9,13 @@ jobs:
build-11:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- uses: gradle/wrapper-validation-action@v1
- name: Set up JDK 11
uses: actions/setup-java@v1
uses: actions/setup-java@v3
with:
java-version: 11
distribution: 'temurin'
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
*.iml
.idea_modules/
atlassian-ide-plugin.xml
.fleet/

### Eclipse ###
.metadata
Expand Down Expand Up @@ -81,10 +82,12 @@ gradle-app.setting
### Other trash ###
logs/
/velocity.toml
/forwarding.secret
server-icon.png
/bin/
run/
plugins/
lang/

### Natives stuff ###
native/mbedtls
Expand Down
11 changes: 0 additions & 11 deletions .travis.yml

This file was deleted.

29 changes: 16 additions & 13 deletions HEADER.txt
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
Copyright (C) 2018 Velocity Contributors
/*
* Copyright (C) $YEAR Velocity Contributors
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Velocity

[![Build Status](https://img.shields.io/jenkins/s/https/ci.velocitypowered.com/job/velocity.svg)](https://ci.velocitypowered.com/job/velocity-3.0.0/)
[![Join our Discord](https://img.shields.io/discord/472484458856185878.svg?logo=discord&label=)](https://discord.gg/8cB9Bgf)
[![Build Status](https://img.shields.io/github/actions/workflow/status/PaperMC/Velocity/gradle.yml)](https://papermc.io/downloads/velocity)
[![Join our Discord](https://img.shields.io/discord/289587909051416579.svg?logo=discord&label=)](https://discord.gg/papermc)

A Minecraft server proxy with unparalleled server support, scalability,
and flexibility.
Expand All @@ -15,7 +15,7 @@ Velocity is licensed under the GPLv3 license.
* High performance: handle thousands of players on one proxy.
* A new, refreshing API built from the ground up to be flexible and powerful
whilst avoiding design mistakes and suboptimal designs from other proxies.
* First-class support for Paper, Sponge, and Forge. (Other implementations
* First-class support for Paper, Sponge, Fabric and Forge. (Other implementations
may work, but we make every endeavor to support these server implementations
specifically.)

Expand All @@ -32,5 +32,5 @@ Once you've built Velocity, you can copy and run the `-all` JAR from
`proxy/build/libs`. Velocity will generate a default configuration file
and you can configure it from there.

Alternatively, you can get the proxy JAR from the [downloads](https://www.velocitypowered.com/downloads)
Alternatively, you can get the proxy JAR from the [downloads](https://papermc.io/downloads/velocity)
page.
9 changes: 6 additions & 3 deletions api/HEADER.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
Copyright (C) 2018 Velocity Contributors
/*
* Copyright (C) $YEAR Velocity Contributors
*
* The Velocity API is licensed under the terms of the MIT License. For more details,
* reference the LICENSE file in the api top-level directory.
*/

The Velocity API is licensed under the terms of the MIT License. For more details,
reference the LICENSE file in the api top-level directory.
118 changes: 0 additions & 118 deletions api/build.gradle

This file was deleted.

71 changes: 71 additions & 0 deletions api/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
plugins {
`java-library`
`maven-publish`
}

java {
withJavadocJar()
withSourcesJar()

sourceSets["main"].java {
srcDir("src/ap/java")
}

sourceSets["main"].resources {
srcDir("src/ap/resources")
}
}

dependencies {
api(libs.gson)
api(libs.guava)

// DEPRECATED: Will be removed in Velocity Polymer
api("com.moandjiezana.toml:toml4j:0.7.2")

api(platform(libs.adventure.bom))
api("net.kyori:adventure-api")
api("net.kyori:adventure-text-serializer-gson")
api("net.kyori:adventure-text-serializer-legacy")
api("net.kyori:adventure-text-serializer-plain")
api("net.kyori:adventure-text-minimessage")

api(libs.slf4j)
api(libs.guice)
api(libs.checker.qual)
api(libs.brigadier)
api(libs.bundles.configurate)
api(libs.caffeine)
}

tasks {
jar {
manifest {
attributes["Automatic-Module-Name"] = "com.velocitypowered.api"
}
}
withType<Javadoc> {
exclude("com/velocitypowered/api/plugin/ap/**")

val o = options as StandardJavadocDocletOptions
o.encoding = "UTF-8"
o.source = "8"

o.links(
"https://www.slf4j.org/apidocs/",
"https://guava.dev/releases/${libs.guava.get().version}/api/docs/",
"https://google.github.io/guice/api-docs/${libs.guice.get().version}/javadoc/",
"https://docs.oracle.com/en/java/javase/11/docs/api/",
"https://jd.advntr.dev/api/${libs.adventure.bom.get().version}/",
"https://javadoc.io/doc/com.github.ben-manes.caffeine/caffeine"
)

// Disable the crazy super-strict doclint tool in Java 8
o.addStringOption("Xdoclint:none", "-quiet")

// Remove "undefined" from search paths when generating javadoc for a non-modular project (JDK-8215291)
if (JavaVersion.current() >= JavaVersion.VERSION_1_9 && JavaVersion.current() < JavaVersion.VERSION_12) {
o.addBooleanOption("-no-module-directories", true)
}
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2018 Velocity Contributors
* Copyright (C) 2018-2023 Velocity Contributors
*
* The Velocity API is licensed under the terms of the MIT License. For more details,
* reference the LICENSE file in the api top-level directory.
Expand Down Expand Up @@ -27,6 +27,9 @@
import javax.tools.FileObject;
import javax.tools.StandardLocation;

/**
* Annotation processor for Velocity.
*/
@SupportedAnnotationTypes({"com.velocitypowered.api.plugin.Plugin"})
public class PluginAnnotationProcessor extends AbstractProcessor {

Expand Down Expand Up @@ -76,8 +79,8 @@ public synchronized boolean process(Set<? extends TypeElement> annotations,
if (!SerializedPluginDescription.ID_PATTERN.matcher(plugin.id()).matches()) {
environment.getMessager().printMessage(Diagnostic.Kind.ERROR, "Invalid ID for plugin "
+ qualifiedName
+ ". IDs must start alphabetically, have alphanumeric characters, and can "
+ "contain dashes or underscores.");
+ ". IDs must start alphabetically, have lowercase alphanumeric characters, and "
+ "can contain dashes or underscores.");
return false;
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2018 Velocity Contributors
* Copyright (C) 2018-2023 Velocity Contributors
*
* The Velocity API is licensed under the terms of the MIT License. For more details,
* reference the LICENSE file in the api top-level directory.
Expand All @@ -19,6 +19,9 @@
import java.util.stream.Collectors;
import org.checkerframework.checker.nullness.qual.Nullable;

/**
* Serialized version of {@link com.velocitypowered.api.plugin.PluginDescription}.
*/
public final class SerializedPluginDescription {

public static final Pattern ID_PATTERN = Pattern.compile("[a-z][a-z0-9-_]{0,63}");
Expand Down Expand Up @@ -130,6 +133,9 @@ public String toString() {
+ '}';
}

/**
* Represents a dependency.
*/
public static final class Dependency {

private final String id;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2018 Velocity Contributors
* Copyright (C) 2020-2021 Velocity Contributors
*
* The Velocity API is licensed under the terms of the MIT License. For more details,
* reference the LICENSE file in the api top-level directory.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@
/*
* Copyright (C) 2018 Velocity Contributors
* Copyright (C) 2018-2022 Velocity Contributors
*
* The Velocity API is licensed under the terms of the MIT License. For more details,
* reference the LICENSE file in the api top-level directory.
*/

package com.velocitypowered.api.command;

import com.google.common.collect.ImmutableList;
import com.velocitypowered.api.proxy.Player;
import java.util.List;
import java.util.concurrent.CompletableFuture;
import org.checkerframework.checker.nullness.qual.NonNull;

/**
* Represents a command that can be executed by a {@link CommandSource}
Expand Down
Loading

0 comments on commit 453cc55

Please sign in to comment.