Skip to content

Commit

Permalink
Merge branch 'feature/mcee-1.16' into t/bleeding
Browse files Browse the repository at this point in the history
# Conflicts:
#	.github/workflows-disabled/pullrequest.yml
#	bootstrap/spigot/src/main/java/org/geysermc/platform/spigot/GeyserSpigotPlugin.java
  • Loading branch information
bundabrg committed Jun 30, 2020
2 parents 1c761d4 + 439e2fd commit 6b777b6
Show file tree
Hide file tree
Showing 305 changed files with 88,772 additions and 5,924 deletions.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ jobs:
with:
name: Geyser Standalone
path: bootstrap/standalone/target/Geyser.jar
- name: Archive artifacts (Geyser Bukkit)
- name: Archive artifacts (Geyser Spigot)
uses: actions/upload-artifact@v2
if: success()
with:
name: Geyser Bukkit
path: bootstrap/bukkit/target/Geyser-Bukkit.jar
name: Geyser Spigot
path: bootstrap/spigot/target/Geyser-Spigot.jar
- name: Archive artifacts (Geyser BungeeCord)
uses: actions/upload-artifact@v2
if: success()
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -227,3 +227,7 @@ config.yml
logs/
public-key.pem
locales/
tokens.yml

## Ignore old mappings folder
connector/src/main/resources/mappings
8 changes: 6 additions & 2 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
[submodule "connector/src/main/resources/mappings"]
path = connector/src/main/resources/mappings
[submodule "connector/src/main/resources/bedrock/mappings"]
path = connector/src/main/resources/bedrock/mappings
url = https://github.com/GeyserMC/mappings.git
branch = feature/1.16
[submodule "connector/src/main/resources/education/mappings"]
path = connector/src/main/resources/education/mappings
url = https://github.com/Bundabrg/mappings-education.git
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ The ultimate goal of this project is to allow Minecraft: Bedrock Edition users t

Special thanks to the DragonProxy project for being a trailblazer in protocol translation and for all the team members who have now joined us here!

### Currently supporting Minecraft Bedrock v1.14.6(0) and Minecraft Java v1.15.2.
### Currently supporting Minecraft Bedrock v1.16.0 and Minecraft Java v1.16.1.

## Setting Up
Take a look [here](https://github.com/GeyserMC/Geyser/wiki#Setup) for how to set up Geyser.
Expand Down
4 changes: 4 additions & 0 deletions bootstrap/bungeecord/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@
<pattern>io.netty</pattern>
<shadedPattern>org.geysermc.platform.bungeecord.shaded.netty</shadedPattern>
</relocation>
<relocation>
<pattern>org.reflections.reflections</pattern>
<shadedPattern>org.geysermc.platform.bungeecord.shaded.reflections</shadedPattern>
</relocation>
</relocations>
</configuration>
</execution>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
/*
* Copyright (c) 2019-2020 GeyserMC. http://geysermc.org
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*
* @author GeyserMC
* @link https://github.com/GeyserMC/Geyser
*
*/

package org.geysermc.platform.bungeecord;

import lombok.Getter;
import net.md_5.bungee.api.ProxyServer;
import net.md_5.bungee.api.plugin.Plugin;
import org.geysermc.connector.dump.BootstrapDumpInfo;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

@Getter
public class GeyserBungeeDumpInfo extends BootstrapDumpInfo {

private String platformName;
private String platformVersion;
private boolean onlineMode;
private List<ListenerInfo> listeners;
private List<PluginInfo> plugins;

GeyserBungeeDumpInfo(ProxyServer proxy) {
super();
this.platformName = proxy.getName();
this.platformVersion = proxy.getVersion();
this.onlineMode = proxy.getConfig().isOnlineMode();
this.listeners = new ArrayList<>();
this.plugins = new ArrayList<>();

for (net.md_5.bungee.api.config.ListenerInfo listener : proxy.getConfig().getListeners()) {
this.listeners.add(new ListenerInfo(listener.getHost().getHostString(), listener.getHost().getPort()));
}

for (Plugin plugin : proxy.getPluginManager().getPlugins()) {
this.plugins.add(new PluginInfo(true, plugin.getDescription().getName(), plugin.getDescription().getVersion(), plugin.getDescription().getMain(), Arrays.asList(plugin.getDescription().getAuthor())));
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

package org.geysermc.platform.bungeecord;

import org.geysermc.common.main.IGeyserMain;
import org.geysermc.connector.common.main.IGeyserMain;

public class GeyserBungeeMain extends IGeyserMain {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
import net.md_5.bungee.api.event.ProxyPingEvent;
import net.md_5.bungee.api.plugin.Listener;
import net.md_5.bungee.protocol.ProtocolConstants;
import org.geysermc.common.ping.GeyserPingInfo;
import org.geysermc.connector.common.ping.GeyserPingInfo;
import org.geysermc.connector.ping.IGeyserPingPassthrough;

import java.net.Inet4Address;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,12 @@
import net.md_5.bungee.config.Configuration;
import net.md_5.bungee.config.ConfigurationProvider;
import net.md_5.bungee.config.YamlConfiguration;
import org.geysermc.common.PlatformType;
import org.geysermc.connector.common.PlatformType;
import org.geysermc.connector.GeyserConnector;
import org.geysermc.connector.bootstrap.GeyserBootstrap;
import org.geysermc.connector.command.CommandManager;
import org.geysermc.connector.configuration.GeyserConfiguration;
import org.geysermc.connector.dump.BootstrapDumpInfo;
import org.geysermc.connector.ping.GeyserLegacyPingPassthrough;
import org.geysermc.connector.ping.IGeyserPingPassthrough;
import org.geysermc.connector.utils.FileUtils;
Expand Down Expand Up @@ -98,7 +99,12 @@ public void onEnable() {

geyserConfig.loadFloodgate(this, configuration);

this.connector = GeyserConnector.start(PlatformType.BUNGEECORD, this);
try {
this.connector = GeyserConnector.start(PlatformType.BUNGEECORD, this);
} catch (GeyserConnector.GeyserConnectorException e) {
getLogger().log(Level.SEVERE, e.getMessage(), e.getCause());
return;
}

this.geyserCommandManager = new GeyserBungeeCommandManager(connector);

Expand Down Expand Up @@ -140,4 +146,9 @@ public IGeyserPingPassthrough getGeyserPingPassthrough() {
public Path getConfigFolder() {
return getDataFolder().toPath();
}

@Override
public BootstrapDumpInfo getDumpInfo() {
return new GeyserBungeeDumpInfo(getProxy());
}
}
2 changes: 1 addition & 1 deletion bootstrap/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@
</repository>
</repositories>
<modules>
<module>bukkit</module>
<module>bungeecord</module>
<module>spigot</module>
<module>sponge</module>
<module>standalone</module>
<module>velocity</module>
Expand Down
16 changes: 10 additions & 6 deletions bootstrap/bukkit/pom.xml → bootstrap/spigot/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<version>1.0-SNAPSHOT</version>
<relativePath>../</relativePath>
</parent>
<artifactId>bootstrap-bukkit</artifactId>
<artifactId>bootstrap-spigot</artifactId>
<dependencies>
<dependency>
<groupId>org.geysermc</groupId>
Expand All @@ -31,7 +31,7 @@
</dependency>
</dependencies>
<build>
<finalName>${outputName}-Bukkit</finalName>
<finalName>${outputName}-Spigot</finalName>
<resources>
<resource>
<directory>src/main/resources/</directory>
Expand All @@ -46,7 +46,7 @@
<configuration>
<archive>
<manifestEntries>
<Main-Class>org.geysermc.platform.bukkit.GeyserBukkitMain</Main-Class>
<Main-Class>org.geysermc.platform.spigot.GeyserSpigotMain</Main-Class>
</manifestEntries>
</archive>
</configuration>
Expand All @@ -65,15 +65,19 @@
<relocations>
<relocation>
<pattern>io.netty</pattern>
<shadedPattern>org.geysermc.platform.bukkit.shaded.netty</shadedPattern>
<shadedPattern>org.geysermc.platform.spigot.shaded.netty</shadedPattern>
</relocation>
<relocation>
<pattern>it.unimi.dsi.fastutil</pattern>
<shadedPattern>org.geysermc.platform.bukkit.shaded.fastutil</shadedPattern>
<shadedPattern>org.geysermc.platform.spigot.shaded.fastutil</shadedPattern>
</relocation>
<relocation>
<pattern>com.fasterxml.jackson</pattern>
<shadedPattern>org.geysermc.platform.bukkit.shaded.jackson</shadedPattern>
<shadedPattern>org.geysermc.platform.spigot.shaded.jackson</shadedPattern>
</relocation>
<relocation>
<pattern>org.reflections.reflections</pattern>
<shadedPattern>org.geysermc.platform.spigot.shaded.reflections</shadedPattern>
</relocation>
</relocations>
</configuration>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
* @link https://github.com/GeyserMC/Geyser
*/

package org.geysermc.platform.bukkit;
package org.geysermc.platform.spigot;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
Expand All @@ -38,14 +38,14 @@

@Getter
@JsonIgnoreProperties(ignoreUnknown = true)
public class GeyserBukkitConfiguration extends GeyserJacksonConfiguration {
public class GeyserSpigotConfiguration extends GeyserJacksonConfiguration {

@JsonProperty("floodgate-key-file")
private String floodgateKeyFile;

private Path floodgateKey;

public void loadFloodgate(GeyserBukkitPlugin plugin) {
public void loadFloodgate(GeyserSpigotPlugin plugin) {
Plugin floodgate = Bukkit.getPluginManager().getPlugin("floodgate-bukkit");
floodgateKey = FloodgateKeyLoader.getKey(plugin.getGeyserLogger(), this, Paths.get(plugin.getDataFolder().toString(), plugin.getConfig().getString("floodgate-key-file", "public-key.pem")), floodgate, floodgate != null ? floodgate.getDataFolder().toPath() : null);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
/*
* Copyright (c) 2019-2020 GeyserMC. http://geysermc.org
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*
* @author GeyserMC
* @link https://github.com/GeyserMC/Geyser
*
*/

package org.geysermc.platform.spigot;

import lombok.Getter;
import org.bukkit.Bukkit;
import org.bukkit.plugin.Plugin;
import org.geysermc.connector.dump.BootstrapDumpInfo;

import java.util.ArrayList;
import java.util.List;

@Getter
public class GeyserSpigotDumpInfo extends BootstrapDumpInfo {

private String platformName;
private String platformVersion;
private String platformAPIVersion;
private boolean onlineMode;
private String serverIP;
private int serverPort;
private List<PluginInfo> plugins;

GeyserSpigotDumpInfo() {
super();
this.platformName = Bukkit.getName();
this.platformVersion = Bukkit.getVersion();
this.platformAPIVersion = Bukkit.getBukkitVersion();
this.onlineMode = Bukkit.getOnlineMode();
this.serverIP = Bukkit.getIp();
this.serverPort = Bukkit.getPort();
this.plugins = new ArrayList<>();

for (Plugin plugin : Bukkit.getPluginManager().getPlugins()) {
this.plugins.add(new PluginInfo(plugin.isEnabled(), plugin.getName(), plugin.getDescription().getVersion(), plugin.getDescription().getMain(), plugin.getDescription().getAuthors()));
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
* @link https://github.com/GeyserMC/Geyser
*/

package org.geysermc.platform.bukkit;
package org.geysermc.platform.spigot;

import lombok.AllArgsConstructor;

Expand All @@ -33,7 +33,7 @@
import java.util.logging.Logger;

@AllArgsConstructor
public class GeyserBukkitLogger implements GeyserLogger {
public class GeyserSpigotLogger implements GeyserLogger {

private Logger logger;
private boolean debugMode;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@
*
*/

package org.geysermc.platform.bukkit;
package org.geysermc.platform.spigot;

import org.geysermc.common.main.IGeyserMain;
import org.geysermc.connector.common.main.IGeyserMain;

public class GeyserBukkitMain extends IGeyserMain {
public class GeyserSpigotMain extends IGeyserMain {

public static void main(String[] args) {
new GeyserBukkitMain().displayMessage();
new GeyserSpigotMain().displayMessage();
}

public String getPluginType() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,24 +24,24 @@
*
*/

package org.geysermc.platform.bukkit;
package org.geysermc.platform.spigot;

import lombok.AllArgsConstructor;
import org.bukkit.Bukkit;
import org.bukkit.entity.Player;
import org.bukkit.event.server.ServerListPingEvent;
import org.bukkit.util.CachedServerIcon;
import org.geysermc.common.ping.GeyserPingInfo;
import org.geysermc.connector.common.ping.GeyserPingInfo;
import org.geysermc.connector.ping.IGeyserPingPassthrough;

import java.net.InetAddress;
import java.util.Collections;
import java.util.Iterator;

@AllArgsConstructor
public class GeyserBukkitPingPassthrough implements IGeyserPingPassthrough {
public class GeyserSpigotPingPassthrough implements IGeyserPingPassthrough {

private final GeyserBukkitLogger logger;
private final GeyserSpigotLogger logger;

@Override
public GeyserPingInfo getPingInformation() {
Expand Down
Loading

0 comments on commit 6b777b6

Please sign in to comment.