Skip to content

Commit f6549de

Browse files
committed
BREAKING CHANGE: complete changes to new plugin name (perms, packages)
1 parent 66e2549 commit f6549de

File tree

10 files changed

+42
-42
lines changed

10 files changed

+42
-42
lines changed

README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# AztecTabFilter
22

3-
**IMPORTANT:** The name of this plugin has changed and the config and permissions are being renamed to match. If you used to use this plugin while it was named AztecTabCompleter and you don't want to change, you should use the code from the `old-name-support` branch, but this may not be updated as often.
3+
**IMPORTANT:** The name of this plugin has changed and the config and permissions are being renamed to match. If you used to use this plugin while it was named AztecTabFilter and you don't want to change, you should use the code from the `old-name-support` branch, but this may not be updated as often.
44

55

66
Spigot 1.13-1.14.3 plugin that filters Command List Suggestions (initial tab complete) by allow/blocklists or groups.
@@ -21,9 +21,9 @@ Currently in 1.13, no `tab-complete` setting seems to stop all commands from bei
2121
## Getting the plugin
2222

2323
### Downloading the Plugin pre-built
24-
You can find released JARs (that can be added to your plugins folder) on the [Releases tab](https://github.com/crashdemons/AztecTabCompleter/releases) of this project.
24+
You can find released JARs (that can be added to your plugins folder) on the [Releases tab](https://github.com/crashdemons/AztecTabFilter/releases) of this project.
2525

26-
If you want something a bit more shiny, you can check out our [development builds](https://ci.meme.tips/job/AztecTabCompleter/) available through Jenkins CI.
26+
If you want something a bit more shiny, you can check out our [development builds](https://ci.meme.tips/job/AztecTabFilter/) available through Jenkins CI.
2727

2828
### Building the Project yourself
2929
We've recently moved to using Maven! If you used build.xml or a Netbeans Project before, you may need to import the project again as a maven project / from existing POM.
@@ -46,12 +46,12 @@ Using permissions you can define access to different groups of suggestions, bypa
4646

4747
| Permission | Default Value | Description |
4848
| ------------- | ------------- | ------------- |
49-
| aztectabcompleter.* | True for Ops | Inherit all permissions except group behavior (may differ by permissions plugin) |
50-
| aztectabcompleter.suggest | True | Allows the user to receive filtered suggestions. If you deny this permission, all suggestions are blocked. |
51-
| aztectabcompleter.group.*group-name-here* | Undefined | Enables filtering for this user which is defined by this group-name in the configuration file |
52-
| aztectabcompleter.bypass | True for Ops | Allows the user to bypass filtering, receiving all normal command-suggestions, unmodified. |
53-
| aztectabcompleter.reload | True for Ops | Allows the user to access the /aztabreload command |
54-
| aztectabcompleter.dump | True for Ops | Allows the user to access the /aztabdump command |
49+
| aztectabfilter.* | True for Ops | Inherit all permissions except group behavior (may differ by permissions plugin) |
50+
| aztectabfilter.suggest | True | Allows the user to receive filtered suggestions. If you deny this permission, all suggestions are blocked. |
51+
| aztectabfilter.group.*group-name-here* | Undefined | Enables filtering for this user which is defined by this group-name in the configuration file |
52+
| aztectabfilter.bypass | True for Ops | Allows the user to bypass filtering, receiving all normal command-suggestions, unmodified. |
53+
| aztectabfilter.reload | True for Ops | Allows the user to access the /aztabreload command |
54+
| aztectabfilter.dump | True for Ops | Allows the user to access the /aztabdump command |
5555

5656
### Configuration
5757
The plugin configuration allows you to define whitelist/blacklist filtering of command-suggestions for everyone, or for specific groups, as well as the ability to tweak filtering order and behavior.
@@ -96,6 +96,6 @@ With this configuration we can see from the `filter-order` that the global black
9696

9797
`spawn` and `tpahere` would be allowed to be displayed to everyone, while the alias `etpahere` is hidden from suggestions.
9898

99-
For players with the `aztectabcompleter.group.moderator` permission, we can see similarly `vanish` is not displayed as a suggestion but the alias `v` is displayed. (assuming both are normally suggested).
99+
For players with the `aztectabfilter.group.moderator` permission, we can see similarly `vanish` is not displayed as a suggestion but the alias `v` is displayed. (assuming both are normally suggested).
100100

101101
Additionally because the default action is *deny*, any commands not already in a whitelist (`visible-commands` or group equivalent) will be removed from suggestions.

src/main/java/com/github/crashdemons/aztectabcompleter/AZTabPlugin.java renamed to src/main/java/com/github/crashdemons/aztectabfilter/AZTabPlugin.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
package com.github.crashdemons.aztectabcompleter;
1+
package com.github.crashdemons.aztectabfilter;
22

3-
import com.github.crashdemons.aztectabcompleter.filters.FilterArgs;
4-
import com.github.crashdemons.aztectabcompleter.filters.FilterSet;
3+
import com.github.crashdemons.aztectabfilter.filters.FilterArgs;
4+
import com.github.crashdemons.aztectabfilter.filters.FilterSet;
55
import org.bukkit.ChatColor;
66
import org.bukkit.command.Command;
77
import org.bukkit.command.CommandSender;
@@ -96,15 +96,15 @@ public boolean onCommand(CommandSender sender, Command cmd, String label, String
9696
}
9797
String command = cmd.getName();
9898
if (command.equalsIgnoreCase("aztabreload")) {
99-
if (!sender.hasPermission("aztectabcompleter.reload")) {
99+
if (!sender.hasPermission("aztectabfilter.reload")) {
100100
sender.sendMessage("You don't have permission to do this.");
101101
return true;
102102
}
103103
loadConfig();
104104
sender.sendMessage("[AZTab] Config reloaded.");
105105
return true;
106106
}else if (command.equalsIgnoreCase("aztabdump")) {
107-
if (!sender.hasPermission("aztectabcompleter.dump")) {
107+
if (!sender.hasPermission("aztectabfilter.dump")) {
108108
sender.sendMessage("You don't have permission to do this.");
109109
return true;
110110
}
@@ -122,7 +122,7 @@ public void onCommandSuggestion(PlayerCommandSendEvent event) {
122122
return;
123123
}
124124
Player player = event.getPlayer();
125-
if (player.hasPermission("aztectabcompleter.bypass")) {
125+
if (player.hasPermission("aztectabfilter.bypass")) {
126126
if(dumpFiltering) getLogger().info(player.getName()+" bypassed filtering by permission.");
127127
return;
128128
}
@@ -131,7 +131,7 @@ public void onCommandSuggestion(PlayerCommandSendEvent event) {
131131
event.getCommands().clear();
132132
return;
133133
}
134-
if (!player.hasPermission("aztectabcompleter.suggest")) {
134+
if (!player.hasPermission("aztectabfilter.suggest")) {
135135
if(dumpFiltering) getLogger().info(player.getName()+" denied suggestions by permission.");
136136
event.getCommands().clear();
137137
} else {
@@ -161,7 +161,7 @@ public void onPlayerCommandPreProcess(PlayerCommandPreprocessEvent event) {
161161
}
162162

163163
Player player = event.getPlayer();
164-
if (player.hasPermission("aztectabcompleter.bypass")) {
164+
if (player.hasPermission("aztectabfilter.bypass")) {
165165
if(dumpFiltering) getLogger().info(player.getName()+" bypassed command filtering by permission.");
166166
return;
167167
}

src/main/java/com/github/crashdemons/aztectabcompleter/filters/Filter.java renamed to src/main/java/com/github/crashdemons/aztectabfilter/filters/Filter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* To change this template file, choose Tools | Templates
44
* and open the template in the editor.
55
*/
6-
package com.github.crashdemons.aztectabcompleter.filters;
6+
package com.github.crashdemons.aztectabfilter.filters;
77

88
/**
99
* Filter class that defines a condition on which a filter matches or fails against input arguments, and decides the resulting action of the match.

src/main/java/com/github/crashdemons/aztectabcompleter/filters/FilterArgs.java renamed to src/main/java/com/github/crashdemons/aztectabfilter/filters/FilterArgs.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
* To change this template file, choose Tools | Templates
44
* and open the template in the editor.
55
*/
6-
package com.github.crashdemons.aztectabcompleter.filters;
6+
package com.github.crashdemons.aztectabfilter.filters;
77

8-
import com.github.crashdemons.aztectabcompleter.util.Pair;
8+
import com.github.crashdemons.aztectabfilter.util.Pair;
99
import org.bukkit.entity.Player;
1010

1111
/**

src/main/java/com/github/crashdemons/aztectabcompleter/filters/FilterCondition.java renamed to src/main/java/com/github/crashdemons/aztectabfilter/filters/FilterCondition.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* To change this template file, choose Tools | Templates
44
* and open the template in the editor.
55
*/
6-
package com.github.crashdemons.aztectabcompleter.filters;
6+
package com.github.crashdemons.aztectabfilter.filters;
77

88
import java.util.function.Predicate;
99

src/main/java/com/github/crashdemons/aztectabcompleter/filters/FilterResult.java renamed to src/main/java/com/github/crashdemons/aztectabfilter/filters/FilterResult.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* To change this template file, choose Tools | Templates
44
* and open the template in the editor.
55
*/
6-
package com.github.crashdemons.aztectabcompleter.filters;
6+
package com.github.crashdemons.aztectabfilter.filters;
77

88
/**
99
* Defines an enumation of possible Filter outcomes that can be decided
@@ -36,7 +36,7 @@ public enum FilterResult {
3636

3737
/**
3838
* The priority of the filter result where higher priority results override lower ones.
39-
* @see #overrides(com.github.crashdemons.aztectabcompleter.filters.FilterResult)
39+
* @see #overrides(com.github.crashdemons.aztectabfilter.filters.FilterResult)
4040
*/
4141
public final int priority;
4242
/**

src/main/java/com/github/crashdemons/aztectabcompleter/filters/FilterSet.java renamed to src/main/java/com/github/crashdemons/aztectabfilter/filters/FilterSet.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* To change this template file, choose Tools | Templates
44
* and open the template in the editor.
55
*/
6-
package com.github.crashdemons.aztectabcompleter.filters;
6+
package com.github.crashdemons.aztectabfilter.filters;
77

88
import java.util.ArrayList;
99
import java.util.HashMap;
@@ -254,7 +254,7 @@ private void loadGroups(ConfigurationSection config, boolean logoutput, List<Str
254254
for (String groupname : groupnames) {
255255
ConfigurationSection groupConfig = groups.getConfigurationSection(groupname);
256256
FilterSet filterGroup = new FilterSet(this.plugin);
257-
filterGroup.permission = "aztectabcompleter.group." + groupname;
257+
filterGroup.permission = "aztectabfilter.group." + groupname;
258258
//filterGroup.load(groupConfig);
259259
filterGroup.loadLists(groupConfig, false);
260260
filterGroups.put(groupname, filterGroup);

src/main/java/com/github/crashdemons/aztectabcompleter/util/Pair.java renamed to src/main/java/com/github/crashdemons/aztectabfilter/util/Pair.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* To change this template file, choose Tools | Templates
44
* and open the template in the editor.
55
*/
6-
package com.github.crashdemons.aztectabcompleter.util;
6+
package com.github.crashdemons.aztectabfilter.util;
77

88
import java.util.Map;
99

src/main/resources/config.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ invisible-commands:
2525
- particle
2626

2727
#defines groups that have differing command whitelists and blacklists
28-
#give group permission with "aztectabcompleter.group.group-name-here"
28+
#give group permission with "aztectabfilter.group.group-name-here"
2929
#all applicable groups to a user will be checked for blacklist and whitelist matches if enabled in filter-order
3030
#note: groups only have visible and invisible command lists, they do not have their own filter-order or default action.
3131
#if you want a user to have multiple group's commands, give them the permission for each
@@ -51,9 +51,9 @@ groups:
5151
#valid filtering mods:
5252
# whitelist: allows any command that appears in 'visible-commands', skips other filtering if matched
5353
# blacklist: denies any command that appears in 'invisible-commands', skips other filtering if matched
54-
# group-whitelists: for each group the user has the "aztectabcompleter.group.group-name-here" permission for:
54+
# group-whitelists: for each group the user has the "aztectabfilter.group.group-name-here" permission for:
5555
# process the 'visible-commands' for the group as described above
56-
# group-blacklists: for each group the user has the "aztectabcompleter.group.group-name-here" permission for:
56+
# group-blacklists: for each group the user has the "aztectabfilter.group.group-name-here" permission for:
5757
# process the 'invisible-commands' for the group as described above
5858
# default configuration:
5959
#filter-order: [blacklist,group-blacklists,whitelist,group-whitelists]

src/main/resources/plugin.yml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: ${project.name}
2-
main: com.github.crashdemons.aztectabcompleter.AZTabPlugin
2+
main: com.github.crashdemons.aztectabfilter.AZTabPlugin
33
version: ${project.version}
44
author: crashdemons
55
description: Filters command tab-complete suggestions by whitelist.
@@ -13,33 +13,33 @@ commands:
1313
description: reloads aztab config
1414
usage: |
1515
/aztabreload
16-
permission: aztectabcompleter.reload
16+
permission: aztectabfilter.reload
1717
permission-message: You don't have permission for this command
1818
aztabdump:
1919
description: toggles dumping command filtering information to console
2020
usage: /aztabdump
21-
permission: aztectabcompleter.dump
21+
permission: aztectabfilter.dump
2222
permission-message: You don't have permission for this command
2323

2424
permissions:
25-
aztectabcompleter.*:
25+
aztectabfilter.*:
2626
description: gives all permissions of the AZTab
2727
default: op
2828
children:
29-
aztectabcompleter.reload: true
30-
aztectabcompleter.bypass: true
31-
aztectabcompleter.suggest: true
32-
aztectabcompleter.dump: true
33-
aztectabcompleter.suggest:
29+
aztectabfilter.reload: true
30+
aztectabfilter.bypass: true
31+
aztectabfilter.suggest: true
32+
aztectabfilter.dump: true
33+
aztectabfilter.suggest:
3434
description: Gives permission to see command suggestions at all (checked before filtering)
3535
default: true
36-
aztectabcompleter.reload:
36+
aztectabfilter.reload:
3737
description: Gives permission to reload AZTab config
3838
default: op
39-
aztectabcompleter.bypass:
39+
aztectabfilter.bypass:
4040
description: Gives permission to bypass command filtering by AZTab
4141
default: op
42-
aztectabcompleter.dump:
42+
aztectabfilter.dump:
4343
description: Gives permission to enable console logging of filter results
4444
default: op
4545

0 commit comments

Comments
 (0)