added name of player to ban/kick/vote-kick/un-admin/admin confirmation dialog (#1846)
* added name of player to baning/kicking/vote-kicking/admining * slight tweaks * fixed redundant things
This commit is contained in:
@@ -198,12 +198,12 @@ server.outdated = [crimson]Outdated Server![]
|
|||||||
server.outdated.client = [crimson]Outdated Client![]
|
server.outdated.client = [crimson]Outdated Client![]
|
||||||
server.version = [gray]v{0} {1}
|
server.version = [gray]v{0} {1}
|
||||||
server.custombuild = [accent]Custom Build
|
server.custombuild = [accent]Custom Build
|
||||||
confirmban = Are you sure you want to ban this player?
|
confirmban = Are you sure you want to ban "{0}[white]"?
|
||||||
confirmkick = Are you sure you want to kick this player?
|
confirmkick = Are you sure you want to kick "{0}[white]"?
|
||||||
confirmvotekick = Are you sure you want to vote-kick this player?
|
confirmvotekick = Are you sure you want to vote-kick "{0}[white]"?
|
||||||
confirmunban = Are you sure you want to unban this player?
|
confirmunban = Are you sure you want to unban this player?
|
||||||
confirmadmin = Are you sure you want to make this player an admin?
|
confirmadmin = Are you sure you want to make "{0}[white]" an admin?
|
||||||
confirmunadmin = Are you sure you want to remove admin status from this player?
|
confirmunadmin = Are you sure you want to remove admin status from "{0}[white]"?
|
||||||
joingame.title = Join Game
|
joingame.title = Join Game
|
||||||
joingame.ip = Address:
|
joingame.ip = Address:
|
||||||
disconnect = Disconnected.
|
disconnect = Disconnected.
|
||||||
|
|||||||
@@ -113,9 +113,9 @@ public class PlayerListFragment extends Fragment{
|
|||||||
t.defaults().size(bs);
|
t.defaults().size(bs);
|
||||||
|
|
||||||
t.addImageButton(Icon.hammer, Styles.clearPartiali,
|
t.addImageButton(Icon.hammer, Styles.clearPartiali,
|
||||||
() -> ui.showConfirm("$confirm", "$confirmban", () -> Call.onAdminRequest(user, AdminAction.ban)));
|
() -> ui.showConfirm("$confirm", Core.bundle.format("confirmban", user.name), () -> Call.onAdminRequest(user, AdminAction.ban)));
|
||||||
t.addImageButton(Icon.cancel, Styles.clearPartiali,
|
t.addImageButton(Icon.cancel, Styles.clearPartiali,
|
||||||
() -> ui.showConfirm("$confirm", "$confirmkick", () -> Call.onAdminRequest(user, AdminAction.kick)));
|
() -> ui.showConfirm("$confirm", Core.bundle.format("confirmkick", user.name), () -> Call.onAdminRequest(user, AdminAction.kick)));
|
||||||
|
|
||||||
t.row();
|
t.row();
|
||||||
|
|
||||||
@@ -125,9 +125,9 @@ public class PlayerListFragment extends Fragment{
|
|||||||
String id = user.uuid;
|
String id = user.uuid;
|
||||||
|
|
||||||
if(netServer.admins.isAdmin(id, connection.address)){
|
if(netServer.admins.isAdmin(id, connection.address)){
|
||||||
ui.showConfirm("$confirm", "$confirmunadmin", () -> netServer.admins.unAdminPlayer(id));
|
ui.showConfirm("$confirm", Core.bundle.format("confirmunadmin", user.name), () -> netServer.admins.unAdminPlayer(id));
|
||||||
}else{
|
}else{
|
||||||
ui.showConfirm("$confirm", "$confirmadmin", () -> netServer.admins.adminPlayer(id, user.usid));
|
ui.showConfirm("$confirm", Core.bundle.format("confirmadmin", user.name), () -> netServer.admins.adminPlayer(id, user.usid));
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.update(b -> b.setChecked(user.isAdmin))
|
.update(b -> b.setChecked(user.isAdmin))
|
||||||
@@ -142,7 +142,7 @@ public class PlayerListFragment extends Fragment{
|
|||||||
button.add().growY();
|
button.add().growY();
|
||||||
|
|
||||||
button.addImageButton(Icon.hammer, Styles.clearPartiali,
|
button.addImageButton(Icon.hammer, Styles.clearPartiali,
|
||||||
() -> ui.showConfirm("$confirm", "$confirmvotekick", () -> Call.sendChatMessage("/votekick " + user.name))).size(h);
|
() -> ui.showConfirm("$confirm", Core.bundle.format("confirmvotekick", user.name), () -> Call.sendChatMessage("/votekick " + user.name))).size(h);
|
||||||
}
|
}
|
||||||
|
|
||||||
content.add(button).padBottom(-6).width(350f).maxHeight(h + 14);
|
content.add(button).padBottom(-6).width(350f).maxHeight(h + 14);
|
||||||
|
|||||||
Reference in New Issue
Block a user