TownyAdvanced / SiegeWar

A war plugin for Towny.
https://townyadvanced.github.io/
Other
60 stars 38 forks source link

/sw nation paysoldiers only giving money to king even after running /swa install #673

Closed ArmonicPvP closed 1 year ago

ArmonicPvP commented 1 year ago

Describe the bug /sw nation paysoldiers only giving money to king after running /swa install and giving members of other towns the private, captain, and general ranks with /n rank

To Reproduce Steps to reproduce the behavior:

  1. Give private ranks with nations to other town members
  2. run /sw nation paysoldiers (amount)
  3. It only goes to the nation leader

Expected behavior Money is split evenly to soldiers

Screenshots image image

Versions (please complete the following information):

Files Startup log: (if possible to not upload this for now, it's literally filled with errors from another plugin) SiegeWar config: https://pastebin.com/bjHTXSPW Townyperms.yml: https://pastebin.com/kbVfZcKy

LlmDl commented 1 year ago

What was the amount to used?

ArmonicPvP commented 1 year ago

I tried 100k, 10k, 1k, and 100 and all gave me the full amount. In that screenshot I did $100

LlmDl commented 1 year ago

Is there anything else you can tell me, are there other players in your nation online? I looked over the code and it looks fine.

ArmonicPvP commented 1 year ago

Yes, the ones who are online are the ones who didn't get it. Do they need to give themselves the guard rank in their own towns to get payments?

LlmDl commented 1 year ago

Paying the nation soldiers only checks the nation pay grade nodes:

                    for(Resident possibleSoldier: nation.getResidents()) {
                        for (String perm : TownyPerms.getResidentPerms(possibleSoldier).keySet()) {
                            if (perm.startsWith("towny.nation.siege.pay.grade.")) {
                                soldierShare = Integer.parseInt(perm.replace("towny.nation.siege.pay.grade.", ""));
                                soldierShareMap.put(resident, soldierShare);
                                break; //Next resident please
                            }
                        }
                    }

If they are in your nation and have the rank you should see payments.

Show me your server startup log.

ArmonicPvP commented 1 year ago

https://pastebin.com/Xehxij70

LlmDl commented 1 year ago
[07:14:27] [Server thread/WARN]: [Towny] Attempted to override an protected string. Skipped msg_ptw_warning_1
[07:14:27] [Server thread/WARN]: [Towny] Attempted to override an protected string. Skipped msg_ptw_warning_2
[07:14:27] [Server thread/WARN]: [Towny] Attempted to override an protected string. Skipped msg_ptw_warning_3

oof.

I'm not certain I want to continue this ticket. I don't see much in the way of sponsorships and so I'm not paid enough to worry about floodgate servers that are also trying to bypass the ptw messages.

Code looks fine and no one else is reporting any issues with the payment of soldiers.

ArmonicPvP commented 1 year ago

What are ptw messages?

ArmonicPvP commented 1 year ago

Even after removing myself as general, I still get all the money.

image

ArmonicPvP commented 1 year ago

Ah, I just looked up what the ptw messages are. No idea why that is happening as my server doesn't even have a donation store. No town even has bonus town blocks except probably the Spawn claim

Edit: It's being overridden because I have changed the Towny prefix and used the "override" folder in lang to override the prefix as seen by this paste: https://pastebin.com/GMTmBmdW