-
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.
Fixes some bugs
- Loading branch information
BuildTools
committed
May 30, 2020
1 parent
0f6de61
commit 15795b5
Showing
7 changed files
with
109 additions
and
11 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
43 changes: 43 additions & 0 deletions
43
src/main/java/com/morkaz/moxchattitles/misc/TitlePlaceholder.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,43 @@ | ||
package com.morkaz.moxchattitles.misc; | ||
|
||
import com.morkaz.moxchattitles.MoxChatTitles; | ||
import com.morkaz.moxchattitles.data.PlayerData; | ||
import me.clip.placeholderapi.expansion.PlaceholderExpansion; | ||
import org.bukkit.entity.Player; | ||
|
||
public class TitlePlaceholder extends PlaceholderExpansion { | ||
|
||
|
||
public String getIdentifier() { | ||
return "moxchattitles"; | ||
} | ||
|
||
public String getPlugin() { | ||
return MoxChatTitles.getInstance().getName(); | ||
} | ||
|
||
public String getAuthor() { | ||
return "Morkazoid"; | ||
} | ||
|
||
|
||
public String getVersion() { | ||
return MoxChatTitles.getInstance().getDescription().getVersion(); | ||
} | ||
|
||
|
||
public String onPlaceholderRequest(Player player, String identifier) { | ||
if (identifier.equalsIgnoreCase("title")){ | ||
if (player != null){ | ||
PlayerData playerData = MoxChatTitles.getInstance().getDataManager().getPlayerData(MoxChatTitles.getInstance().getDataManager().getPlayerID(player)); | ||
if (playerData != null){ | ||
if (playerData.getLastTitle() != null){ | ||
return playerData.getLastTitle().getTitle(); | ||
} | ||
} | ||
} | ||
return ""; | ||
} | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
name: MoxChatTitles | ||
author: Morkazoid | ||
version: 0.1 | ||
version: 1.1 | ||
depend: [MoxCore] | ||
softdepend: [] | ||
softdepend: [MVdWPlaceholderAPI, PlaceholderAPI] | ||
description: "Morkazoids premium chat prefixes (titles) plugin. Created for GC2.PL Network" | ||
main: com.morkaz.moxchattitles.MoxChatTitles | ||
api-version: 1.13 |