-
Notifications
You must be signed in to change notification settings - Fork 65
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: allow null values for auto complete suggestions
- Loading branch information
Showing
6 changed files
with
94 additions
and
14 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
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
54 changes: 54 additions & 0 deletions
54
core/src/main/java/com/sekwah/advancedportals/core/tags/activation/NameTag.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,54 @@ | ||
package com.sekwah.advancedportals.core.tags.activation; | ||
|
||
import com.sekwah.advancedportals.core.connector.containers.PlayerContainer; | ||
import com.sekwah.advancedportals.core.registry.TagTarget; | ||
import com.sekwah.advancedportals.core.util.Lang; | ||
import com.sekwah.advancedportals.core.warphandler.ActivationData; | ||
import com.sekwah.advancedportals.core.warphandler.Tag; | ||
|
||
import java.util.List; | ||
|
||
public class NameTag implements Tag.Activation, Tag.AutoComplete { | ||
|
||
private final TagType[] tagTypes = new TagType[]{ TagType.PORTAL }; | ||
|
||
@Override | ||
public TagType[] getTagTypes() { | ||
return tagTypes; | ||
} | ||
|
||
@Override | ||
public String getName() { | ||
return "name"; | ||
} | ||
|
||
@Override | ||
public String[] getAliases() { | ||
return null; | ||
} | ||
|
||
@Override | ||
public String description() { | ||
return Lang.translate("tag.name.description"); | ||
} | ||
|
||
@Override | ||
public boolean preActivated(TagTarget target, PlayerContainer player, ActivationData activeData, String[] argData) { | ||
return false; | ||
} | ||
|
||
@Override | ||
public void postActivated(TagTarget target, PlayerContainer player, ActivationData activeData, String[] argData) { | ||
|
||
} | ||
|
||
@Override | ||
public boolean activated(TagTarget target, PlayerContainer player, ActivationData activeData, String[] argData) { | ||
return false; | ||
} | ||
|
||
@Override | ||
public List<String> autoComplete(String argData) { | ||
return null; | ||
} | ||
} |
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