Skip to content

Commit 2030f33

Browse files
committed
Logout Offline Players
1 parent 5c70ef3 commit 2030f33

File tree

3 files changed

+403
-8
lines changed

3 files changed

+403
-8
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Wurst Client v7.51.1 (MC1.21.10) - Modified by CevAPI
1+
# Wurst Client v7.51.2 (MC1.21.10) - Modified by CevAPI
22

33
![CevAPI Logo](https://i.imgur.com/kBIn9Ab.png)
44

@@ -310,6 +310,7 @@ Because so many of these mods are entirely original, I plan to release some of t
310310
### OfflineSettings
311311
- Auto Reconnect without 5 second timer, perfect for when you're logged out from another location
312312
- Rejoin the current server with a random alt, with an alt with a specific name or with the same name as another player
313+
- Logout selected players in the current server with an option for auto logouts
313314
- Auto detect cracked/offline servers on connect (even when hack is disabled)
314315
- Reconnect to server and immediately send a command, such as /op player
315316
- Adds mixin buttons to disconnect/kick/ban screens for all cracked/offline servers that have the above functions

src/main/java/net/wurstclient/clickgui/ClickGui.java

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,11 @@ public void handleMouseClick(MouseButtonEvent context)
258258
handlePopupMouseClick(mouseX, mouseY, mouseButton);
259259

260260
if(!popupClicked)
261-
handleWindowMouseClick(mouseX, mouseY, mouseButton, context);
261+
{
262+
boolean closedPopups = closeActivePopups();
263+
if(!closedPopups)
264+
handleWindowMouseClick(mouseX, mouseY, mouseButton, context);
265+
}
262266

263267
for(Popup popup : popups)
264268
if(popup.getOwner().getParent().isClosing())
@@ -268,6 +272,17 @@ public void handleMouseClick(MouseButtonEvent context)
268272
popups.removeIf(Popup::isClosing);
269273
}
270274

275+
private boolean closeActivePopups()
276+
{
277+
if(popups.isEmpty())
278+
return false;
279+
280+
for(Popup popup : popups)
281+
popup.close();
282+
283+
return true;
284+
}
285+
271286
public void handleMouseRelease(double mouseX, double mouseY,
272287
int mouseButton)
273288
{

0 commit comments

Comments
 (0)