srnyx / personal-phantoms

Plugin for per-player phantom spawning
MIT License
3 stars 3 forks source link

Per-World Settings #4

Closed seema84 closed 11 months ago

seema84 commented 1 year ago

What and How?

A way to exclude worlds (which have no effect on the plugin) would be nice. So that you can deactivate it on one world, but not on another and the setting on world 1 has no effect on world 2.

Why?

It makes sense for several worlds.

Are there alternatives?

not really

Checks

Anything else

No response

srnyx commented 1 year ago

So something like this in the config?


# A list of worlds where the plugin won't be enabled
worlds-blacklist:
  list:
    - "no_plugin"
    - "no_plugin2"

  # If true, the list of worlds above will act as a whitelist, meaning only those worlds will have the plugin enabled
  act-as-whitelist: false
seema84 commented 1 year ago

Yes, exactly. Is it ready inside? I hadn't seen it in the wiki.

srnyx commented 1 year ago

Yes, exactly. Is it ready inside? I hadn't seen it in the wiki.

No, no, it doesn't exist yet, I just wanted to make sure we were on the same page. I'll get it implemented right now!

srnyx commented 1 year ago

Done; here's the dev build: https://github.com/srnyx/personal-phantoms/actions/runs/6857212230 Haven't tested it at all yet, and I used a new logic for it (that I haven't used in my other projects), so I'm not sure if it'll work If you use the dev build, let me know how it goes and if you encounter any issues!

seema84 commented 1 year ago

I'll try it out straight away. What I also just realised, a reload command would be quite good (to apply changes in the configs).

seema84 commented 1 year ago

What I've just noticed is that you don't store the values (whether phantoms are activated or deactivated) in a file at all?

srnyx commented 1 year ago

What I've just noticed is that you don't store the values (whether phantoms are activated or deactivated) in a file at all?

The list is maintained in the config.yml file, which is where you have to set the values

seema84 commented 1 year ago

What I've just noticed is that you don't store the values (whether phantoms are activated or deactivated) in a file at all?

The list is maintained in the config.yml file, which is where you have to set the values

I mean each individual player.

srnyx commented 1 year ago

I mean each individual player.

Oh, you want each player to be able to toggle per-world for themselves?

seema84 commented 1 year ago

I am sorry if I have caused some confusion. My question about where the data is stored was not related to my original question, but was meant in general. I haven't found this data anywhere (whether a player has just deactivated a phantom or not).

srnyx commented 1 year ago

I am sorry if I have caused some confusion. My question about where the data is stored was not related to my original question, but was meant in general. I haven't found this data anywhere (whether a player has just deactivated a phantom or not).

Oh I see, I'd like to keep this issue related to the original then. If you have other questions about the plugin (like that), you can ask in my Discord server.

srnyx commented 11 months ago

https://github.com/srnyx/personal-phantoms/commit/fb5a029f625cd1b36dbeed705647c61159b47da0