-
-
Notifications
You must be signed in to change notification settings - Fork 994
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make CommandFilter more extendable + fix AsyncTeleport not applying c…
…ommand cooldown
- Loading branch information
1 parent
76e45fd
commit eefb99e
Showing
7 changed files
with
82 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
Essentials/src/main/java/com/earth2me/essentials/EssCommandFilter.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package com.earth2me.essentials; | ||
|
||
import java.math.BigDecimal; | ||
import java.util.regex.Pattern; | ||
|
||
public class EssCommandFilter extends CommandFilter { | ||
|
||
private final String command; | ||
|
||
public EssCommandFilter(String name, String command, Pattern pattern, Integer cooldown, boolean persistentCooldown, BigDecimal cost) { | ||
super(name, pattern, cooldown, persistentCooldown, cost); | ||
this.command = command; | ||
} | ||
|
||
public String getCommand() { | ||
return command; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
Essentials/src/main/java/com/earth2me/essentials/RegexCommandFilter.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package com.earth2me.essentials; | ||
|
||
import java.math.BigDecimal; | ||
import java.util.regex.Pattern; | ||
|
||
public class RegexCommandFilter extends CommandFilter { | ||
|
||
public RegexCommandFilter(String name, Pattern pattern, Integer cooldown, boolean persistentCooldown, BigDecimal cost) { | ||
super(name, pattern, cooldown, persistentCooldown, cost); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters