mirror of
https://github.com/RayzsYT/ProAntiTab.git
synced 2026-11-30 20:39:53 -05:00
Change Placeholders
This commit is contained in:
1 parent
784edff9a8
commit
e91af3f26b
12 files changed
+21
-27
No files matched your search
+1
-1
@@ -7,7 +7,7 @@ import de.rayzs.pat.utils.configuration.helper.ConfigSectionHelper;
|
||||
|
||||
public class ListCommandsPlaceholder extends PlaceholderStorage {
|
||||
|
||||
public ListCommandsPlaceholder() { super("pat_list_commands"); }
|
||||
public ListCommandsPlaceholder() { super("list_commands"); }
|
||||
|
||||
public String COMMAND, SPLITTER;
|
||||
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ import de.rayzs.pat.utils.configuration.helper.ConfigSectionHelper;
|
||||
|
||||
public class ListReversedCommandsPlaceholder extends PlaceholderStorage {
|
||||
|
||||
public ListReversedCommandsPlaceholder() { super("pat_list_reversed_commands"); }
|
||||
public ListReversedCommandsPlaceholder() { super("list_reversed_commands"); }
|
||||
|
||||
public String COMMAND, SPLITTER;
|
||||
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ import de.rayzs.pat.utils.configuration.helper.ConfigSectionHelper;
|
||||
|
||||
public class ListSortedCommandsPlaceholder extends PlaceholderStorage {
|
||||
|
||||
public ListSortedCommandsPlaceholder() { super("pat_list_sorted_commands"); }
|
||||
public ListSortedCommandsPlaceholder() { super("list_sorted_commands"); }
|
||||
|
||||
public String COMMAND, SPLITTER;
|
||||
|
||||
|
||||
+1
-1
@@ -9,7 +9,7 @@ import de.rayzs.pat.utils.group.GroupManager;
|
||||
|
||||
public class ListGroupCommandsPlaceholder extends PlaceholderStorage {
|
||||
|
||||
public ListGroupCommandsPlaceholder() { super("pat_list_commands_group_"); }
|
||||
public ListGroupCommandsPlaceholder() { super("list_commands_group_"); }
|
||||
|
||||
public String COMMAND, SPLITTER;
|
||||
|
||||
|
||||
+1
-1
@@ -9,7 +9,7 @@ import de.rayzs.pat.utils.group.GroupManager;
|
||||
|
||||
public class ListGroupReversedCommandsPlaceholder extends PlaceholderStorage {
|
||||
|
||||
public ListGroupReversedCommandsPlaceholder() { super("pat_list_reversed_commands_group_"); }
|
||||
public ListGroupReversedCommandsPlaceholder() { super("list_reversed_commands_group_"); }
|
||||
|
||||
public String COMMAND, SPLITTER;
|
||||
|
||||
|
||||
+1
-1
@@ -9,7 +9,7 @@ import de.rayzs.pat.utils.group.GroupManager;
|
||||
|
||||
public class ListGroupSortedCommandsPlaceholder extends PlaceholderStorage {
|
||||
|
||||
public ListGroupSortedCommandsPlaceholder() { super("pat_list_sorted_commands_group_"); }
|
||||
public ListGroupSortedCommandsPlaceholder() { super("list_sorted_commands_group_"); }
|
||||
|
||||
public String COMMAND, SPLITTER;
|
||||
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ import de.rayzs.pat.utils.group.*;
|
||||
|
||||
public class ListGroupsPlaceholder extends PlaceholderStorage {
|
||||
|
||||
public ListGroupsPlaceholder() { super("pat_list_groups"); }
|
||||
public ListGroupsPlaceholder() { super("list_groups"); }
|
||||
|
||||
public String COMMAND, SPLITTER;
|
||||
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ import de.rayzs.pat.utils.group.*;
|
||||
|
||||
public class ListGroupsReversedPlaceholder extends PlaceholderStorage {
|
||||
|
||||
public ListGroupsReversedPlaceholder() { super("pat_list_reversed_groups"); }
|
||||
public ListGroupsReversedPlaceholder() { super("list_reversed_groups"); }
|
||||
|
||||
public String COMMAND, SPLITTER;
|
||||
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ import de.rayzs.pat.utils.group.*;
|
||||
|
||||
public class ListGroupsSortedPlaceholder extends PlaceholderStorage {
|
||||
|
||||
public ListGroupsSortedPlaceholder() { super("pat_list_sorted_groups"); }
|
||||
public ListGroupsSortedPlaceholder() { super("list_sorted_groups"); }
|
||||
|
||||
public String COMMAND, SPLITTER;
|
||||
|
||||
|
||||
@@ -85,7 +85,7 @@ public class BukkitLoader extends JavaPlugin {
|
||||
ViaVersionAdapter.initialize();
|
||||
|
||||
if(getServer().getPluginManager().getPlugin("PlaceholderAPI") != null)
|
||||
new PlaceholderHook().register();
|
||||
new PlaceholderHook();
|
||||
|
||||
try {
|
||||
if (Bukkit.getPluginManager() instanceof SimplePluginManager) {
|
||||
|
||||
@@ -23,7 +23,7 @@ public class PlaceholderHook extends PlaceholderExpansion {
|
||||
|
||||
@Override
|
||||
public @NotNull String getIdentifier() {
|
||||
return "proantitab";
|
||||
return "pat";
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -38,12 +38,6 @@ public class PlaceholderHook extends PlaceholderExpansion {
|
||||
|
||||
@Override
|
||||
public @Nullable String onPlaceholderRequest(Player player, @NotNull String request) {
|
||||
String result = null;
|
||||
request = request.toLowerCase();
|
||||
|
||||
if(request.startsWith("pat_"))
|
||||
result = Storage.ConfigSections.Placeholders.findAndReplace(request);
|
||||
|
||||
return result != null ? result : super.onPlaceholderRequest(player, request);
|
||||
return Storage.ConfigSections.Placeholders.findAndReplace(request.toLowerCase());
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user