Skip to content

Commit

Permalink
Rename project to Paper Template Plugin
Browse files Browse the repository at this point in the history
This is in preparation for automatic naming removing "plugin" at the end.
  • Loading branch information
esotericenderman committed Oct 11, 2024
1 parent 1569a97 commit 012acba
Show file tree
Hide file tree
Showing 21 changed files with 54 additions and 54 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Template Paper Plugin
# Paper Template Plugin

> A template repository for easily developing Minecraft Paper plugins.
Expand Down
4 changes: 2 additions & 2 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ plugins {
id("org.gradle.toolchains.foojay-resolver-convention") version "0.8.0"
}

val projectName = "Template Paper Plugin"
val projectName = "Paper Template Plugin"

rootProject.name = "template-paper-plugin"
rootProject.name = "paper-template-plugin"
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
import org.esoteric.minecraft.plugins.template.language.Message;
import org.esoteric.minecraft.plugins.template.resourcepack.ResourcePackManager;

public final class TemplatePaperPlugin extends JavaPlugin {
public final class PaperTemplatePlugin extends JavaPlugin {

private FileManager fileManager;
private PlayerDataManager playerDataManager;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@
import dev.jorel.commandapi.arguments.CustomArgument;
import dev.jorel.commandapi.arguments.CustomArgument.CustomArgumentException;
import dev.jorel.commandapi.arguments.StringArgument;
import org.esoteric.minecraft.plugins.template.TemplatePaperPlugin;
import org.esoteric.minecraft.plugins.template.PaperTemplatePlugin;
import org.esoteric.minecraft.plugins.template.custom.items.CustomItem;
import org.esoteric.minecraft.plugins.template.language.Message;

import java.util.stream.Stream;

public class GiveCustomItemCommand extends CommandAPICommand {

public GiveCustomItemCommand(TemplatePaperPlugin plugin) {
public GiveCustomItemCommand(PaperTemplatePlugin plugin) {
super("give-custom-item");

String customItemArgumentNodeName = "custom-item-id";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@
import dev.jorel.commandapi.arguments.CustomArgument;
import dev.jorel.commandapi.arguments.CustomArgument.CustomArgumentException;
import dev.jorel.commandapi.arguments.StringArgument;
import org.esoteric.minecraft.plugins.template.TemplatePaperPlugin;
import org.esoteric.minecraft.plugins.template.PaperTemplatePlugin;
import org.esoteric.minecraft.plugins.template.custom.multiblocks.CustomMultiblock;
import org.esoteric.minecraft.plugins.template.language.Message;

import java.util.stream.Stream;

public class PlaceCustomMultiblockCommand extends CommandAPICommand {

public PlaceCustomMultiblockCommand(TemplatePaperPlugin plugin) {
public PlaceCustomMultiblockCommand(PaperTemplatePlugin plugin) {
super("place-custom-multiblock");

String customMultiblockArgumentNodeName = "custom-multiblock-id";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import dev.jorel.commandapi.arguments.CustomArgument.CustomArgumentException;
import dev.jorel.commandapi.arguments.GreedyStringArgument;
import net.kyori.adventure.text.Component;
import org.esoteric.minecraft.plugins.template.TemplatePaperPlugin;
import org.esoteric.minecraft.plugins.template.PaperTemplatePlugin;
import org.esoteric.minecraft.plugins.template.language.LanguageManager;
import org.esoteric.minecraft.plugins.template.language.Message;
import org.jetbrains.annotations.NotNull;
Expand All @@ -16,7 +16,7 @@

public class SetLanguageCommand extends CommandAPICommand {

public SetLanguageCommand(@NotNull TemplatePaperPlugin plugin) {
public SetLanguageCommand(@NotNull PaperTemplatePlugin plugin) {
super("set-language");

LanguageManager languageManager = plugin.getLanguageManager();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@
import dev.jorel.commandapi.arguments.CustomArgument;
import dev.jorel.commandapi.arguments.CustomArgument.CustomArgumentException;
import dev.jorel.commandapi.arguments.StringArgument;
import org.esoteric.minecraft.plugins.template.TemplatePaperPlugin;
import org.esoteric.minecraft.plugins.template.PaperTemplatePlugin;
import org.esoteric.minecraft.plugins.template.custom.multientities.CustomMultientity;
import org.esoteric.minecraft.plugins.template.language.Message;

import java.util.stream.Stream;

public class SpawnCustomMultientityCommand extends CommandAPICommand {

public SpawnCustomMultientityCommand(TemplatePaperPlugin plugin) {
public SpawnCustomMultientityCommand(PaperTemplatePlugin plugin) {
super("spawn-custom-multientity");

String customMultientityArgumentNodeName = "custom-multientity-id";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
import org.bukkit.event.Listener;
import org.bukkit.inventory.ItemStack;
import org.bukkit.persistence.PersistentDataType;
import org.esoteric.minecraft.plugins.template.TemplatePaperPlugin;
import org.esoteric.minecraft.plugins.template.PaperTemplatePlugin;
import org.jetbrains.annotations.NotNull;

public abstract class AbstractCustomItem implements Listener {

private final TemplatePaperPlugin plugin;
private final PaperTemplatePlugin plugin;

private final CustomItem itemId;
private final Material material;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
package org.esoteric.minecraft.plugins.template.custom.items;

import org.bukkit.entity.Player;
import org.esoteric.minecraft.plugins.template.TemplatePaperPlugin;
import org.esoteric.minecraft.plugins.template.PaperTemplatePlugin;

import java.util.HashMap;
import java.util.Map;

public class CustomItemManager {

private final TemplatePaperPlugin plugin;
private final PaperTemplatePlugin plugin;

private final Map<CustomItem, AbstractCustomItem> customItemMap = new HashMap<>();

public TemplatePaperPlugin getPlugin() {
public PaperTemplatePlugin getPlugin() {
return plugin;
}

public CustomItemManager(TemplatePaperPlugin plugin) {
public CustomItemManager(PaperTemplatePlugin plugin) {
this.plugin = plugin;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import org.bukkit.Location;
import org.bukkit.block.Block;
import org.bukkit.event.Listener;
import org.esoteric.minecraft.plugins.template.TemplatePaperPlugin;
import org.esoteric.minecraft.plugins.template.PaperTemplatePlugin;
import org.esoteric.minecraft.plugins.template.util.types.BlockLocation;
import org.jetbrains.annotations.NotNull;

Expand All @@ -13,7 +13,7 @@

public abstract class AbstractCustomMultiblock implements Listener {

protected final TemplatePaperPlugin plugin;
protected final PaperTemplatePlugin plugin;

private final List<List<BlockLocation>> multiblocks = new ArrayList<>();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import com.google.gson.Gson;
import org.bukkit.Location;
import org.esoteric.minecraft.plugins.template.TemplatePaperPlugin;
import org.esoteric.minecraft.plugins.template.PaperTemplatePlugin;
import org.jetbrains.annotations.NotNull;

import java.io.*;
Expand All @@ -14,7 +14,7 @@

public class CustomMultiblockManager {

private final TemplatePaperPlugin plugin;
private final PaperTemplatePlugin plugin;

private final String multiblocksFileExtension = ".json";
private final String multiblocksResourceFilePath = "data" + File.separator + "multiblocks" + multiblocksFileExtension;
Expand All @@ -23,11 +23,11 @@ public class CustomMultiblockManager {

private final Map<CustomMultiblock, AbstractCustomMultiblock> customMultiblockMap = new HashMap<>();

public TemplatePaperPlugin getPlugin() {
public PaperTemplatePlugin getPlugin() {
return plugin;
}

public CustomMultiblockManager(@NotNull TemplatePaperPlugin plugin) {
public CustomMultiblockManager(@NotNull PaperTemplatePlugin plugin) {
this.plugin = plugin;

multiblocksFilePath = plugin.getDataFolder() + File.separator + multiblocksResourceFilePath;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
import org.bukkit.entity.Entity;
import org.bukkit.event.Listener;
import org.bukkit.persistence.PersistentDataType;
import org.esoteric.minecraft.plugins.template.TemplatePaperPlugin;
import org.esoteric.minecraft.plugins.template.PaperTemplatePlugin;
import org.jetbrains.annotations.NotNull;

import java.util.List;

public abstract class AbstractCustomMultientity<E extends Entity> implements Listener {

protected final TemplatePaperPlugin plugin;
protected final PaperTemplatePlugin plugin;

private final CustomMultientity entityId;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,23 @@

import org.bukkit.Location;
import org.bukkit.entity.Entity;
import org.esoteric.minecraft.plugins.template.TemplatePaperPlugin;
import org.esoteric.minecraft.plugins.template.PaperTemplatePlugin;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class CustomMultientityManager {

private final TemplatePaperPlugin plugin;
private final PaperTemplatePlugin plugin;

private final Map<CustomMultientity, AbstractCustomMultientity<?>> customMultientityMap = new HashMap<>();

public TemplatePaperPlugin getPlugin() {
public PaperTemplatePlugin getPlugin() {
return plugin;
}

public CustomMultientityManager(TemplatePaperPlugin plugin) {
public CustomMultientityManager(PaperTemplatePlugin plugin) {
this.plugin = plugin;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import com.google.gson.Gson;
import org.bukkit.entity.Player;
import org.esoteric.minecraft.plugins.template.TemplatePaperPlugin;
import org.esoteric.minecraft.plugins.template.PaperTemplatePlugin;
import org.jetbrains.annotations.NotNull;

import java.io.File;
Expand All @@ -16,7 +16,7 @@

public class PlayerDataManager {

private final TemplatePaperPlugin plugin;
private final PaperTemplatePlugin plugin;

private final String playerDataFilesExtension = ".json";

Expand All @@ -26,7 +26,7 @@ public class PlayerDataManager {

private final Map<UUID, PlayerProfile> playerData = new HashMap<>();

public PlayerDataManager(@NotNull TemplatePaperPlugin plugin) {
public PlayerDataManager(@NotNull PaperTemplatePlugin plugin) {
this.plugin = plugin;

playerDataFolderPath = plugin.getDataPath() + File.separator + playerDataFolderName;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
package org.esoteric.minecraft.plugins.template.file;

import org.esoteric.minecraft.plugins.template.TemplatePaperPlugin;
import org.esoteric.minecraft.plugins.template.PaperTemplatePlugin;

import java.io.File;
import java.io.IOException;

public class FileManager {

private final TemplatePaperPlugin plugin;
private final PaperTemplatePlugin plugin;

public FileManager(TemplatePaperPlugin plugin) {
public FileManager(PaperTemplatePlugin plugin) {
this.plugin = plugin;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import com.sun.net.httpserver.HttpHandler;
import com.sun.net.httpserver.HttpServer;
import org.bukkit.Bukkit;
import org.esoteric.minecraft.plugins.template.TemplatePaperPlugin;
import org.esoteric.minecraft.plugins.template.PaperTemplatePlugin;
import org.esoteric.minecraft.plugins.template.file.FileUtil;
import org.esoteric.minecraft.plugins.template.http.server.event.listeners.PlayerJoinListener;
import org.esoteric.minecraft.plugins.template.resourcepack.ResourcePackManager;
Expand All @@ -18,7 +18,7 @@

public class HttpServerManager {

private TemplatePaperPlugin plugin;
private PaperTemplatePlugin plugin;

private String hostName;
private int port;
Expand All @@ -40,7 +40,7 @@ public String getSocketAddress() {
return getHostName() + ":" + getPort();
}

public HttpServerManager(@NotNull TemplatePaperPlugin plugin) {
public HttpServerManager(@NotNull PaperTemplatePlugin plugin) {
if (plugin.getResourcePackManager().getResourcePackZipFile() == null) {
return;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.player.PlayerJoinEvent;
import org.esoteric.minecraft.plugins.template.TemplatePaperPlugin;
import org.esoteric.minecraft.plugins.template.PaperTemplatePlugin;
import org.esoteric.minecraft.plugins.template.file.FileUtil;
import org.esoteric.minecraft.plugins.template.http.server.HttpServerManager;
import org.jetbrains.annotations.NotNull;
Expand All @@ -17,7 +17,7 @@ public class PlayerJoinListener implements Listener {

private ResourcePackInfo resourcePackInfo;

public PlayerJoinListener(@NotNull TemplatePaperPlugin plugin, @NotNull HttpServerManager httpServerManager) {
public PlayerJoinListener(@NotNull PaperTemplatePlugin plugin, @NotNull HttpServerManager httpServerManager) {
resourcePackInfo = ResourcePackInfo.resourcePackInfo().hash(FileUtil.getSha1HexString(plugin.getResourcePackManager().getResourcePackZipFile()))
.uri(URI.create("http://" + httpServerManager.getSocketAddress() + "/")).build();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import org.bukkit.command.CommandSender;
import org.bukkit.configuration.file.YamlConfiguration;
import org.bukkit.entity.Player;
import org.esoteric.minecraft.plugins.template.TemplatePaperPlugin;
import org.esoteric.minecraft.plugins.template.PaperTemplatePlugin;
import org.esoteric.minecraft.plugins.template.data.player.PlayerProfile;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
Expand All @@ -20,7 +20,7 @@ public class LanguageManager {

private final MiniMessage miniMessage = MiniMessage.miniMessage();

private final TemplatePaperPlugin plugin;
private final PaperTemplatePlugin plugin;

private final String languageMessageFilesExtension = ".yaml";

Expand All @@ -40,7 +40,7 @@ public Set<String> getLanguages() {
return languages.keySet();
}

public LanguageManager(@NotNull TemplatePaperPlugin plugin) {
public LanguageManager(@NotNull PaperTemplatePlugin plugin) {
this.plugin = plugin;

languagesFolderPath = plugin.getDataPath() + File.separator + languagesFolderName;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
package org.esoteric.minecraft.plugins.template.resourcepack;

import org.apache.commons.io.FileUtils;
import org.esoteric.minecraft.plugins.template.TemplatePaperPlugin;
import org.esoteric.minecraft.plugins.template.PaperTemplatePlugin;
import org.esoteric.minecraft.plugins.template.file.FileUtil;

import java.io.File;
import java.util.List;

public class ResourcePackManager {

private final TemplatePaperPlugin plugin;
private final PaperTemplatePlugin plugin;

private final String resourcePackResourceFolderName = String.join(" ", TemplatePaperPlugin.class.getSimpleName().split("(?=[A-Z])")) + " Resource Pack";
private final String resourcePackResourceFolderName = String.join(" ", PaperTemplatePlugin.class.getSimpleName().split("(?=[A-Z])")) + " Resource Pack";

private final String resourcePackFileType = "application";
private final String resourcePackFileExtension = "zip";
Expand Down Expand Up @@ -46,7 +46,7 @@ public File getResourcePackZipFile() {
return resourcePackZipFile;
}

public ResourcePackManager(TemplatePaperPlugin plugin) {
public ResourcePackManager(PaperTemplatePlugin plugin) {
this.plugin = plugin;

saveResourcepackZipFile();
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"pack": {
"pack_format": 34,
"description": "The resource pack for the Paper Template Plugin"
}
}

This file was deleted.

0 comments on commit 012acba

Please sign in to comment.