-
-
Notifications
You must be signed in to change notification settings - Fork 19
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
1 parent
a85388f
commit 623b241
Showing
6 changed files
with
110 additions
and
71 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
60 changes: 60 additions & 0 deletions
60
...ueuePlaceholder/src/main/java/net/pistonmaster/pistonqueue/placeholder/PAPIExpansion.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,60 @@ | ||
package net.pistonmaster.pistonqueue.placeholder; | ||
|
||
import lombok.RequiredArgsConstructor; | ||
import me.clip.placeholderapi.expansion.PlaceholderExpansion; | ||
import org.bukkit.OfflinePlayer; | ||
import org.jetbrains.annotations.NotNull; | ||
|
||
@RequiredArgsConstructor | ||
public final class PAPIExpansion extends PlaceholderExpansion { | ||
private final PistonQueuePlaceholder plugin; | ||
|
||
@Override | ||
public boolean canRegister() { | ||
return true; | ||
} | ||
|
||
@Override | ||
public @NotNull String getAuthor() { | ||
return "AlexProgrammerDE"; | ||
} | ||
|
||
@Override | ||
public @NotNull String getIdentifier() { | ||
return "PistonQueue"; | ||
} | ||
|
||
@Override | ||
public @NotNull String getVersion() { | ||
return plugin.getDescription().getVersion(); | ||
} | ||
|
||
@Override | ||
public String onRequest(OfflinePlayer player, String identifier) { | ||
if (identifier.equals("online_queue_regular")) { | ||
return String.valueOf(plugin.getOnlineQueueRegular()); | ||
} | ||
|
||
if (identifier.equals("online_queue_priority")) { | ||
return String.valueOf(plugin.getOnlineQueuePriority()); | ||
} | ||
|
||
if (identifier.equals("online_queue_veteran")) { | ||
return String.valueOf(plugin.getOnlineQueueVeteran()); | ||
} | ||
|
||
if (identifier.equals("online_main_regular")) { | ||
return String.valueOf(plugin.getOnlineMainRegular()); | ||
} | ||
|
||
if (identifier.equals("online_main_priority")) { | ||
return String.valueOf(plugin.getOnlineMainPriority()); | ||
} | ||
|
||
if (identifier.equals("online_main_veteran")) { | ||
return String.valueOf(plugin.getOnlineMainVeteran()); | ||
} | ||
|
||
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
50 changes: 0 additions & 50 deletions
50
...QueuePlaceholder/src/main/java/net/pistonmaster/pistonqueueplaceholder/PAPIExpansion.java
This file was deleted.
Oops, something went wrong.
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: PistonQueuePlaceholder | ||
version: ${project.version} | ||
main: net.pistonmaster.pistonqueueplaceholder.PistonQueuePlaceholder | ||
main: net.pistonmaster.pistonqueue.placeholder.PistonQueuePlaceholder | ||
api-version: 1.13 | ||
authors: [ AlexProgrammerDE ] | ||
description: Puts queue data in papi | ||
description: Adds queue data to Placeholder API | ||
website: https://pistonmaster.net/ | ||
depend: [ PlaceholderAPI ] |
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