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

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

Closed
ArmonicPvP opened this issue Nov 20, 2022 · 10 comments
Labels
bug Something isn't working need feedback Ticket subject to being closed if feedback not given within 14 days.

Comments

@ArmonicPvP
Copy link

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

@ArmonicPvP ArmonicPvP added the bug Something isn't working label Nov 20, 2022
@LlmDl
Copy link
Member

LlmDl commented Nov 20, 2022

What was the amount to used?

@ArmonicPvP
Copy link
Author

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

@LlmDl
Copy link
Member

LlmDl commented Nov 21, 2022

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
Copy link
Author

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
Copy link
Member

LlmDl commented Nov 21, 2022

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.

@LlmDl LlmDl added the need feedback Ticket subject to being closed if feedback not given within 14 days. label Nov 21, 2022
@ArmonicPvP
Copy link
Author

@LlmDl
Copy link
Member

LlmDl commented Nov 22, 2022

[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
Copy link
Author

What are ptw messages?

@ArmonicPvP
Copy link
Author

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

image

@ArmonicPvP
Copy link
Author

ArmonicPvP commented Nov 22, 2022

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

@LlmDl LlmDl closed this as not planned Won't fix, can't repro, duplicate, stale Dec 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working need feedback Ticket subject to being closed if feedback not given within 14 days.
Projects
None yet
Development

No branches or pull requests

2 participants