mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2024-12-25 18:47:44 +01:00
Remove the "/" adding code from EntityTypeFlag.
This commit is contained in:
parent
dcdd0497d8
commit
66eb8fa553
@ -40,10 +40,7 @@ protected EntityTypeFlag(String name) {
|
|||||||
@Override
|
@Override
|
||||||
public EntityType parseInput(FlagContext context) throws InvalidFlagFormat {
|
public EntityType parseInput(FlagContext context) throws InvalidFlagFormat {
|
||||||
String input = context.getUserInput();
|
String input = context.getUserInput();
|
||||||
input = input.trim();
|
input = input.trim().toLowerCase();
|
||||||
if (!input.startsWith("/")) {
|
|
||||||
input = "/" + input;
|
|
||||||
}
|
|
||||||
EntityType entityType = unmarshal(input);
|
EntityType entityType = unmarshal(input);
|
||||||
if (entityType == null) {
|
if (entityType == null) {
|
||||||
throw new InvalidFlagFormat("Unknown entity type: " + input);
|
throw new InvalidFlagFormat("Unknown entity type: " + input);
|
||||||
|
Loading…
Reference in New Issue
Block a user