Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compatibility with "Papi player expansion" #66

Open
Mi4i19 opened this issue Sep 14, 2024 · 1 comment
Open

Compatibility with "Papi player expansion" #66

Mi4i19 opened this issue Sep 14, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@Mi4i19
Copy link

Mi4i19 commented Sep 14, 2024

Project Version

skript-placeholders-1.7.0
Minecraft 1.20.1
PlaceholderAPI-2.11.6
player expansion lastest

Bug Description

Hi! I have a problem - I need to display the result of a placeholder differently for each player.
I send my code below - it checks if the player has permission and returns one of two results.

If I use any placeholder prefix, like "sk" in my way, it returns the result for the player who is "looking" at the result, not the player it should. For example, if a player has permission and a placeholder checks it, then he will see that all players have it in TAB.

I used the advice from ticket #62 and used the "player" prefix (%player_sk_sheriff%), but it broke the display of any other "player" placeholders - papi cant parse it (%player_name%, for example)

Please help:

  1. Tell me, please, how I can parse the placeholder for each player without using the "player" prefix
  2. Or, please, fix the compatibility with "Papi player expansion", if it possible

Expected Behavior

Papi work =)

Steps to Reproduce

code:

placeholderapi placeholder with the prefix "player":
if the identifier is "sk_sheriff":
if player do not have permission "sk.sheriff_wanted":
set the result to "&aP"
else:
set the result to "&cW"

placeholderapi placeholder with the prefix "player":
if the identifier is "sk_sheriff_long":
if player do not have permission "sk.sheriff_wanted":
set the result to "&aPeaceful"
else:
set the result to "&cWanted!"

on death:
victim is a player
attacker is a player
if victim is in "world":
if victim do not have permission "sk.sheriff_wanted":
execute console command "lp user %attacker% permission settemp sk.sheriff_wanted true 30d"
execute console command "lp user %attacker% permission settemp cmi.command.god false 30d"

command /sk_sheriff_forgive :
permission: sk.sheriff_forgive
trigger:
if arg-1 has permission "sk.sheriff_wanted":
execute console command "lp user %arg-1% permission unsettemp sk.sheriff_wanted"
execute console command "lp user %arg-1% permission unsettemp cmi.command.god"
send "Player %arg-1% pardon." to player
else:
send "Player %arg-1% not Wanted." to player

Errors or Screenshots

No response

Other

No response

@Mi4i19 Mi4i19 added the bug Something isn't working label Sep 14, 2024
@Mi4i19
Copy link
Author

Mi4i19 commented Sep 17, 2024

i dont know, what i've changed, but it start work. i check this option before, but it dont work)

placeholderapi placeholder with the prefix "sk":
if the identifier is "sheriff":
if player do not have permission "sk.sheriff_wanted":
set the result to "&a⚐"
else:
set the result to "&c⚐"

placeholderapi placeholder with the prefix "sk":
if the identifier is "sheriff_long":
if player do not have permission "sk.sheriff_wanted":
set the result to "&aPeaceful"
else:
set the result to "&cWanted!"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant