mirror of
https://github.com/AtlasMediaGroup/TotalFreedomMod.git
synced 2025-07-01 12:36:41 +00:00
Compare commits
6 Commits
Author | SHA1 | Date | |
---|---|---|---|
41331e719d | |||
72c83ba84a | |||
3deaaafb88 | |||
edb3dbfdbe | |||
fd6f8a2d17 | |||
ebafc1c669 |
6
.github/workflows/downstream.yml
vendored
6
.github/workflows/downstream.yml
vendored
@ -17,10 +17,10 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
# Step 1: run a standard checkout action, provided by github
|
# Step 1: run a standard checkout action, provided by github
|
||||||
- name: Checkout main
|
- name: Checkout current development branch
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
ref: main
|
ref: development
|
||||||
# submodules: 'recursive' ### may be needed in your situation
|
# submodules: 'recursive' ### may be needed in your situation
|
||||||
|
|
||||||
# Step 2: run this sync action - specify the upstream repo, upstream branch to sync with, and target sync branch
|
# Step 2: run this sync action - specify the upstream repo, upstream branch to sync with, and target sync branch
|
||||||
|
2
pom.xml
2
pom.xml
@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
<groupId>me.totalfreedom</groupId>
|
<groupId>me.totalfreedom</groupId>
|
||||||
<artifactId>TotalFreedomMod</artifactId>
|
<artifactId>TotalFreedomMod</artifactId>
|
||||||
<version>2022.06</version>
|
<version>2022.06.1</version>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
|
@ -24,7 +24,7 @@ import org.bukkit.plugin.SimplePluginManager;
|
|||||||
|
|
||||||
public class CommandBlocker extends FreedomService
|
public class CommandBlocker extends FreedomService
|
||||||
{
|
{
|
||||||
|
private final Pattern whitespacePattern = Pattern.compile("^/?( +)(.*)?");
|
||||||
private final Pattern flagPattern = Pattern.compile("(:([0-9]){5,})");
|
private final Pattern flagPattern = Pattern.compile("(:([0-9]){5,})");
|
||||||
//
|
//
|
||||||
private final Map<String, CommandBlockerEntry> entryList = Maps.newHashMap();
|
private final Map<String, CommandBlockerEntry> entryList = Maps.newHashMap();
|
||||||
@ -156,6 +156,14 @@ public class CommandBlocker extends FreedomService
|
|||||||
|
|
||||||
// Format
|
// Format
|
||||||
command = command.toLowerCase().trim();
|
command = command.toLowerCase().trim();
|
||||||
|
|
||||||
|
// Whitespaces
|
||||||
|
Matcher whitespaceMatcher = whitespacePattern.matcher(command);
|
||||||
|
if (whitespaceMatcher.matches() && whitespaceMatcher.groupCount() == 2)
|
||||||
|
{
|
||||||
|
command = whitespaceMatcher.group(2);
|
||||||
|
}
|
||||||
|
|
||||||
command = command.startsWith("/") ? command.substring(1) : command;
|
command = command.startsWith("/") ? command.substring(1) : command;
|
||||||
|
|
||||||
// Check for plugin specific commands
|
// Check for plugin specific commands
|
||||||
|
Reference in New Issue
Block a user