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

Make the ignores here sync with the TPA ignores #32

Open
Gentleman2292 opened this issue Jul 3, 2023 · 1 comment
Open

Make the ignores here sync with the TPA ignores #32

Gentleman2292 opened this issue Jul 3, 2023 · 1 comment

Comments

@Gentleman2292
Copy link

Gentleman2292 commented Jul 3, 2023

Make this nothub/SafeTPA#50
Sync with chat ignores

Make it so it prompts "Do you also want to ignore TPA's from <user> "after executing /ignore with chat links stating yes or no

@nothub
Copy link

nothub commented Jul 3, 2023

Ignores will be stored as json file per player. I will make the storage location configurable so it is easy to read them from other plugins.

To read files with GSON:

import com.google.gson.reflect.TypeToken;
...
var reader = Files.newBufferedReader(filepath)
var type = TypeToken.getParameterized(Set.class, UUID.class).getType()
Set<UUID> ignores = gson.fromJson(reader, type)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants