-
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.
- Loading branch information
Showing
4 changed files
with
25 additions
and
24 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
40 changes: 20 additions & 20 deletions
40
src/main/java/com/beefbytes/puffix/PuffixPlaceholderHook.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 |
---|---|---|
@@ -1,30 +1,30 @@ | ||
package com.beefbytes.puffix; | ||
|
||
import me.clip.placeholderapi.external.EZPlaceholderHook; | ||
import me.clip.placeholderapi.PlaceholderHook; | ||
import org.bukkit.entity.Player; | ||
|
||
public class PuffixPlaceholderHook extends EZPlaceholderHook { | ||
public class PuffixPlaceholderHook extends PlaceholderHook { | ||
|
||
private Puffix plugin; | ||
private Puffix plugin; | ||
|
||
public PuffixPlaceholderHook(Puffix plugin){ | ||
super(plugin, "puffix"); | ||
this.plugin = plugin; | ||
} | ||
public PuffixPlaceholderHook(Puffix plugin){ | ||
this.plugin = plugin; | ||
} | ||
|
||
@Override | ||
public String onPlaceholderRequest(Player p, String identifier){ | ||
if(p == null){ | ||
return ""; | ||
} | ||
@Override | ||
public String onPlaceholderRequest(Player p, String identifier){ | ||
if(p == null){ | ||
return ""; | ||
} | ||
|
||
switch(identifier){ | ||
case "prefix": | ||
return plugin.getPrefix(p); | ||
case "suffix": | ||
return plugin.getSuffix(p); | ||
} | ||
switch(identifier){ | ||
case "prefix": | ||
return plugin.getPrefix(p); | ||
case "suffix": | ||
return plugin.getSuffix(p); | ||
} | ||
|
||
return null; | ||
} | ||
|
||
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