#papi-updates

1 messages ยท Page 3 of 1

still narwhalBOT
#

Confirmation

  • [X] My issue isn't already found on the Issue tracker.
  • [X] My issue is about PlaceholderAPI and not any expansion or external plugin
  • [X] The issue isn't already fixed in a Spigot Release or Development Build.
  • [X] The Common Issues page doesn't mention this issue.

Type

Plugin Bug

What happens?

PAPI tries to parse the relocated CraftBukkit package version, which is unsupported behavi...

still narwhalBOT
still narwhalBOT
#

I see a minor problem here...

PAPI stores the String in a Version class, which itself is used for the VersionSpecific interface to allow expansions to only work with specific versions.
While the change would be rather trivial (Just swap one method for the other recommended when obtaining version) is this a breaking change in the end, since the outputed string is afaik not the same?

And I'm sure that breaking changes are something to be avoided here right now...

I hope you get what...

still narwhalBOT
still narwhalBOT
still narwhalBOT
#
[PlaceholderAPI/Server-Expansion] branch deleted: feature/rewrite
still narwhalBOT
still narwhalBOT
mint valveBOT
#
still narwhalBOT
still narwhalBOT
#
[PlaceholderAPI/PlaceholderAPI] New branch created: fix/1034-version
still narwhalBOT
still narwhalBOT
still narwhalBOT
#
[PlaceholderAPI/PlaceholderAPI] New branch created: feature/wiki-update-readme
still narwhalBOT
#

Confirmation

  • [X] I checked the Issues and Pull request tab for any existing issues or PRs.
  • [X] My Feature Request is for PlaceholderAPI and not any expansion or other plugin.

Type

Minor Code improvement (Won't affect Servers), Major Code improvement (Will affect Servers)

Description

Is hard to support folia? Why is it not supported in 2024?

Code Example

No response

Jar file

No response

Additional Information

No response

still narwhalBOT
still narwhalBOT
mint valveBOT
#
still narwhalBOT
still narwhalBOT
still narwhalBOT
#

Confirmation

  • [X] I checked the Issues and Pull request tab for any existing issues or PRs.
  • [X] My Feature Request is for PlaceholderAPI and not any expansion or other plugin.

Type

New API feature, New config option

Description

in short terms, a relational placeholders which will show text depending on conditions met; i will go straight to example which will explain how this should work:

  • Player HelloThere_1 and HelloThere_2 are looking at player HelloThere_3...
still narwhalBOT
still narwhalBOT
#
  1. Your example has a typo, since you use HelloThere_1 in all three points.

You are very right, sorry it was late, glad you got the point already!

  1. Relational placeholders do exist already, see this section on the wiki.

Ok so you say this would be possible to be made as an PAPI expansion? Exactly what i gave in example? Certain players X, Y seeing different nametag pre...

#

Hello @TheJoshue,

Thank you for reaching out to us for getting Support with PlaceholderAPI.
We would like to inform you, that we have Discussions that you can use for asking questions.
Just head over there and click the "New discussion" button to create a new post.

Remember to first read the READ ME post to not face any issues.

For questions do we recommend ...

#

Here you can find more details about how to create a relational expansion. To support relational placeholders you have to use another papi method.. something like PlaceholderAPI#setRelPlaceholders(Player p1, Player p2, String string)

Thank you
Sorry, where i need to use that method? in my plugin? asking because i actually want to implement this placeholder to be used inside of ...

still narwhalBOT
still narwhalBOT
#

Pull Request

Type

  • [ x ] Internal change (Doesn't affect end-user).
  • [ ] External change (Does affect end-user).
  • [ ] Wiki (Changes towards the Wiki).
  • [ ] Other: __________

Description

Uses the OfflinePlayer$getPlayer method instead of casting to the Player class. That avoids a class cast exception if other plugins uses an own implementation of the offline player class.

still narwhalBOT
#

Thank you Sorry, where i need to use that method? in my plugin? asking because i actually want to implement this placeholder to be used inside of TAB plugin

TAB has to implement this themself in some way. The difficult part is to determine the players to use here and their respective outputs...

Honestly speaking, I don't even know if what you want here is technically achievable, as it would require PAPI to return multiple Strings, one for each player, which kind of goes against its cu...

still narwhalBOT
#

The following code will do exactly that

    public String onPlaceholderRequest(Player viewer, Player target, String identifier) {
        if (target.getName().equals("HelloThere_3")) {
            if (viewer.getName().equals("HelloThere_1")) {
                return "[Admin] ";
            }
            if (viewer.getName().equals("HelloThere_2")) {
                return "[Operator] ";
            }
        }
        return null;
    }

All you need to find out is the ...

#

The following code will do exactly that

    public String onPlaceholderRequest(Player viewer, Player target, String identifier) {
        if (target.getName().equals("HelloThere_3")) {
            if (viewer.getName().equals("HelloThere_1")) {
                return "[Admin] ";
            }
            if (viewer.getName().equals("HelloThere_2")) {
                return "[Operator] ";
            }
        }
        return null;
    }

...

#

The following code will do exactly that

    public String onPlaceholderRequest(Player viewer, Player target, String identifier) {
        if (target.getName().equals("HelloThere_3")) {
            if (viewer.getName().equals("HelloThere_1")) {
                return "[Admin] ";
            }
            if (viewer.getName().equals("HelloThere_2")) {
                return "[Operator] ";
            }
        }
        return null;
    }

...

still narwhalBOT
still narwhalBOT
still narwhalBOT
#
[PlaceholderAPI/Vault-Expansion] New branch created: fix/40-hasgroup_group-placeholder-doesnt-work
still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
#
[PlaceholderAPI/PlaceholderAPI] branch deleted: feature/wiki-update-readme
still narwhalBOT
still narwhalBOT
still narwhalBOT
#
[PlaceholderAPI/Vault-Expansion] branch deleted: fix/40-hasgroup_group-placeholder-doesnt-work
still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
#

Confirmation

  • [X] My issue isn't already found on the Issue tracker.
  • [X] My issue is about PlaceholderAPI and not any expansion or external plugin
  • [X] The issue isn't already fixed in a Spigot Release or Development Build.
  • [X] The Common Issues page doesn't mention this issue.

Type

Plugin/Server Incompatability

What happens?

Thought I'd make this issue in advance regarding: https://github.com/Pa...

still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
#

Pull Request

Type

  • [ x] Internal change (Doesn't affect end-user).
  • [ ] External change (Does affect end-user).
  • [ ] Wiki (Changes towards the [Wiki]).
  • [ ] Other: __________

Description

Hello,

I see there was a PR for PlaceHolderAPI to add Folia support, but it hasn't been merged for a couple of months so far ( https://github.com/PlaceholderAPI/PlaceholderAPI/pull/980 ) . For this reason I thought we would do another PR with FoliaLib instead so that hope...

still narwhalBOT
#

This Pull request is honestly redundant.

You already mentioned there being another one open, that also adds Folia support, so having yet another open is not very useful.
Also, just because the PR was not merged yet doesn't mean that it isn't considered or looked into. There is more than just adding a library, changing code and call it a day. There is discussions behind the scenes regarding the best aproaches here.

tl;dr: This PR is not really needed here, but I'll leave it up to the ot...

still narwhalBOT
still narwhalBOT
#

This Pull request is honestly redundant.

You already mentioned there being another one open, that also adds Folia support, so having yet another open is not very useful. Also, just because the PR was not merged yet doesn't mean that it isn't considered or looked into. There is more than just adding a library, changing code and call it a day. There is discussions behind the scenes regarding the best aproaches here.

tl;dr: This PR is not really needed here, but I'll leave it up ...

still narwhalBOT
still narwhalBOT
still narwhalBOT
#

Confirmation

  • [X] I checked the Issues and Pull request tab for any existing issues or PRs.
  • [X] My Feature Request is for PlaceholderAPI and not any expansion or other plugin.

Type

Minor Code improvement (Won't affect Servers)

Description

.

Code Example

https://github.com/PlaceholderAPI/PlaceholderAPI/blob/604fed36a44cc71bd2334b2401fba4bb4d49dce8/src/main/java/me/clip/placeholderapi/commands/impl/local/CommandDump.java#L200-L207

Jar file

_No re...

still narwhalBOT
#
[PlaceholderAPI/PlaceholderAPI] branch deleted: feature/support-1.20
#
[PlaceholderAPI/PlaceholderAPI] New branch created: feature/add-plugin-authors
still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
#

Confirmation

  • [X] My issue isn't already found on the Issue tracker.
  • [X] My issue is about PlaceholderAPI and not any expansion or external plugin
  • [X] The issue isn't already fixed in a Spigot Release or Development Build.
  • [X] The Common Issues page doesn't mention this issue.

Type

Plugin Bug

What happens?

When EssentialsX is not installed in the Plugins folder on the server, PlaceholderAPI will...

#

How exactly is this an issue with PlaceholderAPI?

The plugin does not manage or alter chat. It only parses placeholders that plugins give to it.

The fact that installing EssentialsX causes the chat to no longer use parsed placeholders could mean one of two things:

  • The plugin managing the chat disables its chat function when it detects EssentialsX (Probs assuming EssentialsXChat is present too)
  • EssentialsX overrides the Chat handling. This usually doesn't happen as EssentialsX ...
#

Looking at this again, I can see that I misread things and that it isn't about chat messages...

However, I still cannot see a reason that would put PlaceholderAPI at fault here. After all, why would installing a separate plugin cause it to not function? What would make that a fault of PlaceholderAPI and not EssentialsX?

My best guess for now is, that perhaps the connection to the ecloud is being blocked and that errors are being swallowed.

Unfortunately can I personally not give more...

#

Indeed, I'm not talking about chat messages which seems strange to me: your answer :)
Furthermore, I had already gone to EssentialsX support (as mentioned above) and they sent me directly to you without any solution...
I also saw an issue with approximately the same problem as me (https://github.com/PlaceholderAPI/PlaceholderAPI/issues/948) so I thought you were the problem too

After trying your solution, the problem is not with placeholderAPI, on a clean server with only PlaceHolderApi ...

still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
#

Confirmation

  • [X] My issue isn't already found on the Issue tracker.
  • [X] My issue is about PlaceholderAPI and not any expansion or external plugin
  • [X] The issue isn't already fixed in a Spigot Release or Development Build.
  • [X] The Common Issues page doesn't mention this issue.

Type

Plugin Bug

What happens?

got error from placeholderapi

Expected Behaviour

The plugin is running

How to R...

still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
#

Atualmente, no meu servidor, estou enfrentando um conflito entre dois plugins essenciais: Tab e WordGuard. Parece que o plugin Tab estรก tendo dificuldades para determinar qual regiรฃo priorizar, resultando em uma alternรขncia constante e frustrante entre as duas regiรตes disponรญveis. Esse impasse estรก impactando negativamente a funcionalidade geral do servidor. Preciso encontrar uma soluรงรฃo eficaz para esse problema, seja ajustando as configuraรงรตes dos plugins ou encontrando uma maneira de harmo...

still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
#

This is weird since it's been working why disable it. Everyone is using &#xxxxxx hex rgb colors and that is the standard. Bring it back or include an extension for it by default.

That is actually not the case.
Colors have not worked reliably on PlaceholderAPI in the past. There have always been cases where it didn't work.
Also, I mentioned it before and mention it again: PlaceholderAPI's core feature is to be a placeholder parsing Util. Anything that goes beyond that is out of scope fo...

still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
#

Hello! I'm trying to get the value from BukkitValues the player for whom we are parsing the placeholder...

in theory this is possible if use:

var player = BukkitPlayer;
var plugin = BukkitServer.getPluginManager().getPlugin("Welten");
var ratingKey = NamespacedKey(plugin, "rating");
function rating() {
    var playerData = player.persistentDataContainer;
	var rep = playerData.get(ratingKey, PersistentDataType.INTEGER);
    return rep;
}

rating();

error ...

still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
#
[PlaceholderAPI/PlaceholderAPI] New branch created: feature/add-1.20.x-versions
still narwhalBOT
still narwhalBOT
#
[PlaceholderAPI/PlaceholderAPI] branch deleted: feature/add-1.20.x-versions
still narwhalBOT
#

Confirmation

  • [X] My issue isn't already found on the Issue tracker.
  • [X] My issue is about PlaceholderAPI and not any expansion or external plugin
  • [X] The issue isn't already fixed in a Spigot Release or Development Build.
  • [X] The Common Issues page doesn't mention this issue.

Type

API Bug

What happens?

Iโ€˜m want make a double nesting to locate where player at but seems papi can't deal with this ...

still narwhalBOT
#
[PlaceholderAPI/Server-Expansion] branch deleted: feature/1_20_5-support-and-small-improvements
still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
#
[PlaceholderAPI/PlaceholderAPI] New branch created: fix/parse-command-improvements
#

Pull Request

Type

  • [ ] Internal change (Doesn't affect end-user).
  • [x] External change (Does affect end-user).
  • [ ] Wiki (Changes towards the [Wiki]).
  • [ ] Other: __________

Description

Closes N/A

This adds the following changes:

  • Fixes the You must provide a target and message: ... response not giving the right command for cmdparse type.
  • Adds me argument support for first and second player in parserel
  • Use OfflinePlayer#getPlayer() inst...
still narwhalBOT
still narwhalBOT
#

Fixed :

Caused by: java.lang.NullPointerException: Cannot invoke "java.lang.CharSequence.length()" because "this.text" is null
        at java.util.regex.Matcher.getTextLength(Matcher.java:1808) ~[?:?]
        at java.util.regex.Matcher.reset(Matcher.java:461) ~[?:?]
        at java.util.regex.Matcher.(Matcher.java:256) ~[?:?]
        at java.util.regex.Pattern.matcher(Pattern.java:1180) ~[?:?]
        at at.helpch.placeholderapi.expansion.server.util.VersionHelper.getCurrentVersi...
still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
#

This is the one that I am getting [18:53:20] [Server thread/ERROR]: [PlaceholderAPI] Failed to load class files of expansion.
java.util.concurrent.CompletionException: zip file closed (expansion file: /home/container/plugins/PlaceholderAPI/expansions/Javascript-Expansion-2.1.2.jar)
at me.clip.placeholderapi.expansion.manager.LocalExpansionManager.lambda$findExpansionInFile$7(LocalExpansionManager.java:443) ~[PlaceholderAPI-2.11.5.jar:?]
at java.util.concurrent.CompletableFuture$AsyncSupp...

still narwhalBOT
#

After a ton of testing I have confirmed a couple of things. For one, this bug appears only on startup and if you reload the plugin even after it stops working due to this error it will reload perfectly fine. I have also confirmed that it is not a problem with any custom javascript files as even without them and with the expansion booted up for the first time it can still do this. Now I have no idea why this only happens about half the time when booting up, it points to it being a compatibilit...

still narwhalBOT
still narwhalBOT
#
[PlaceholderAPI/PlaceholderAPI] New branch created: feature/update-adventure-platform-bukkit
#

Pull Request

Type

  • [ ] Internal change (Doesn't affect end-user).
  • [ ] External change (Does affect end-user).
  • [ ] Wiki (Changes towards the Wiki).
  • [ ] Other: __________

Description

Closes N/A

This is the latest release currently available for this particular adventure platform.
Based on their changelog is it adding 1.20.3/4 support, so not sure if this also works on 1.20.5/6, so testing it is recommended.

still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
#

[18:04:24 ERROR]: [PlaceholderAPI] Failed to load class files of expansion.
java.util.concurrent.CompletionException: Failed to remap class at.helpch.placeholderapi.expansion.server.ServerExpansion (expansion file: D:\server\plugins\PlaceholderAPI\expansions\PAPI-Expansion-Server-2.7.2.jar)
at me.clip.placeholderapi.expansion.manager.LocalExpansionManager.lambda$findExpansionInFile$7(LocalExpansionManager.java:443) ~[?:?]
at java.util.concurrent.CompletableFuture$AsyncSupply.run$$$captu...

still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
#

Confirmation

  • [X] My issue isn't already found on the Issue tracker.
  • [X] My issue is about PlaceholderAPI and not any expansion or external plugin
  • [X] The issue isn't already fixed in a Spigot Release or Development Build.
  • [X] The Common Issues page doesn't mention this issue.

Type

Plugin Bug

What happens?

Once a server is restarted, the following error is in the console, and none of the Placeho...

still narwhalBOT
still narwhalBOT
#

This is something that's come up again and again over time, not just with PAPI, but a lot of plugins I've used and worked on. Especially noticed it on projects I've used guice on, although PAPI doesn't use guice so definitely not that. The problem with finding the actual issue is that it seems to arise when there's lots of other plugins and expansions in use, presumably which also do something with class loading and jars that somehow interferes with the way papi does it. It's really hard to r...

still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
#

Confirmation

  • [X] My issue isn't already found on the Issue tracker.
  • [X] My issue is about PlaceholderAPI and not any expansion or external plugin
  • [X] The issue isn't already fixed in a Spigot Release or Development Build.
  • [X] The Common Issues page doesn't mention this issue.

Type

Plugin Bug

What happens?

[17:24:34 WARN]: [NBTAPI] [NBTAPI] This Server-Version(v1_20_R3) is not supported by this ...

#

Confirmation

  • [X] My issue isn't already found on the Issue tracker.
  • [X] My issue is about PlaceholderAPI and not any expansion or external plugin
  • [X] The issue isn't already fixed in a Spigot Release or Development Build.
  • [X] The Common Issues page doesn't mention this issue.

Type

Plugin Bug

What happens?

[17:24:34 WARN]: [NBTAPI] [NBTAPI] This Server-Version(v1_20_R3) is not supported by this ...

still narwhalBOT
still narwhalBOT
#
[PlaceholderAPI/PlaceholderAPI] New tag created: 2.11.6
still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
#

Confirmation

  • [X] I checked the Issues and Pull request tab for any existing issues or PRs.
  • [X] My Feature Request is for PlaceholderAPI and not any expansion or other plugin.

Type

Minor Code improvement (Won't affect Servers)

Description

Sorry, I can't find the MATH extended formula submission question window

Because some variables will contain {}
For example:
%objective_score_{apa}%
So use %math_{objective_score_{apa}}/100%
will return an error because MATH tr...

still narwhalBOT
#

Hello @1470429149,

The issue you encountered is caused by an Expansion and not PlaceholderAPI itself.
This issue-tracker is reserved for Bug reports and feature requests towards PlaceholderAPI.

Please report this issue to the Expansion's main issue-tracker.
A list of known Expansion repositories and their issue trackers can be found here.


[!NOTE]
*This is an automated response created by a **...

still narwhalBOT
#

Starting with Paper 1.20.6-98 (and probably before), the version string includes the commit id

> version
[18:20:28 INFO]: This server is running Paper version 1.20.6-98-master@dff591d (2024-05-25T22:09:54Z) (Implementing API version 1.20.6-R0.1-SNAPSHOT)

and

> papi parse --null %server_version_full%
[18:21:30 INFO]: 1.20.6-dff591d

instead of

> papi parse --null %server_version_full%
[18:21:30 INFO]: 1.20.6-98

as was returned in previous Paper versions.

still narwhalBOT
still narwhalBOT
#
[PlaceholderAPI/Server-Expansion] New branch created: feature/use-java-8-and-spigot-api
still narwhalBOT
still narwhalBOT
still narwhalBOT
#

WHEREEE MAAN

I linked to it dude.
Adding Folia support isn't as easy as anyone here may think, because why you just use it, would we need to maintain it in the end.
Yes, there are libraries for it, but this would be relying on a 3rd party we have no control over, so the question has to be asked, if it is really worth using a library, or just implement this ourself in the end.

still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
#

I am getting this error in Purpur 1.20.6-2206 (c637b74) and PlaceholderAPI 2.11.6 [downloaded from Hangar]

https://hastebin.com/share/ihogajajen.ruby It throws the error during every server start and every time I type "/papi reload"

By the looks of it does this not seem like a PAPI issue. Instead a plugin seems to modify/change some server code?
Either way, this isn't really PlaceholderAPI's fault here.

#

I am getting this error in Purpur 1.20.6-2206 (c637b74) and PlaceholderAPI 2.11.6 [downloaded from Hangar]

https://hastebin.com/share/ihogajajen.ruby It throws the error during every server start and every time I type "/papi reload"

To add to @Andre601's reply, A PlaceholderAPI expansion from vk2gpz (one related to enchantments) is making this breaking modification. PlaceholderAPI is mentioned in the error because it is the one loading the expansion, and most likely, the expansion...

still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
#
[PlaceholderAPI/PlaceholderAPI] New branch created: feat/1.21
still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
#

Hello! I'm sure this is on your radar already, but including this here as part request and part reminder: previously we used %checkitem_inhand,nbtstrings:MYTHIC_TYPE=% to validate special items, but this obviously won't work in 1.20.5+ since the string is now under custom_data={MYTHIC_TYPE: ""}.

I know 1.20.5 was massive and a massive headache, and we definitely appreciate everything all you smart people do to keep us going!

still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
#
[PlaceholderAPI/Server-Expansion] New branch created: fix/59-version_full-output
still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
mint valveBOT
#

Build: 198
Status: failure
Changes:

  • ac7712 bump to dev version - PiggyPiglet
  • 907ced feat: initial work on 1.21 - GlareMasters
  • c14878 chore(deps): update gradle + shadow fork - GlareMasters
  • c97f5a Bump download stats - github

Artifacts:

No artifacts saved.

still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
#

Confirmation

  • [X] My issue isn't already found on the Issue tracker.
  • [X] My issue is about PlaceholderAPI and not any expansion or external plugin
  • [X] The issue isn't already fixed in a Spigot Release or Development Build.
  • [X] The Common Issues page doesn't mention this issue.

Type

Plugin Bug

What happens?

After the server starts, the variables can be displayed and output correctly, but a few se...

#

This is not an issue with PlaceholderAPI but with the Guide expansion. Let me explain.

Based on the info you gave is Guide an internal expansion, which means 2 things:

  1. It's not a separate jar file you add to your expansions folder, but a class inside an existing plugin.
  2. Said plugin is registering the expansion, not PlaceholderAPI.

And there is the issue. The plugin that contains the Guide expansion is registering it, not PlaceholderAPI. This comes with the downside, that during ...

still narwhalBOT
#

Thank you for your reply. I have used N binary methods within three hours and finally found out why this situation occurred. It is due to the plugin 'UltimateAutoRestart', which causes variable overloading after registering variables, resulting in the loss of variables registered by the plugin - Google Translate

[03:02:09] [Server thread/INFO]: [PlaceholderAPI] Successfully registered expansion: ultimateautorestart [Build 54a]
[03:02:09] [Server thread/INFO]: [UltimateAutoRestart] Hooke...

still narwhalBOT
#
[PlaceholderAPI/PlaceholderAPI] New branch created: feature/add-internal-expansion-check
#

Pull Request

Type

  • [ ] Internal change (Doesn't affect end-user).
  • [s] External change (Does affect end-user).
  • [ ] Wiki (Changes towards the [Wiki]).
  • [ ] Other: __________

Description

Closes N/A

PlaceholderAPI is still solely relying on the persist() boolean method to check if an expansion should be unregistered or not.
And as prooven by #1070 is this a faulty aproach, as a dev missing the override or not setting it to return true can cause an int...

#

I decided to skip unregister for external if persist is true, because maybe the author didn't understand stuff and decided to override the expansion type when they shouldn't? Causing this particular situation of an external expansion being set to be persistent...

Perhaps we could make it different by still unregister external expansions, no matter the persist setting, but print a warn about this not allowed combination to inform about a possible misconfiguration.

still narwhalBOT
#

Hello! There seems to be a strange issue with the amount modifier which we ran into when testing with the remove modifier (I know), where any amount provided worked fine EXCEPT any value beginning with a 3. In these cases when amt:3 or amt:30 etc. all matching items were removed regardless of amount specified. Adding a 0 in front, e.g. amt:03 or amt:030 works as intended.

Using CheckItem 2.7.5 on PAPI 2.11.6 on git-Paper-497 (MC: 1.20.4).

Thanks!

still narwhalBOT
mint valveBOT
#

Build: 200
Status: success
Changes:

  • be956f added missing @NotNull to return value and List parameter of setBracketPlaceholders(Player, List) - mfnalex
  • 152105 added missing @NotNull to return value and String parameter of setBracketPlaceholders(Player, String) - mfnalex
  • 32f3d1 added missing @NotNull to the returned List's type parameter and the parameter List's type parameter (is that proper English?) - mfnalex

Artifacts:

still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
#
[PlaceholderAPI/PlaceholderAPI] New branch created: feat/wiki-deluxemenus-placeholders
still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
#

Confirmation

  • [X] My issue isn't already found on the Issue tracker.
  • [X] My issue is about PlaceholderAPI and not any expansion or external plugin
  • [X] The issue isn't already fixed in a Spigot Release or Development Build.
  • [X] The Common Issues page doesn't mention this issue.

Type

Plugin/Server Incompatability

What happens?

Any papi variable will be output as %xxx% in the menu or scoreboard, no...

#

Your issue is explained in the FAQ of the Wiki.

In particular are there two possible causes for you:

  • The expansion is not installed (in your case the Player Expansion is not present, despite you using %player_name%)
  • The plugin you use placeholders in may not support PAPI. Double-check that this is the case.

Either way, this is not a PAPI bug. So I close this issue.

still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
#

[23:27:10 INFO]: AltuYumusakG issued server command: /papi reload
[23:27:10 INFO]: [PlaceholderAPI] Placeholder expansion registration initializing...
[23:27:10 INFO]: [PlaceholderAPI] Fetching available expansion information...
[23:27:11 INFO]: [PlaceholderAPI] Successfully registered external expansion: server [2.6.2]
[23:27:11 INFO]: [PlaceholderAPI] Successfully registered external expansion: statistic [2.0.1]
[23:27:11 INFO]: [PlaceholderAPI] Successfully registered external expansi...

still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
#

Hey, after using this placeholder it keeps showing "invalid time" and spamming this error in de console;

[14:18:02 ERROR]: [PlaceholderAPI] [server] Could not calculate countdown (format: "Value(YearOfEra,4,19,EXCEEDS_PAD)Value(MonthOfYear,2)Value(DayOfMonth,2)", other date: "20240912")
java.time.format.DateTimeParseException: Text '20240912' could not be parsed: Unable to obtain LocalDateTime from TemporalAccessor: {},ISO resolved to 2024-09-12 of type java.time.format.Parsed
at ja...
still narwhalBOT
still narwhalBOT
still narwhalBOT
#

Confirmation

  • [X] My issue isn't already found on the Issue tracker.
  • [X] My issue is about PlaceholderAPI and not any expansion or external plugin
  • [X] The issue isn't already fixed in a Spigot Release or Development Build.
  • [X] The Common Issues page doesn't mention this issue.

Type

Plugin/Server Incompatability

What happens?

Papi isnโ€™t loaded on bungee cord with this error message : Java.lang.No...

still narwhalBOT
#

The issue you encounter is not considered a bug and rather an intentional behaviour of PlaceholderAPI and/or one of its expansions.
If you still believe that it is a bug, provide more information and a maintainer of this repository may look at it more closely.

Before providing more info, always make sure to use the latest version of PlaceholderAPI, as the issue you encounter might already be fixed in a newer version.
Optionally can you also try out [development builds](https://ci.extendedc...

still narwhalBOT
#

Just for the sake of clarity:
PlaceholderAPI is a Spigot Plugin. It is build against, and designed for a Spigot (Or any fork of it) Server. You tried to run it on a BungeeCord Proxy, which is a completely different, unrelated API than Spigot and is therefore incompatible.
If you want to use PAPI Placeholders on your BungeeCord Proxy, check if the plugin(s) in question support PAPIProxyBridge and in such a case use that plugin to create a br...

still narwhalBOT
#

PlaceholderAPI for Folia is causing this error:

[00:07:57 WARN]: java.util.concurrent.CompletionException: java.lang.UnsupportedOperationException
[00:07:57 WARN]:        at java.base/java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:315)
[00:07:57 WARN]:        at java.base/java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:320)
[00:07:57 WARN]:        at java.base/java.util.concurrent.CompletableFuture$UniAccept.tryFire(Compl...
still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
#

โ€ฆcluded in a jar to provide backward compatibility.

Pull Request

Type

  • [x] Internal change (Doesn't affect end-user).
  • [ ] External change (Does affect end-user).
  • [ ] Wiki (Changes towards the [Wiki]).
  • [ ] Other: __________

Description

This request catches IncompatibleClassChangeError during the loading of the .class file from the expansion .jar file. Some .jar files may include .class files which are designed to provide backward compatibilities. Such...

still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
#

Hello, i am gettimg errors while trying parse item (any item) using getinfo method for getting all item's nbts and other info displayed in chat/console

It looks like this: papi parse me %checkitem_getinfo:40% (on 1.21 it was displaying all item's info)

I am using:

  • PlaceholderAPI: 2.11.7 DEV 200 (errors were on a latest stable release from spigot so i decided to get latest build)
  • ItemNBTAPI: 2.13.2
  • Server version: Purpur 1.21.1 (build 2298)
  • checkitem 2.7.7
    [latest.log](ht...
still narwhalBOT
#

On second thought, after I've been able to do some testing on this..

It may have an issue to do with Purpur. I've just tested checkitem 2.7.7 on spigot without even updating NBTAPI to 2.13.2, still using 2.13.1, and everything works fine.

I have noticed in the changelog for 2.13.2 of NBTAPI says it fixes an issue with Paper, so this might also solve your issue. I'm not positive, because you stated in the original post that you tried 2.13.2.

still narwhalBOT
still narwhalBOT
#

Confirmation

  • [X] My issue isn't already found on the Issue tracker.
  • [X] My issue is about PlaceholderAPI and not any expansion or external plugin
  • [X] The issue isn't already fixed in a Spigot Release or Development Build.
  • [X] The Common Issues page doesn't mention this issue.

Type

Plugin Bug

What happens?

When we try to parse placeholder %statistic_kill_entity:ender_dragon% where "ender_drago...

#

Hello @TheJoshue,

The issue you encountered is caused by an Expansion and not PlaceholderAPI itself.
This issue-tracker is reserved for Bug reports and feature requests towards PlaceholderAPI.

Please report this issue to the Expansion's main issue-tracker.
A list of known Expansion repositories and their issue trackers can be found here.


[!NOTE]
*This is an automated response created by a **G...

still narwhalBOT
#

Confirmation

  • [X] I checked the Issues and Pull request tab for any existing issues or PRs.
  • [X] My Feature Request is for PlaceholderAPI and not any expansion or other plugin.

Type

New API feature

Description

May you add 1.21.1 support for Purpur

Code Example

No response

Jar file

No response

Additional Information

No response

still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
#

Confirmation

  • [X] My issue isn't already found on the Issue tracker.
  • [X] My issue is about PlaceholderAPI and not any expansion or external plugin
  • [X] The issue isn't already fixed in a Spigot Release or Development Build.
  • [X] The Common Issues page doesn't mention this issue.

Type

Plugin Bug

What happens?

when i try to run the `/papi parse me %checkitem_getinfo:mainhand_nbtints:PublicBukkitValu...

still narwhalBOT
#

Hello @kristophergeou,

The issue you encountered is caused by an Expansion and not PlaceholderAPI itself.
This issue-tracker is reserved for Bug reports and feature requests towards PlaceholderAPI.

Please report this issue to the Expansion's main issue-tracker.
A list of known Expansion repositories and their issue trackers can be found here.


[!NOTE]
*This is an automated response created by ...

still narwhalBOT
#

After updating to PAPI 2.11.7-b200, CheckItem 2.7.8 post the most recent fixes, there appears to still be an issue with the nbtints and nbtstrings portions of getinfo. Trying to use a placeholder such as %checkitem_getinfo:mainhand_nbtstrings:% will return an empty string, whereas an actual check such as %checkitem_getinfo:mainhand_nbtstrings:PublicBukkitValues..score:score-limit=1%, which previously would return the value of score-limit, now throws an error akin to what you see below;

...

still narwhalBOT
still narwhalBOT
still narwhalBOT
#

I am coding n00b otherwise I'd attempt a pull request, but it appears that CheckItem does not currently have support for the modern Persistent Data Container methods, which will be increasingly necessary in a post 1.20.5 world.

For our use-case, we had been using CheckItem with %checkitem_inhand,nbtstrings:MYTHIC_TYPE=ExampleName% to get the base item type for Mythic items and ignore any alterations that may have otherwise occurred with the item, but this method was broken when Mythic conv...

still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
#

ะœะพะณัƒ ะฟะพะดั‚ะฒะตั€ะดะธั‚ัŒ. ะฏ ะฟะพะบะฐ ะฟั€ะพัั‚ะพ ะธัะฟะพะปัŒะทัƒัŽ Maven Repository, ะฟะพะบะฐ ั€ะตะฟะพะทะธั‚ะพั€ะธะน ะฝะต ะฑัƒะดะตั‚ ัะฝะพะฒะฐ ะดะพัั‚ัƒะฟะตะฝ. https://mvnrepository.com/artifact/com.github.placeholderapi/placeholderapi

Thanks

still narwhalBOT
#
[PlaceholderAPI/Server-Expansion] New branch created: feature/read-version-from-manifest
still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
#

Hello author, although it is not a bug, I still want to give some feedback.
When I use trmenu, there is a function that can open the player's menu by right-clicking the player, in which the menu will automatically pass the name of the right-clicked player into the variable {0}. In order to display other parameters or placeholders of this player, I used parseother expansion. The problem with {username} is the biggest, because I can't pass the player's name in by changing it to {{0}}. I discus...

still narwhalBOT
still narwhalBOT
still narwhalBOT
#

var haha = BukkitConsoleCommandSender;

function getMotd() {
var niubi = haha.getServer();
// ่Žทๅ–ๆŽงๅˆถๅฐๅ‘ฝไปคๅ‘้€่€…
var kongzhitai = niubi.getConsoleSender();
// ๅฎšไน‰่ฆๆ‰ง่กŒ็š„ๅ‘ฝไปค
var zhiling = "time set day";
// ่ฎฉๆŽงๅˆถๅฐๆ‰ง่กŒๅ‘ฝไปค
return bukkit.dispatchCommand(kongzhitai, zhiling);

}

getMotd();

This is my

#

[22:01:22 ERROR]: [PAPI] [Javascript-Expansion] An error occurred while executing the script 'ceshi
javax.script.ScriptException: ReferenceError: "BukkitConsoleCommandSender" is not defined in <eval> at line number 1
at org.openjdk.nashorn.api.scripting.NashornScriptEngine.throwAsScriptException(NashornScriptEngine.java:463) ~[PlaceholderAPI-2.11.6.jar:?]
at org.openjdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:447) ~[PlaceholderAPI-2.11.6....

still narwhalBOT
#

This pull request includes the following updates:

  1. Version Update: The PlaceholderAPI dependency has been updated from version 2.10.6 to 2.11.6 in the pom.xml file. This ensures compatibility with the latest features and bug fixes provided by the new version of the API.
  2. New Feature: Added functionality to check if a specific server is online in the onRequest method. If the identifier starts with online_, the system now verifies the server's status and returns `ยงaOnl...
still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
#
[PlaceholderAPI/Server-Expansion] branch deleted: feature/use-java-8-and-spigot-api
#
[PlaceholderAPI/Server-Expansion] branch deleted: feature/read-version-from-manifest
still narwhalBOT
still narwhalBOT
#

This behaviour isn't really unexpected. It's how PlaceholderAPI has always worked.

When you perform a reload is PlaceholderAPI not just reloading configs, but instead reloads expansions too.
This means it unloads them and then loads them again. The issue with internal expansions is, that PlaceholderAPI has no way of knowing from where they are. External expansions can be reloaded, because they are always at the same expected location: The expansions folder of PlaceholderAPI.
But intern...

still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
#

Sadly for me it doesn't work i get in the console this i hope it is helpful

Suppressed: java.util.concurrent.CompletionException: java.lang.RuntimeException: Failed to remap plugin jar 'plugins/PlaceholderAPI-2.11.6.jar'
at java.base/java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:315) ~[?:?]
at java.base/java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:320) ~[?:?]
at java.base/java.util.concurrent.CompletableFuture$Uni...

still narwhalBOT
#

Neoforge is present becusse Paper remapper uses them. The issue has already be identified as the malware infested jars. His top priority right now is to clean and secure his server.

Could you provide more clear info on what proofs there being malware? It's not really clear to me (And most likely GreunerNinja too) on what makes you say that actually.
I'm sure it would help everyone here in knowing the reasons for why this may be a malware-infected jar.

#

Caused by: java.util.concurrent.ExecutionException: java.lang.IllegalStateException: Duplicate key a (attempted merging values private static me/clip/placeholderapi/PlaceholderAPIPluginL10/a Ljavassist/ws/a; and private static me/clip/placeholderapi/PlaceholderAPIPluginL10/a Ljava/io/File;)

This is the proof as @Timongcraft mentioned above.

still narwhalBOT
still narwhalBOT
still narwhalBOT
#

Hey! So you might want to not have decimals in the number and have it so that the number also doesn't go into half when breaking things like grass or flowers, i found a solution.

Go Into the Placeholder's API .config file and follow what I do.

If you have the math expansion, this is what you should have:
expansions:
math:
Disable-Warnings: false
Rounding: half-top
Decimals: 3
Debug: false

Make sure to make the decimals say 0 and the rounding to...

still narwhalBOT
still narwhalBOT
still narwhalBOT
#

That's due to how PAPI finds placeholders.
When it found a second % after finding a _ without spaces before it, will it assume to have found a placeholder.

Nothing we really can change here.
At most can you go to the repository of the world expansion and suggest adding a workaround.
Or better: Don't use the percent symbol in world names.

Either way, this isn't a PAPI issue and works as intended.

still narwhalBOT
#

ะญั‚ะพ ัะฒัะทะฐะฝะพ ั ั‚ะตะผ, ะบะฐะบ PAPI ะฝะฐั…ะพะดะธั‚ ะทะฐะฟะพะปะฝะธั‚ะตะปะธ. ะšะพะณะดะฐ ะพะฝ ะฝะฐั…ะพะดะธั‚ ะฒั‚ะพั€ะพะน % ะฟะพัะปะต _ ะฑะตะท ะฟั€ะพะฑะตะปะพะฒ ะฟะตั€ะตะด ะฝะธะผ, ะพะฝ ะฟั€ะตะดะฟะพะปะฐะณะฐะตั‚, ั‡ั‚ะพ ะฝะฐัˆั‘ะป ะทะฐะฟะพะปะฝะธั‚ะตะปัŒ.

ะœั‹ ะดะตะนัั‚ะฒะธั‚ะตะปัŒะฝะพ ะฝะธั‡ะตะณะพ ะฝะต ะผะพะถะตะผ ะทะดะตััŒ ะธะทะผะตะฝะธั‚ัŒ. ะกะฐะผะพะต ะฑะพะปัŒัˆะตะต, ั‡ั‚ะพ ะฒั‹ ะผะพะถะตั‚ะต ัะดะตะปะฐั‚ัŒ, ัั‚ะพ ะทะฐะนั‚ะธ ะฒ ั€ะตะฟะพะทะธั‚ะพั€ะธะน ั€ะฐััˆะธั€ะตะฝะธั world ะธ ะฟั€ะตะดะปะพะถะธั‚ัŒ ะดะพะฑะฐะฒะธั‚ัŒ ะพะฑั…ะพะดะฝะพะน ะฟัƒั‚ัŒ. ะ˜ะปะธ ะปัƒั‡ัˆะต: ะฝะต ะธัะฟะพะปัŒะทัƒะนั‚ะต ัะธะผะฒะพะป ะฟั€ะพั†ะตะฝั‚ะฐ ะฒ ะฝะฐะทะฒะฐะฝะธัั… ัั‚ั€ะฐะฝ ะผะธั€ะฐ.

ะ’ ะปัŽะฑะพะผ ัะปัƒั‡ะฐะต, ัั‚ะพ ะฝะต ะฟั€ะพะฑะปะตะผะฐ PAPI ะธ ั€ะฐะฑะพั‚ะฐะตั‚ ั‚ะฐะบ, ะบะฐะบ ะทะฐะดัƒะผะฐะฝะพ.

Good morning! I just found an opt...

still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
#

Hi I'm the guy from:
https://github.com/PlaceholderAPI/CheckItem-Expansion/issues/73

I've been caught up with other things in life but I'm 80% sure I tested if this worked after you launched the update.
However yet again I'm experiencing that minecraft:custom_data does not appear when using GetInfo. It's the exact same experience as #73

I've read other issue tickets but they all seemed to have slight variations that I don't.

  1. I get no error in my console
  2. I don't have NBTAPI
    ...
still narwhalBOT
still narwhalBOT
still narwhalBOT
#

https://github.com/DrZoddiak/WorldGuard-Expansion

I implemented a solution for this. Works similar to how the world,x,y,z args work
%wg_placeholder:world,region_name%
%worldguard_region_owner:world,spawn%

Poly regions work in this as well, whereas before it would fail silently, things like min/max X/Z are inaccurate, but they are accurately in the region. I didn't want to muck with it, the current impl works for what I wrote it for.

still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
#

if a player crashes or quits before fully joining server I get this error in my DiscordSRV plugin when using %viaversion_player_protocol_version%

[02:05:26 INFO]: AlmostHuey joined the game
[02:05:26 INFO]: AlmostHuey lost connection: Disconnected
[02:05:26 INFO]: AlmostHuey left the game
[02:05:27 WARN]: [DiscordSRV] Plugin DiscordSRV v1.29.0 generated an exception while executing task 16105
java.lang.NullPointerException: Cannot invoke "org.bukkit.entity.Player.getUniqueId()" be...
still narwhalBOT
#

Hey, i just saw that you had the same Problem that i used to have, and it was annoying. But i managed to solve it!

Just download the Math Extension with the command /papi ecloud download Math Then just devide the Number of Mined blocks by 2 like the following : %math_{statistic_mine_block}/2% .

And thats basicaly it. It worked out for me, though im pretty sure not many people even know that something like that is possible. Have a great day!

not all the blocks count 2 th...

#

Confirmation

  • [X] My issue isn't already found on the Issue tracker.
  • [X] My issue is about PlaceholderAPI and not any expansion or external plugin
  • [X] The issue isn't already fixed in a Spigot Release or Development Build.
  • [X] The Common Issues page doesn't mention this issue.

Type

Plugin Bug

What happens?

When using the PlaceholderAPI version of 2.11.6, every time it restarts it does not load a...

still narwhalBOT
#
[PlaceholderAPI/PlaceholderAPI] New branch created: feature/update-issue-template
still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
#

I took down ClansFree and ClansPro has been renamed to just Clans again, it WAS originally clans when it was created on its original bukkit listing it got changed as I came out with the more premium iteration.

Pull Request

Type

  • [ ] Internal change (Doesn't affect end-user).
  • [ ] External change (Does affect end-user).
  • [ ] Wiki (Changes towards the Wiki).
  • [ ] Other: __________

Description

Closes N/A

still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
still narwhalBOT
#

Pull Request

Type

  • [X] Internal change (Doesn't affect end-user).
  • [ ] External change (Does affect end-user).
  • [ ] Wiki (Changes towards the [Wiki]).
  • [ ] Other: __________

Description

This pull request optimizes the text replacement algorithm by reducing object creation and improving the performance of placeholder processing. The changes include:

  • Implementing caching for StringBuilder instances using ThreadLocal to minimize object allocation and red...
still narwhalBOT
#

There is a small oversight here: Should the text have the closure head, but no closure tail, would it iterate through the text, wasting time and resources in parsing a text that has no placeholders to begin with.

As an example, if I understand the logic right would a text like This is 100% free! trigger a false in this if-check, causing the entire thing to go through the parsing process even tho there isn't any placeholder.

My suggestion is, to also check for the closure tail to be pr...

still narwhalBOT
still narwhalBOT
#

Some questions that have been brought up in internal discussions:

  • Would this also work if it was used simultaneously in the same thread?
  • What is the actual performance improvement/gain compared to the current solution (Actual benchmarks with some test values)

Yes, the new implementation is thread-safe within the same thread due to the use of ThreadLocal, which ensures each thread gets its own independent instance of StringBuilder.

Performance Test Summary:

Text Le...

#

What happens if the method is called at the same time from a thread, won't all calls use the same builders?

In a single thread, method calls are executed sequentially, not concurrently. Even if the method is called multiple times in the same thread, each call will execute one after another. The use of ThreadLocal ensures that each call has its own independent StringBuilder instance, so there will be no sharing or interference between method calls, even in single-threaded scenarios.

still narwhalBOT
#

Pull Request

Type

  • [x] Internal change (Doesn't affect end-user).
  • [ ] External change (Does affect end-user).
  • [ ] Wiki (Changes towards the [Wiki]).
  • [ ] Other: __________

Description

still narwhalBOT
still narwhalBOT
still narwhalBOT
#

Confirmation

  • [X] My issue isn't already found on the Issue tracker.
  • [X] My issue is about PlaceholderAPI and not any expansion or external plugin
  • [X] The issue isn't already fixed in a Spigot Release or Development Build.
  • [X] The Common Issues page doesn't mention this issue.

Type

Plugin Bug

What happens?

When one expansion fails to load (for whatever reason) and throws an exception, all other ...

still narwhalBOT
still narwhalBOT