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

"<Player> has not played on the server before." error due to improperly set server_ip in ah_bans #50

Open
RalphORama opened this issue Feb 14, 2024 · 0 comments

Comments

@RalphORama
Copy link

RalphORama commented Feb 14, 2024

I am running an offline mode server behind a Velocity proxy.

A player died, and was deathbanned. However, when I run the command undeathban Brohammad, I get the error Brohammad has not played on the server before. I am not sure why this issue is happening. Upon inspecting the database, I see the following:

SELECT player_uuid,last_known_name,last_death FROM ah_player WHERE last_known_name = 'Brohammad';

-- +--------------------------------------+-----------------+---------------------+
-- | player_uuid                          | last_known_name | last_death          |
-- +--------------------------------------+-----------------+---------------------+
-- | 970e5b2b-4326-41b8-bdb8-0f5e5ad49e85 | Brohammad       | 2024-02-14 17:27:01 |
-- +--------------------------------------+-----------------+---------------------+

SELECT ban_id,player_uuid,server_ip,server_port,start_date,expiration_date,ban_time FROM ah_ban WHERE player_uuid = '970e5b2b-4326-41b8-bdb8-0f5e5ad49e85';

-- +--------+--------------------------------------+------------+-------------+---------------------+---------------------+----------+
-- | ban_id | player_uuid                          | server_ip  | server_port | start_date          | expiration_date     | ban_time |
-- +--------+--------------------------------------+------------+-------------+---------------------+---------------------+----------+
-- |      1 | 970e5b2b-4326-41b8-bdb8-0f5e5ad49e85 | 172.18.0.4 |       26602 | 2024-02-14 17:27:01 | 2024-02-15 17:27:01 |     1440 |
-- +--------+--------------------------------------+------------+-------------+---------------------+---------------------+----------+

Old bans (from before I set up Velocity) have NULL set for server_ip and server_port. I tried updating those fields:

UPDATE ah_ban SET server_ip = NULL, server_port = NULL WHERE server_ip = '172.18.0.4';

But this did not fix the issue.


EDIT: I found a fix for the issue.

Running the UPDATE query did not fix the issue while the server was online. When I shut the server down it updated the rows again. I shut the server down, ran the UPDATE query, and started the server again. This fixed the issue.

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

1 participant