Rename MVVersionEvent to MVDumpsDebugInfoEvent for clarity

This commit is contained in:
Ben Woo 2024-11-23 21:25:23 +08:00
parent 9781e8350c
commit c0ceb4f993
2 changed files with 5 additions and 6 deletions

View File

@ -25,11 +25,10 @@ import org.jvnet.hk2.annotations.Service;
import org.mvplugins.multiverse.core.MultiverseCore;
import org.mvplugins.multiverse.core.commandtools.MVCommandManager;
import org.mvplugins.multiverse.core.commandtools.MultiverseCommand;
import org.mvplugins.multiverse.core.commandtools.flags.CommandFlag;
import org.mvplugins.multiverse.core.commandtools.flags.CommandValueFlag;
import org.mvplugins.multiverse.core.commandtools.flags.ParsedCommandFlags;
import org.mvplugins.multiverse.core.event.MVVersionEvent;
import org.mvplugins.multiverse.core.event.MVDumpsDebugInfoEvent;
import org.mvplugins.multiverse.core.utils.MVCorei18n;
import org.mvplugins.multiverse.core.utils.webpaste.PasteFailedException;
import org.mvplugins.multiverse.core.utils.webpaste.PasteService;
@ -100,7 +99,7 @@ class DumpsCommand extends CoreCommand {
final ServiceTypeOption servicesType = parsedFlags.flagValue(UPLOAD_FLAG, ServiceTypeOption.PASTEGG);
// Initialise and add info to the debug event
MVVersionEvent versionEvent = new MVVersionEvent();
MVDumpsDebugInfoEvent versionEvent = new MVDumpsDebugInfoEvent();
this.addDebugInfoToEvent(versionEvent);
plugin.getServer().getPluginManager().callEvent(versionEvent);
@ -188,7 +187,7 @@ class DumpsCommand extends CoreCommand {
+ " - Multiverse Plugins Loaded: " + this.plugin.getPluginCount() + '\n';
}
private void addDebugInfoToEvent(MVVersionEvent event) {
private void addDebugInfoToEvent(MVDumpsDebugInfoEvent event) {
// Add the legacy file, but as markdown, so it's readable
event.putDetailedVersionInfo("version.md", this.getVersionString());

View File

@ -16,12 +16,12 @@ import org.bukkit.event.HandlerList;
/**
* Called when somebody requests version information about Multiverse.
*/
public class MVVersionEvent extends Event {
public class MVDumpsDebugInfoEvent extends Event {
private final StringBuilder versionInfoBuilder;
private final Map<String, String> detailedVersionInfo;
public MVVersionEvent() {
public MVDumpsDebugInfoEvent() {
versionInfoBuilder = new StringBuilder();
detailedVersionInfo = new HashMap<>();
}