-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add placeholder expansion and add return statements
- Loading branch information
1 parent
6e69fca
commit 3005d0e
Showing
7 changed files
with
51 additions
and
2 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
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,31 @@ | ||
package adhdmc.simplenicks.util; | ||
|
||
import adhdmc.simplenicks.SimpleNicks; | ||
import me.clip.placeholderapi.expansion.PlaceholderExpansion; | ||
import org.bukkit.OfflinePlayer; | ||
import org.jetbrains.annotations.NotNull; | ||
|
||
public class SNExpansion extends PlaceholderExpansion { | ||
@Override | ||
public @NotNull String getIdentifier() { | ||
return "simplenicks"; | ||
} | ||
|
||
@Override | ||
public @NotNull String getAuthor() { | ||
return SimpleNicks.getInstance().getDescription().getAuthors().toString(); | ||
} | ||
|
||
@Override | ||
public @NotNull String getVersion() { | ||
return SimpleNicks.getInstance().getDescription().getVersion(); | ||
} | ||
|
||
@Override | ||
public String onRequest(OfflinePlayer player, @NotNull String params) { | ||
if (params.equalsIgnoreCase("mininick")) { | ||
return NickHandler.getInstance().getNickname(player); | ||
} | ||
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
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