mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2025-02-03 22:11:52 +01:00
Blocked placeholder replacement for Plan on server thread
Affects issues: - Fixed #1694
This commit is contained in:
parent
a4e1b8200a
commit
c5d675d2a0
@ -65,12 +65,6 @@ public class PlanPlaceholderExtension extends PlaceholderExpansion {
|
||||
return "plan";
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
@Override
|
||||
public String getPlugin() {
|
||||
return "Plan";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getAuthor() {
|
||||
return "Rsl1122";
|
||||
@ -84,6 +78,9 @@ public class PlanPlaceholderExtension extends PlaceholderExpansion {
|
||||
@Override
|
||||
public String onPlaceholderRequest(Player player, String params) {
|
||||
UUID uuid = player != null ? player.getUniqueId() : null;
|
||||
if ("Server thread".equalsIgnoreCase(Thread.currentThread().getName())) {
|
||||
return "[placeholder replacement on server thread is not supported by Plan because it can crash the server!]";
|
||||
}
|
||||
try {
|
||||
String value = placeholders.onPlaceholderRequest(uuid, params, Collections.emptyList());
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user