3
0
Mirror von https://github.com/GeyserMC/Geyser.git synchronisiert 2024-10-03 08:21:06 +02:00

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.
Dieser Commit ist enthalten in:
DoctorMacc 2020-05-26 10:05:25 -04:00
Ursprung 14fcd77925
Commit 2dc755ca98
14 geänderte Dateien mit 58 neuen und 60 gelöschten Zeilen

Datei anzeigen

@ -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>

Datei anzeigen

@ -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>
@ -31,7 +31,7 @@
</dependency>
</dependencies>
<build>
<finalName>${outputName}-Bukkit</finalName>
<finalName>${outputName}-Spigot</finalName>
<resources>
<resource>
<directory>src/main/resources/</directory>
@ -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>
@ -65,11 +65,11 @@
<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>
</relocations>
</configuration>

Datei anzeigen

@ -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);
}

Datei anzeigen

@ -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;

Datei anzeigen

@ -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() {

Datei anzeigen

@ -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() {

Datei anzeigen

@ -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;
}

Datei anzeigen

@ -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;

Datei anzeigen

@ -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;

Datei anzeigen

@ -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;

Datei anzeigen

@ -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();

Datei anzeigen

@ -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.

Datei anzeigen

@ -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}

Datei anzeigen

@ -47,7 +47,7 @@ public class JavaBlockChangeTranslator extends PacketTranslator<ServerBlockChang
Position pos = packet.getRecord().getPosition();
boolean updatePlacement = !(session.getConnector().getConfig().isCacheChunks() && session.getConnector().getWorldManager().getBlockAt(session, pos.getX(), pos.getY(), pos.getZ()).getId() == packet.getRecord().getBlock().getId());
ChunkUtils.updateBlock(session, packet.getRecord().getBlock(), packet.getRecord().getPosition());
if (updatePlacement && session.getConnector().getPlatformType() != PlatformType.BUKKIT) {
if (updatePlacement && session.getConnector().getPlatformType() != PlatformType.SPIGOT) {
this.checkPlace(session, packet);
}
this.checkInteract(session, packet);