Skip to content

Commit 99a3e21

Browse files
committed
Reorganize Prefix / Util, YML Saving Change
Refactored Prefix, PrefixUtil, and RequirementUtil into package prefix. Package util was getting pretty big and did not really match with the new Prefix. YML Saving Format now saves prefix data under "current-prefix" rather than a value tied to the player UUID. Player UUID is now a Configuration Section. (May require purging the old YML, plugin is fairly new so there probably will not be a "conversion" operation for this).
1 parent 2be614a commit 99a3e21

11 files changed

Lines changed: 25 additions & 18 deletions

File tree

src/main/java/adhdmc/simpleprefixes/SimplePrefixes.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
import adhdmc.simpleprefixes.config.PrefixConfig;
88
import adhdmc.simpleprefixes.dependency.PAPIExpansion;
99
import adhdmc.simpleprefixes.gui.chest.listener.PrefixMenuListener;
10-
import adhdmc.simpleprefixes.util.Prefix;
11-
import adhdmc.simpleprefixes.util.PrefixUtil;
10+
import adhdmc.simpleprefixes.prefix.Prefix;
11+
import adhdmc.simpleprefixes.prefix.PrefixUtil;
1212
import net.kyori.adventure.text.minimessage.MiniMessage;
1313
import net.kyori.adventure.text.minimessage.tag.resolver.TagResolver;
1414
import net.kyori.adventure.text.minimessage.tag.standard.StandardTags;

src/main/java/adhdmc/simpleprefixes/command/subcommand/InfoCommand.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,8 @@
44
import adhdmc.simpleprefixes.command.SubCommand;
55
import adhdmc.simpleprefixes.util.Message;
66
import adhdmc.simpleprefixes.util.Permission;
7-
import adhdmc.simpleprefixes.util.Prefix;
7+
import adhdmc.simpleprefixes.prefix.Prefix;
88
import net.kyori.adventure.text.Component;
9-
import net.kyori.adventure.text.minimessage.MiniMessage;
109
import net.kyori.adventure.text.minimessage.tag.resolver.Placeholder;
1110
import org.bukkit.command.CommandSender;
1211

src/main/java/adhdmc/simpleprefixes/command/subcommand/ResetCommand.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import adhdmc.simpleprefixes.command.SubCommand;
44
import adhdmc.simpleprefixes.util.Message;
55
import adhdmc.simpleprefixes.util.Permission;
6-
import adhdmc.simpleprefixes.util.PrefixUtil;
6+
import adhdmc.simpleprefixes.prefix.PrefixUtil;
77
import org.bukkit.command.CommandSender;
88
import org.bukkit.entity.Player;
99

src/main/java/adhdmc/simpleprefixes/command/subcommand/SetCommand.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
package adhdmc.simpleprefixes.command.subcommand;
22

33
import adhdmc.simpleprefixes.command.SubCommand;
4+
import adhdmc.simpleprefixes.prefix.Prefix;
5+
import adhdmc.simpleprefixes.prefix.PrefixUtil;
6+
import adhdmc.simpleprefixes.prefix.RequirementUtil;
47
import adhdmc.simpleprefixes.util.*;
58
import org.bukkit.command.CommandSender;
69
import org.bukkit.entity.Player;
710

811
import java.util.ArrayList;
912
import java.util.List;
10-
import java.util.Locale;
1113

1214
public class SetCommand extends SubCommand {
1315
public SetCommand() {

src/main/java/adhdmc/simpleprefixes/dependency/PAPIExpansion.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
11
package adhdmc.simpleprefixes.dependency;
22

33
import adhdmc.simpleprefixes.SimplePrefixes;
4-
import adhdmc.simpleprefixes.util.PrefixUtil;
4+
import adhdmc.simpleprefixes.prefix.PrefixUtil;
55
import me.clip.placeholderapi.PlaceholderAPI;
66
import me.clip.placeholderapi.expansion.PlaceholderExpansion;
7-
import net.kyori.adventure.text.minimessage.MiniMessage;
8-
import net.kyori.adventure.text.minimessage.tag.resolver.TagResolver;
9-
import net.kyori.adventure.text.minimessage.tag.standard.StandardTags;
107
import net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer;
118
import org.bukkit.OfflinePlayer;
129
import org.jetbrains.annotations.NotNull;

src/main/java/adhdmc/simpleprefixes/gui/chest/PrefixMenu.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
import adhdmc.simpleprefixes.SimplePrefixes;
44
import adhdmc.simpleprefixes.util.Message;
5-
import adhdmc.simpleprefixes.util.Prefix;
6-
import adhdmc.simpleprefixes.util.RequirementUtil;
5+
import adhdmc.simpleprefixes.prefix.Prefix;
6+
import adhdmc.simpleprefixes.prefix.RequirementUtil;
77
import me.clip.placeholderapi.PlaceholderAPI;
88
import net.kyori.adventure.text.Component;
99
import net.kyori.adventure.text.minimessage.MiniMessage;

src/main/java/adhdmc/simpleprefixes/gui/chest/listener/PrefixMenuListener.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import adhdmc.simpleprefixes.gui.chest.PrefixMenu;
44
import adhdmc.simpleprefixes.util.Message;
5-
import adhdmc.simpleprefixes.util.PrefixUtil;
5+
import adhdmc.simpleprefixes.prefix.PrefixUtil;
66
import org.bukkit.Sound;
77
import org.bukkit.entity.Player;
88
import org.bukkit.event.EventHandler;

src/main/java/adhdmc/simpleprefixes/util/Prefix.java renamed to src/main/java/adhdmc/simpleprefixes/prefix/Prefix.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
package adhdmc.simpleprefixes.util;
1+
package adhdmc.simpleprefixes.prefix;
22

33
import adhdmc.simpleprefixes.SimplePrefixes;
44
import adhdmc.simpleprefixes.config.PrefixConfig;
5+
import adhdmc.simpleprefixes.util.Message;
56
import org.bukkit.configuration.ConfigurationSection;
67

78
import java.util.*;

src/main/java/adhdmc/simpleprefixes/util/PrefixUtil.java renamed to src/main/java/adhdmc/simpleprefixes/prefix/PrefixUtil.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package adhdmc.simpleprefixes.util;
1+
package adhdmc.simpleprefixes.prefix;
22

33
import adhdmc.simpleprefixes.config.Config;
44
import adhdmc.simpleprefixes.util.saving.PlayerPDC;

src/main/java/adhdmc/simpleprefixes/util/RequirementUtil.java renamed to src/main/java/adhdmc/simpleprefixes/prefix/RequirementUtil.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package adhdmc.simpleprefixes.util;
1+
package adhdmc.simpleprefixes.prefix;
22

33
import me.clip.placeholderapi.PlaceholderAPI;
44
import org.bukkit.NamespacedKey;

0 commit comments

Comments
 (0)