mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-02-05 16:37:38 +07:00
Add uuid return to PlayerBanEvent (#4982)
* Update EventType.java * Update Administration.java
This commit is contained in:
parent
268672adb8
commit
a40731624a
@ -421,18 +421,22 @@ public class EventType{
|
||||
public static class PlayerBanEvent{
|
||||
@Nullable
|
||||
public final Player player;
|
||||
public final String uuid;
|
||||
|
||||
public PlayerBanEvent(Player player){
|
||||
public PlayerBanEvent(Player player, String uuid){
|
||||
this.player = player;
|
||||
this.uuid = uuid;
|
||||
}
|
||||
}
|
||||
|
||||
public static class PlayerUnbanEvent{
|
||||
@Nullable
|
||||
public final Player player;
|
||||
public final String uuid;
|
||||
|
||||
public PlayerUnbanEvent(Player player){
|
||||
public PlayerUnbanEvent(Player player, String uuid){
|
||||
this.player = player;
|
||||
this.uuid = uuid;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -220,7 +220,7 @@ public class Administration{
|
||||
getCreateInfo(id).banned = true;
|
||||
|
||||
save();
|
||||
Events.fire(new PlayerBanEvent(Groups.player.find(p -> id.equals(p.uuid()))));
|
||||
Events.fire(new PlayerBanEvent(Groups.player.find(p -> id.equals(p.uuid())), id));
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -259,7 +259,7 @@ public class Administration{
|
||||
info.banned = false;
|
||||
bannedIPs.removeAll(info.ips, false);
|
||||
save();
|
||||
Events.fire(new PlayerUnbanEvent(Groups.player.find(p -> id.equals(p.uuid()))));
|
||||
Events.fire(new PlayerUnbanEvent(Groups.player.find(p -> id.equals(p.uuid())), id));
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user