From d27568c20f581c94510303d156f998743fc27459 Mon Sep 17 00:00:00 2001 From: szymon Date: Wed, 2 Dec 2020 20:49:49 +0100 Subject: [PATCH] Renamed BackupInitiator to ActionInitiator and moved it to separate class --- .../textile_backup/core/ActionInitiator.java | 44 +++++++++++++++++++ .../core/create/BackupContext.java | 24 ---------- 2 files changed, 44 insertions(+), 24 deletions(-) create mode 100644 src/main/java/net/szum123321/textile_backup/core/ActionInitiator.java diff --git a/src/main/java/net/szum123321/textile_backup/core/ActionInitiator.java b/src/main/java/net/szum123321/textile_backup/core/ActionInitiator.java new file mode 100644 index 0000000..f965874 --- /dev/null +++ b/src/main/java/net/szum123321/textile_backup/core/ActionInitiator.java @@ -0,0 +1,44 @@ +/* + * A simple backup mod for Fabric + * Copyright (C) 2020 Szum123321 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package net.szum123321.textile_backup.core; + +public enum ActionInitiator { + Player("Player", "by"), + ServerConsole("Server Console", "from"), + Timer("Timer", "by"), + Shutdown("Server Shutdown", "by"), + Restore("Backup Restoration", "because of"), + Null("Null (That shouldn't have happened)", "form"); + + private final String name; + private final String prefix; + + ActionInitiator(String name, String prefix) { + this.name = name; + this.prefix = prefix; + } + + public String getName() { + return name; + } + + public String getPrefix() { + return prefix + ": "; + } +} diff --git a/src/main/java/net/szum123321/textile_backup/core/create/BackupContext.java b/src/main/java/net/szum123321/textile_backup/core/create/BackupContext.java index b458d3f..ef31c71 100644 --- a/src/main/java/net/szum123321/textile_backup/core/create/BackupContext.java +++ b/src/main/java/net/szum123321/textile_backup/core/create/BackupContext.java @@ -128,28 +128,4 @@ public class BackupContext { } } - public enum BackupInitiator { - Player ("Player", "by"), - ServerConsole ("Server Console", "from"), - Timer ("Timer", "by"), - Shutdown ("Server Shutdown", "by"), - Restore ("Backup Restoration", "because of"), - Null ("Null (That shouldn't have happened)", "form"); - - private final String name; - private final String prefix; - - BackupInitiator(String name, String prefix) { - this.name = name; - this.prefix = prefix; - } - - public String getName() { - return name; - } - - public String getPrefix() { - return prefix + ": "; - } - } }