This commit is contained in:
Aikar
2025-01-03 14:09:29 -08:00
committed by granny
parent 0060eb2e2d
commit 6e8acc1a97
2 changed files with 149 additions and 164 deletions

View File

@@ -0,0 +1,149 @@
package org.purpurmc.purpur.util;
import io.papermc.paper.plugin.lifecycle.event.LifecycleEventManager;
import org.bukkit.Server;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.generator.BiomeProvider;
import org.bukkit.generator.ChunkGenerator;
import org.bukkit.plugin.Plugin;
import org.bukkit.plugin.PluginBase;
import org.bukkit.plugin.PluginDescriptionFile;
import org.bukkit.plugin.PluginLoader;
import org.bukkit.plugin.PluginLogger;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import java.io.File;
import java.io.InputStream;
import java.util.List;
public class MinecraftInternalPlugin extends PluginBase {
private boolean enabled = true;
private final String pluginName;
private PluginDescriptionFile pdf;
public MinecraftInternalPlugin() {
this.pluginName = "Minecraft";
pdf = new PluginDescriptionFile(pluginName, "1.0", "nms");
}
public void setEnabled(boolean enabled) {
this.enabled = enabled;
}
@Override
public File getDataFolder() {
throw new UnsupportedOperationException("Not supported.");
}
@Override
public PluginDescriptionFile getDescription() {
return pdf;
}
@Override
public io.papermc.paper.plugin.configuration.PluginMeta getPluginMeta() {
return pdf;
}
@Override
public FileConfiguration getConfig() {
throw new UnsupportedOperationException("Not supported.");
}
@Override
public InputStream getResource(String filename) {
throw new UnsupportedOperationException("Not supported.");
}
@Override
public void saveConfig() {
throw new UnsupportedOperationException("Not supported.");
}
@Override
public void saveDefaultConfig() {
throw new UnsupportedOperationException("Not supported.");
}
@Override
public void saveResource(String resourcePath, boolean replace) {
throw new UnsupportedOperationException("Not supported.");
}
@Override
public void reloadConfig() {
throw new UnsupportedOperationException("Not supported.");
}
@Override
public PluginLogger getLogger() {
throw new UnsupportedOperationException("Not supported.");
}
@Override
public PluginLoader getPluginLoader() {
throw new UnsupportedOperationException("Not supported.");
}
@Override
public Server getServer() {
throw new UnsupportedOperationException("Not supported.");
}
@Override
public boolean isEnabled() {
return enabled;
}
@Override
public void onDisable() {
throw new UnsupportedOperationException("Not supported.");
}
@Override
public void onLoad() {
throw new UnsupportedOperationException("Not supported.");
}
@Override
public void onEnable() {
throw new UnsupportedOperationException("Not supported.");
}
@Override
public boolean isNaggable() {
throw new UnsupportedOperationException("Not supported.");
}
@Override
public void setNaggable(boolean canNag) {
throw new UnsupportedOperationException("Not supported.");
}
@Override
public ChunkGenerator getDefaultWorldGenerator(String worldName, String id) {
throw new UnsupportedOperationException("Not supported.");
}
@Override
public @Nullable BiomeProvider getDefaultBiomeProvider(@NotNull String worldName, @Nullable String id) {
throw new UnsupportedOperationException("Not supported.");
}
@Override
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
throw new UnsupportedOperationException("Not supported.");
}
@Override
public List<String> onTabComplete(CommandSender sender, Command command, String alias, String[] args) {
throw new UnsupportedOperationException("Not supported.");
}
@Override
public @NotNull LifecycleEventManager<Plugin> getLifecycleManager() {
throw new UnsupportedOperationException("Not supported.");
}
}