From 2dc755ca982d7c6364e2e99eabec11da0a0b2180 Mon Sep 17 00:00:00 2001 From: DoctorMacc Date: Tue, 26 May 2020 10:05:25 -0400 Subject: [PATCH 1/4] Rename Geyser-Bukkit to Geyser-Spigot Despite the Bukkit suffix being correct in terms of the API, the name causes some people to download CraftBukkit instead of Spigot or Paper. All internal references to Bukkit have been renamed to Spigot. --- bootstrap/pom.xml | 2 +- bootstrap/{bukkit => spigot}/pom.xml | 10 ++--- .../spigot/GeyserSpigotConfiguration.java} | 8 ++-- .../platform/spigot/GeyserSpigotLogger.java} | 4 +- .../platform/spigot/GeyserSpigotMain.java} | 6 +-- .../spigot/GeyserSpigotPingPassthrough.java} | 6 +-- .../platform/spigot/GeyserSpigotPlugin.java} | 42 +++++++++---------- .../command/GeyserSpigotCommandExecutor.java} | 8 ++-- .../command/GeyserSpigotCommandManager.java} | 10 ++--- .../spigot/command/SpigotCommandSender.java} | 4 +- .../GeyserSpigotBlockPlaceListener.java} | 6 +-- .../world/GeyserSpigotWorldManager.java} | 6 +-- .../src/main/resources/plugin.yml | 4 +- .../java/world/JavaBlockChangeTranslator.java | 2 +- 14 files changed, 58 insertions(+), 60 deletions(-) rename bootstrap/{bukkit => spigot}/pom.xml (91%) rename bootstrap/{bukkit/src/main/java/org/geysermc/platform/bukkit/GeyserBukkitConfiguration.java => spigot/src/main/java/org/geysermc/platform/spigot/GeyserSpigotConfiguration.java} (96%) rename bootstrap/{bukkit/src/main/java/org/geysermc/platform/bukkit/GeyserBukkitLogger.java => spigot/src/main/java/org/geysermc/platform/spigot/GeyserSpigotLogger.java} (95%) rename bootstrap/{bukkit/src/main/java/org/geysermc/platform/bukkit/GeyserBukkitMain.java => spigot/src/main/java/org/geysermc/platform/spigot/GeyserSpigotMain.java} (91%) rename bootstrap/{bukkit/src/main/java/org/geysermc/platform/bukkit/GeyserBukkitPingPassthrough.java => spigot/src/main/java/org/geysermc/platform/spigot/GeyserSpigotPingPassthrough.java} (95%) rename bootstrap/{bukkit/src/main/java/org/geysermc/platform/bukkit/GeyserBukkitPlugin.java => spigot/src/main/java/org/geysermc/platform/spigot/GeyserSpigotPlugin.java} (82%) rename bootstrap/{bukkit/src/main/java/org/geysermc/platform/bukkit/command/GeyserBukkitCommandExecutor.java => spigot/src/main/java/org/geysermc/platform/spigot/command/GeyserSpigotCommandExecutor.java} (91%) rename bootstrap/{bukkit/src/main/java/org/geysermc/platform/bukkit/command/GeyserBukkitCommandManager.java => spigot/src/main/java/org/geysermc/platform/spigot/command/GeyserSpigotCommandManager.java} (88%) rename bootstrap/{bukkit/src/main/java/org/geysermc/platform/bukkit/command/BukkitCommandSender.java => spigot/src/main/java/org/geysermc/platform/spigot/command/SpigotCommandSender.java} (94%) rename bootstrap/{bukkit/src/main/java/org/geysermc/platform/bukkit/world/GeyserBukkitBlockPlaceListener.java => spigot/src/main/java/org/geysermc/platform/spigot/world/GeyserSpigotBlockPlaceListener.java} (95%) rename bootstrap/{bukkit/src/main/java/org/geysermc/platform/bukkit/world/GeyserBukkitWorldManager.java => spigot/src/main/java/org/geysermc/platform/spigot/world/GeyserSpigotWorldManager.java} (95%) rename bootstrap/{bukkit => spigot}/src/main/resources/plugin.yml (67%) diff --git a/bootstrap/pom.xml b/bootstrap/pom.xml index 6d12b6732..87302d4d8 100644 --- a/bootstrap/pom.xml +++ b/bootstrap/pom.xml @@ -35,8 +35,8 @@ - bukkit bungeecord + spigot sponge standalone velocity diff --git a/bootstrap/bukkit/pom.xml b/bootstrap/spigot/pom.xml similarity index 91% rename from bootstrap/bukkit/pom.xml rename to bootstrap/spigot/pom.xml index 1f831d673..d9ce9f8d1 100644 --- a/bootstrap/bukkit/pom.xml +++ b/bootstrap/spigot/pom.xml @@ -9,7 +9,7 @@ 1.0-SNAPSHOT ../ - bootstrap-bukkit + bootstrap-spigot org.geysermc @@ -31,7 +31,7 @@ - ${outputName}-Bukkit + ${outputName}-Spigot src/main/resources/ @@ -46,7 +46,7 @@ - org.geysermc.platform.bukkit.GeyserBukkitMain + org.geysermc.platform.spigot.GeyserSpigotMain @@ -65,11 +65,11 @@ io.netty - org.geysermc.platform.bukkit.shaded.netty + org.geysermc.platform.spigot.shaded.netty it.unimi.dsi.fastutil - org.geysermc.platform.bukkit.shaded.fastutil + org.geysermc.platform.spigot.shaded.fastutil diff --git a/bootstrap/bukkit/src/main/java/org/geysermc/platform/bukkit/GeyserBukkitConfiguration.java b/bootstrap/spigot/src/main/java/org/geysermc/platform/spigot/GeyserSpigotConfiguration.java similarity index 96% rename from bootstrap/bukkit/src/main/java/org/geysermc/platform/bukkit/GeyserBukkitConfiguration.java rename to bootstrap/spigot/src/main/java/org/geysermc/platform/spigot/GeyserSpigotConfiguration.java index df98b408d..ffa9c7b3d 100644 --- a/bootstrap/bukkit/src/main/java/org/geysermc/platform/bukkit/GeyserBukkitConfiguration.java +++ b/bootstrap/spigot/src/main/java/org/geysermc/platform/spigot/GeyserSpigotConfiguration.java @@ -23,7 +23,7 @@ * @link https://github.com/GeyserMC/Geyser */ -package org.geysermc.platform.bukkit; +package org.geysermc.platform.spigot; import org.bukkit.Bukkit; import org.bukkit.configuration.file.FileConfiguration; @@ -37,7 +37,7 @@ import java.nio.file.Paths; import java.util.HashMap; import java.util.Map; -public class GeyserBukkitConfiguration implements GeyserConfiguration { +public class GeyserSpigotConfiguration implements GeyserConfiguration { private FileConfiguration config; private File dataFolder; @@ -50,7 +50,7 @@ public class GeyserBukkitConfiguration implements GeyserConfiguration { private Path floodgateKey; - public GeyserBukkitConfiguration(File dataFolder, FileConfiguration config) { + public GeyserSpigotConfiguration(File dataFolder, FileConfiguration config) { this.dataFolder = dataFolder; this.config = config; @@ -66,7 +66,7 @@ public class GeyserBukkitConfiguration implements GeyserConfiguration { } } - 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(dataFolder.toString(), config.getString("floodgate-key-file", "public-key.pem")), floodgate, floodgate != null ? floodgate.getDataFolder().toPath() : null); } diff --git a/bootstrap/bukkit/src/main/java/org/geysermc/platform/bukkit/GeyserBukkitLogger.java b/bootstrap/spigot/src/main/java/org/geysermc/platform/spigot/GeyserSpigotLogger.java similarity index 95% rename from bootstrap/bukkit/src/main/java/org/geysermc/platform/bukkit/GeyserBukkitLogger.java rename to bootstrap/spigot/src/main/java/org/geysermc/platform/spigot/GeyserSpigotLogger.java index 08822568c..252d6bbed 100644 --- a/bootstrap/bukkit/src/main/java/org/geysermc/platform/bukkit/GeyserBukkitLogger.java +++ b/bootstrap/spigot/src/main/java/org/geysermc/platform/spigot/GeyserSpigotLogger.java @@ -23,7 +23,7 @@ * @link https://github.com/GeyserMC/Geyser */ -package org.geysermc.platform.bukkit; +package org.geysermc.platform.spigot; import lombok.AllArgsConstructor; @@ -33,7 +33,7 @@ import java.util.logging.Level; import java.util.logging.Logger; @AllArgsConstructor -public class GeyserBukkitLogger implements GeyserLogger { +public class GeyserSpigotLogger implements GeyserLogger { private Logger logger; private boolean debugMode; diff --git a/bootstrap/bukkit/src/main/java/org/geysermc/platform/bukkit/GeyserBukkitMain.java b/bootstrap/spigot/src/main/java/org/geysermc/platform/spigot/GeyserSpigotMain.java similarity index 91% rename from bootstrap/bukkit/src/main/java/org/geysermc/platform/bukkit/GeyserBukkitMain.java rename to bootstrap/spigot/src/main/java/org/geysermc/platform/spigot/GeyserSpigotMain.java index b6da66c1b..dbc660391 100644 --- a/bootstrap/bukkit/src/main/java/org/geysermc/platform/bukkit/GeyserBukkitMain.java +++ b/bootstrap/spigot/src/main/java/org/geysermc/platform/spigot/GeyserSpigotMain.java @@ -24,14 +24,14 @@ * */ -package org.geysermc.platform.bukkit; +package org.geysermc.platform.spigot; import org.geysermc.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() { diff --git a/bootstrap/bukkit/src/main/java/org/geysermc/platform/bukkit/GeyserBukkitPingPassthrough.java b/bootstrap/spigot/src/main/java/org/geysermc/platform/spigot/GeyserSpigotPingPassthrough.java similarity index 95% rename from bootstrap/bukkit/src/main/java/org/geysermc/platform/bukkit/GeyserBukkitPingPassthrough.java rename to bootstrap/spigot/src/main/java/org/geysermc/platform/spigot/GeyserSpigotPingPassthrough.java index 812467be7..6651adab9 100644 --- a/bootstrap/bukkit/src/main/java/org/geysermc/platform/bukkit/GeyserBukkitPingPassthrough.java +++ b/bootstrap/spigot/src/main/java/org/geysermc/platform/spigot/GeyserSpigotPingPassthrough.java @@ -24,7 +24,7 @@ * */ -package org.geysermc.platform.bukkit; +package org.geysermc.platform.spigot; import lombok.AllArgsConstructor; import org.bukkit.Bukkit; @@ -39,9 +39,9 @@ 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() { diff --git a/bootstrap/bukkit/src/main/java/org/geysermc/platform/bukkit/GeyserBukkitPlugin.java b/bootstrap/spigot/src/main/java/org/geysermc/platform/spigot/GeyserSpigotPlugin.java similarity index 82% rename from bootstrap/bukkit/src/main/java/org/geysermc/platform/bukkit/GeyserBukkitPlugin.java rename to bootstrap/spigot/src/main/java/org/geysermc/platform/spigot/GeyserSpigotPlugin.java index 5f0e967a2..b4e0158c8 100644 --- a/bootstrap/bukkit/src/main/java/org/geysermc/platform/bukkit/GeyserBukkitPlugin.java +++ b/bootstrap/spigot/src/main/java/org/geysermc/platform/spigot/GeyserSpigotPlugin.java @@ -23,7 +23,7 @@ * @link https://github.com/GeyserMC/Geyser */ -package org.geysermc.platform.bukkit; +package org.geysermc.platform.spigot; import org.bukkit.Bukkit; import org.bukkit.plugin.java.JavaPlugin; @@ -35,22 +35,22 @@ import org.geysermc.connector.command.CommandManager; import org.geysermc.connector.network.translators.world.WorldManager; import org.geysermc.connector.ping.GeyserLegacyPingPassthrough; import org.geysermc.connector.ping.IGeyserPingPassthrough; -import org.geysermc.platform.bukkit.command.GeyserBukkitCommandExecutor; -import org.geysermc.platform.bukkit.command.GeyserBukkitCommandManager; -import org.geysermc.platform.bukkit.world.GeyserBukkitBlockPlaceListener; -import org.geysermc.platform.bukkit.world.GeyserBukkitWorldManager; +import org.geysermc.platform.spigot.command.GeyserSpigotCommandExecutor; +import org.geysermc.platform.spigot.command.GeyserSpigotCommandManager; +import org.geysermc.platform.spigot.world.GeyserSpigotBlockPlaceListener; +import org.geysermc.platform.spigot.world.GeyserSpigotWorldManager; import us.myles.ViaVersion.api.Via; import java.util.UUID; -public class GeyserBukkitPlugin extends JavaPlugin implements GeyserBootstrap { +public class GeyserSpigotPlugin extends JavaPlugin implements GeyserBootstrap { - private GeyserBukkitCommandManager geyserCommandManager; - private GeyserBukkitConfiguration geyserConfig; - private GeyserBukkitLogger geyserLogger; + private GeyserSpigotCommandManager geyserCommandManager; + private GeyserSpigotConfiguration geyserConfig; + private GeyserSpigotLogger geyserLogger; private IGeyserPingPassthrough geyserBukkitPingPassthrough; - private GeyserBukkitBlockPlaceListener blockPlaceListener; - private GeyserBukkitWorldManager geyserWorldManager; + private GeyserSpigotBlockPlaceListener blockPlaceListener; + private GeyserSpigotWorldManager geyserWorldManager; private GeyserConnector connector; @@ -58,7 +58,7 @@ public class GeyserBukkitPlugin extends JavaPlugin implements GeyserBootstrap { public void onEnable() { saveDefaultConfig(); - this.geyserConfig = new GeyserBukkitConfiguration(getDataFolder(), getConfig()); + this.geyserConfig = new GeyserSpigotConfiguration(getDataFolder(), getConfig()); if (geyserConfig.getMetrics().getUniqueId().equals("generateduuid")) { getConfig().set("metrics.uuid", UUID.randomUUID().toString()); saveConfig(); @@ -73,20 +73,20 @@ public class GeyserBukkitPlugin extends JavaPlugin implements GeyserBootstrap { getConfig().set("remote.port", Bukkit.getPort()); saveConfig(); - this.geyserLogger = new GeyserBukkitLogger(getLogger(), geyserConfig.isDebugMode()); + this.geyserLogger = new GeyserSpigotLogger(getLogger(), geyserConfig.isDebugMode()); GeyserConfiguration.checkGeyserConfiguration(geyserConfig, geyserLogger); geyserConfig.loadFloodgate(this); - this.connector = GeyserConnector.start(PlatformType.BUKKIT, this); + this.connector = GeyserConnector.start(PlatformType.SPIGOT, this); if (geyserConfig.isLegacyPingPassthrough()) { this.geyserBukkitPingPassthrough = GeyserLegacyPingPassthrough.init(connector); } else { - this.geyserBukkitPingPassthrough = new GeyserBukkitPingPassthrough(geyserLogger); + this.geyserBukkitPingPassthrough = new GeyserSpigotPingPassthrough(geyserLogger); } - this.geyserCommandManager = new GeyserBukkitCommandManager(this, connector); + this.geyserCommandManager = new GeyserSpigotCommandManager(this, connector); boolean isViaVersion = false; // Used to determine if Block.getBlockData() is present. @@ -104,11 +104,11 @@ public class GeyserBukkitPlugin extends JavaPlugin implements GeyserBootstrap { } } - this.geyserWorldManager = new GeyserBukkitWorldManager(isLegacy, isViaVersion); - this.blockPlaceListener = new GeyserBukkitBlockPlaceListener(connector, isLegacy, isViaVersion); + this.geyserWorldManager = new GeyserSpigotWorldManager(isLegacy, isViaVersion); + this.blockPlaceListener = new GeyserSpigotBlockPlaceListener(connector, isLegacy, isViaVersion); Bukkit.getServer().getPluginManager().registerEvents(blockPlaceListener, this); - this.getCommand("geyser").setExecutor(new GeyserBukkitCommandExecutor(connector)); + this.getCommand("geyser").setExecutor(new GeyserSpigotCommandExecutor(connector)); } @Override @@ -117,12 +117,12 @@ public class GeyserBukkitPlugin extends JavaPlugin implements GeyserBootstrap { } @Override - public GeyserBukkitConfiguration getGeyserConfig() { + public GeyserSpigotConfiguration getGeyserConfig() { return geyserConfig; } @Override - public GeyserBukkitLogger getGeyserLogger() { + public GeyserSpigotLogger getGeyserLogger() { return geyserLogger; } diff --git a/bootstrap/bukkit/src/main/java/org/geysermc/platform/bukkit/command/GeyserBukkitCommandExecutor.java b/bootstrap/spigot/src/main/java/org/geysermc/platform/spigot/command/GeyserSpigotCommandExecutor.java similarity index 91% rename from bootstrap/bukkit/src/main/java/org/geysermc/platform/bukkit/command/GeyserBukkitCommandExecutor.java rename to bootstrap/spigot/src/main/java/org/geysermc/platform/spigot/command/GeyserSpigotCommandExecutor.java index d2603f7c5..b956a0d84 100644 --- a/bootstrap/bukkit/src/main/java/org/geysermc/platform/bukkit/command/GeyserBukkitCommandExecutor.java +++ b/bootstrap/spigot/src/main/java/org/geysermc/platform/spigot/command/GeyserSpigotCommandExecutor.java @@ -23,7 +23,7 @@ * @link https://github.com/GeyserMC/Geyser */ -package org.geysermc.platform.bukkit.command; +package org.geysermc.platform.spigot.command; import lombok.AllArgsConstructor; @@ -39,7 +39,7 @@ import java.util.Arrays; import java.util.List; @AllArgsConstructor -public class GeyserBukkitCommandExecutor implements TabExecutor { +public class GeyserSpigotCommandExecutor implements TabExecutor { private GeyserConnector connector; @@ -51,11 +51,11 @@ public class GeyserBukkitCommandExecutor implements TabExecutor { sender.sendMessage(ChatColor.RED + "You do not have permission to execute this command!"); return true; } - getCommand(args[0]).execute(new BukkitCommandSender(sender), args); + getCommand(args[0]).execute(new SpigotCommandSender(sender), args); return true; } } else { - getCommand("help").execute(new BukkitCommandSender(sender), args); + getCommand("help").execute(new SpigotCommandSender(sender), args); return true; } return true; diff --git a/bootstrap/bukkit/src/main/java/org/geysermc/platform/bukkit/command/GeyserBukkitCommandManager.java b/bootstrap/spigot/src/main/java/org/geysermc/platform/spigot/command/GeyserSpigotCommandManager.java similarity index 88% rename from bootstrap/bukkit/src/main/java/org/geysermc/platform/bukkit/command/GeyserBukkitCommandManager.java rename to bootstrap/spigot/src/main/java/org/geysermc/platform/spigot/command/GeyserSpigotCommandManager.java index b826ab1f5..2fbec1562 100644 --- a/bootstrap/bukkit/src/main/java/org/geysermc/platform/bukkit/command/GeyserBukkitCommandManager.java +++ b/bootstrap/spigot/src/main/java/org/geysermc/platform/spigot/command/GeyserSpigotCommandManager.java @@ -23,18 +23,18 @@ * @link https://github.com/GeyserMC/Geyser */ -package org.geysermc.platform.bukkit.command; +package org.geysermc.platform.spigot.command; import org.bukkit.Bukkit; import org.bukkit.command.Command; import org.bukkit.command.CommandMap; import org.geysermc.connector.GeyserConnector; import org.geysermc.connector.command.CommandManager; -import org.geysermc.platform.bukkit.GeyserBukkitPlugin; +import org.geysermc.platform.spigot.GeyserSpigotPlugin; import java.lang.reflect.Field; -public class GeyserBukkitCommandManager extends CommandManager { +public class GeyserSpigotCommandManager extends CommandManager { private static CommandMap COMMAND_MAP; @@ -48,9 +48,9 @@ public class GeyserBukkitCommandManager extends CommandManager { } } - private GeyserBukkitPlugin plugin; + private GeyserSpigotPlugin plugin; - public GeyserBukkitCommandManager(GeyserBukkitPlugin plugin, GeyserConnector connector) { + public GeyserSpigotCommandManager(GeyserSpigotPlugin plugin, GeyserConnector connector) { super(connector); this.plugin = plugin; diff --git a/bootstrap/bukkit/src/main/java/org/geysermc/platform/bukkit/command/BukkitCommandSender.java b/bootstrap/spigot/src/main/java/org/geysermc/platform/spigot/command/SpigotCommandSender.java similarity index 94% rename from bootstrap/bukkit/src/main/java/org/geysermc/platform/bukkit/command/BukkitCommandSender.java rename to bootstrap/spigot/src/main/java/org/geysermc/platform/spigot/command/SpigotCommandSender.java index 05e371e5a..55475a303 100644 --- a/bootstrap/bukkit/src/main/java/org/geysermc/platform/bukkit/command/BukkitCommandSender.java +++ b/bootstrap/spigot/src/main/java/org/geysermc/platform/spigot/command/SpigotCommandSender.java @@ -23,7 +23,7 @@ * @link https://github.com/GeyserMC/Geyser */ -package org.geysermc.platform.bukkit.command; +package org.geysermc.platform.spigot.command; import lombok.AllArgsConstructor; @@ -31,7 +31,7 @@ import org.bukkit.command.ConsoleCommandSender; import org.geysermc.connector.command.CommandSender; @AllArgsConstructor -public class BukkitCommandSender implements CommandSender { +public class SpigotCommandSender implements CommandSender { private org.bukkit.command.CommandSender handle; diff --git a/bootstrap/bukkit/src/main/java/org/geysermc/platform/bukkit/world/GeyserBukkitBlockPlaceListener.java b/bootstrap/spigot/src/main/java/org/geysermc/platform/spigot/world/GeyserSpigotBlockPlaceListener.java similarity index 95% rename from bootstrap/bukkit/src/main/java/org/geysermc/platform/bukkit/world/GeyserBukkitBlockPlaceListener.java rename to bootstrap/spigot/src/main/java/org/geysermc/platform/spigot/world/GeyserSpigotBlockPlaceListener.java index 76d1564ea..f17a97e37 100644 --- a/bootstrap/bukkit/src/main/java/org/geysermc/platform/bukkit/world/GeyserBukkitBlockPlaceListener.java +++ b/bootstrap/spigot/src/main/java/org/geysermc/platform/spigot/world/GeyserSpigotBlockPlaceListener.java @@ -24,7 +24,7 @@ * */ -package org.geysermc.platform.bukkit.world; +package org.geysermc.platform.spigot.world; import com.nukkitx.math.vector.Vector3f; import com.nukkitx.protocol.bedrock.data.SoundEvent; @@ -39,7 +39,7 @@ import org.geysermc.connector.network.session.GeyserSession; import org.geysermc.connector.network.translators.world.block.BlockTranslator; @AllArgsConstructor -public class GeyserBukkitBlockPlaceListener implements Listener { +public class GeyserSpigotBlockPlaceListener implements Listener { private final GeyserConnector connector; private final boolean isLegacy; @@ -55,7 +55,7 @@ public class GeyserBukkitBlockPlaceListener implements Listener { placeBlockSoundPacket.setBabySound(false); String javaBlockId; if (isLegacy) { - javaBlockId = BlockTranslator.getJavaIdBlockMap().inverse().get(GeyserBukkitWorldManager.getLegacyBlock(session, + javaBlockId = BlockTranslator.getJavaIdBlockMap().inverse().get(GeyserSpigotWorldManager.getLegacyBlock(session, event.getBlockPlaced().getX(), event.getBlockPlaced().getY(), event.getBlockPlaced().getZ(), isViaVersion)); } else { javaBlockId = event.getBlockPlaced().getBlockData().getAsString(); diff --git a/bootstrap/bukkit/src/main/java/org/geysermc/platform/bukkit/world/GeyserBukkitWorldManager.java b/bootstrap/spigot/src/main/java/org/geysermc/platform/spigot/world/GeyserSpigotWorldManager.java similarity index 95% rename from bootstrap/bukkit/src/main/java/org/geysermc/platform/bukkit/world/GeyserBukkitWorldManager.java rename to bootstrap/spigot/src/main/java/org/geysermc/platform/spigot/world/GeyserSpigotWorldManager.java index fbdf2a47b..4f7e54f76 100644 --- a/bootstrap/bukkit/src/main/java/org/geysermc/platform/bukkit/world/GeyserBukkitWorldManager.java +++ b/bootstrap/spigot/src/main/java/org/geysermc/platform/spigot/world/GeyserSpigotWorldManager.java @@ -24,23 +24,21 @@ * */ -package org.geysermc.platform.bukkit.world; +package org.geysermc.platform.spigot.world; import com.github.steveice10.mc.protocol.data.game.world.block.BlockState; import lombok.AllArgsConstructor; -import lombok.Getter; import org.bukkit.Bukkit; import org.bukkit.block.Block; import org.geysermc.connector.network.session.GeyserSession; import org.geysermc.connector.network.translators.world.WorldManager; import org.geysermc.connector.network.translators.world.block.BlockTranslator; -import org.geysermc.platform.bukkit.GeyserBukkitPlugin; import us.myles.ViaVersion.protocols.protocol1_13_1to1_13.Protocol1_13_1To1_13; import us.myles.ViaVersion.protocols.protocol1_15to1_14_4.data.MappingData; @AllArgsConstructor -public class GeyserBukkitWorldManager extends WorldManager { +public class GeyserSpigotWorldManager extends WorldManager { private final boolean isLegacy; // You need ViaVersion to connect to an older server with Geyser. diff --git a/bootstrap/bukkit/src/main/resources/plugin.yml b/bootstrap/spigot/src/main/resources/plugin.yml similarity index 67% rename from bootstrap/bukkit/src/main/resources/plugin.yml rename to bootstrap/spigot/src/main/resources/plugin.yml index 89c90789e..fee71ab1f 100644 --- a/bootstrap/bukkit/src/main/resources/plugin.yml +++ b/bootstrap/spigot/src/main/resources/plugin.yml @@ -1,5 +1,5 @@ -main: org.geysermc.platform.bukkit.GeyserBukkitPlugin -name: ${outputName}-Bukkit +main: org.geysermc.platform.spigot.GeyserSpigotPlugin +name: ${outputName}-Spigot author: ${project.organization.name} website: ${project.organization.url} version: ${project.version} diff --git a/connector/src/main/java/org/geysermc/connector/network/translators/java/world/JavaBlockChangeTranslator.java b/connector/src/main/java/org/geysermc/connector/network/translators/java/world/JavaBlockChangeTranslator.java index e09b9248d..9ff20a824 100644 --- a/connector/src/main/java/org/geysermc/connector/network/translators/java/world/JavaBlockChangeTranslator.java +++ b/connector/src/main/java/org/geysermc/connector/network/translators/java/world/JavaBlockChangeTranslator.java @@ -47,7 +47,7 @@ public class JavaBlockChangeTranslator extends PacketTranslator Date: Tue, 26 May 2020 10:11:28 -0400 Subject: [PATCH 2/4] Rename internal ping passthrough variable --- .../org/geysermc/platform/spigot/GeyserSpigotPlugin.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bootstrap/spigot/src/main/java/org/geysermc/platform/spigot/GeyserSpigotPlugin.java b/bootstrap/spigot/src/main/java/org/geysermc/platform/spigot/GeyserSpigotPlugin.java index b4e0158c8..cc0549654 100644 --- a/bootstrap/spigot/src/main/java/org/geysermc/platform/spigot/GeyserSpigotPlugin.java +++ b/bootstrap/spigot/src/main/java/org/geysermc/platform/spigot/GeyserSpigotPlugin.java @@ -48,7 +48,7 @@ public class GeyserSpigotPlugin extends JavaPlugin implements GeyserBootstrap { private GeyserSpigotCommandManager geyserCommandManager; private GeyserSpigotConfiguration geyserConfig; private GeyserSpigotLogger geyserLogger; - private IGeyserPingPassthrough geyserBukkitPingPassthrough; + private IGeyserPingPassthrough geyserSpigotPingPassthrough; private GeyserSpigotBlockPlaceListener blockPlaceListener; private GeyserSpigotWorldManager geyserWorldManager; @@ -81,9 +81,9 @@ public class GeyserSpigotPlugin extends JavaPlugin implements GeyserBootstrap { this.connector = GeyserConnector.start(PlatformType.SPIGOT, this); if (geyserConfig.isLegacyPingPassthrough()) { - this.geyserBukkitPingPassthrough = GeyserLegacyPingPassthrough.init(connector); + this.geyserSpigotPingPassthrough = GeyserLegacyPingPassthrough.init(connector); } else { - this.geyserBukkitPingPassthrough = new GeyserSpigotPingPassthrough(geyserLogger); + this.geyserSpigotPingPassthrough = new GeyserSpigotPingPassthrough(geyserLogger); } this.geyserCommandManager = new GeyserSpigotCommandManager(this, connector); @@ -133,7 +133,7 @@ public class GeyserSpigotPlugin extends JavaPlugin implements GeyserBootstrap { @Override public IGeyserPingPassthrough getGeyserPingPassthrough() { - return geyserBukkitPingPassthrough; + return geyserSpigotPingPassthrough; } @Override From cae888eac98f75305311bfea6873bf4d54659cde Mon Sep 17 00:00:00 2001 From: DoctorMacc Date: Tue, 26 May 2020 10:17:52 -0400 Subject: [PATCH 3/4] Include PlatformType.java --- common/src/main/java/org/geysermc/common/PlatformType.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/src/main/java/org/geysermc/common/PlatformType.java b/common/src/main/java/org/geysermc/common/PlatformType.java index fa6f57fda..29b2fce96 100644 --- a/common/src/main/java/org/geysermc/common/PlatformType.java +++ b/common/src/main/java/org/geysermc/common/PlatformType.java @@ -7,8 +7,8 @@ import lombok.Getter; @AllArgsConstructor public enum PlatformType { - BUKKIT("Bukkit"), BUNGEECORD("BungeeCord"), + SPIGOT("Spigot"), SPONGE("Sponge"), STANDALONE("Standalone"), VELOCITY("Velocity"); From ccf9eff7ca6cc6f67b79f7da0111dab8fd68a83d Mon Sep 17 00:00:00 2001 From: DoctorMacc Date: Tue, 26 May 2020 10:47:34 -0400 Subject: [PATCH 4/4] Update workflow --- .github/workflows/pullrequest.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index 7f941da6b..aa80bf056 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -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@v1 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@v1 if: success()