diff --git a/LICENSE b/LICENSE index 485da8c..8029ab9 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2017 Kamesuta +Copyright (c) 2017 TeamFruit Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md new file mode 100644 index 0000000..c4831c2 --- /dev/null +++ b/README.md @@ -0,0 +1,56 @@ +[![Travis Build](https://img.shields.io/travis/Team-Fruit/ServerObserver.svg?label=Travis%20Build&style=flat)](https://travis-ci.org/Team-Fruit/ServerObserver) +[![CurseForge](http://cf.way2muchnoise.eu/serverobserver.svg)](https://minecraft.curseforge.com/projects/serverobserver) +[![Latest Tag](https://img.shields.io/github/tag/Team-Fruit/ServerObserver.svg?label=Latest%20Tag&style=flat)](https://github.com/Team-Fruit/ServerObserver/tags) +[![Latest Release](https://img.shields.io/github/release/Team-Fruit/ServerObserver.svg?label=Latest%20Release&style=flat)](https://github.com/Team-Fruit/ServerObserver/releases) + +# ServerObserver + +[![CurseForge Versions](http://cf.way2muchnoise.eu/versions/serverobserver.svg)](https://minecraft.curseforge.com/projects/serverobserver/files) + +[![ServerObserver](https://i.gyazo.com/236dc51bb26880ef29640794416c5492.png)](https://minecraft.curseforge.com/projects/serverobserver) + +## About + +**Observe Minecraft Server Status** + +ServerObserver is a mod that **monitors the server** and can be noticed as soon as the server starts up. +You can also **log in automatically**. +- Notify when the server starts up +- Automatic login when the server starts up +- Automatic reconnection (moved to multiplay screen) when disconnected from server +- Automatic connection (Move to Multiplayer screen) when Minecraft starts up + +## How to use + +![Usage](https://i.gyazo.com/e5bd353ea8bb7dbaf4d36257e161cca1.png) + +With the server to be monitored selected on the Multiplayer screen, you can change the monitoring mode to the following order by clicking on the mode screen displayed in the upper right of the screen. +1. Monitor mode: Monitor the server and notify by sound. +2. **Automatic login** mode: In addition to the monitoring mode, log in automatically. +3. Disabled: Do nothing. + +In addition, it is possible to set details such as Ping 's interval, notification sound etc from the setting screen of the Mod screen. + +### Video +[![How to use ServerObserver Mod](https://img.youtube.com/vi/Uj-l8hasASc/0.jpg)](https://www.youtube.com/watch?v=Uj-l8hasASc) + +## Downloads + +Downloads can be found on [CurseForge](https://minecraft.curseforge.com/projects/serverobserver) or on the [GitHub](https://github.com/Team-Fruit/ServerObserver/releases). + +## Contacts + +[![Discord](https://discordapp.com/assets/bb408e0343ddedc0967f246f7e89cebf.svg)](https://discord.gg/zAmvPqV) + +## License + +* ServerObserver + - (c) 2017 TeamFruit + - [![License](https://img.shields.io/badge/License-MIT-blue.svg?style=flat)](https://raw.githubusercontent.com/Team-Fruit/ServerObserver/master/LICENSE.md) +* Text and Translations + - [![License](https://img.shields.io/badge/License-No%20Restriction-green.svg?style=flat)](https://creativecommons.org/publicdomain/zero/1.0/) + +## Credits + +* Kamesuta for ServerObserver +* all [contributors](https://github.com/Team-Fruit/ServerObserver/graphs/contributors) \ No newline at end of file diff --git a/build.gradle b/build.gradle index 0ff34ff..7059bfa 100644 --- a/build.gradle +++ b/build.gradle @@ -295,9 +295,9 @@ if (sec_github_key!=null&&project.isProperty('extra_github_owner')&&project.isPr draft = false def allassets = [jar] subprojects.each { p -> - allassets.addAll([p.tasks.shadowJar, p.tasks.jar, p.tasks.devJar, p.tasks.sourceJar, p.tasks.apiJar]*.outputs*.files*.asPath*.tr('\\','/')) + allassets.addAll([p.tasks.shadowJar, p.tasks.jar, p.tasks.devJar, p.tasks.sourceJar, p.tasks.apiJar]) } - assets = allassets + assets = allassets*.outputs*.files*.asPath*.tr('\\','/') } } diff --git a/src/main/java/net/teamfruit/serverobserver/GuiHandler.java b/src/main/java/net/teamfruit/serverobserver/GuiHandler.java index 2aa8a34..fb9bfac 100644 --- a/src/main/java/net/teamfruit/serverobserver/GuiHandler.java +++ b/src/main/java/net/teamfruit/serverobserver/GuiHandler.java @@ -230,8 +230,16 @@ else if (this.autologin.is()) } } else if (screen instanceof GuiDisconnected) { final GuiDisconnected dcgui = (GuiDisconnected) screen; - if (this.timer.getTime()>0) - dcgui.mc.displayGuiScreen(this.compat.getParentScreen(dcgui)); + if (this.timer.getTime()>0) { + final GuiScreen screen2 = this.compat.getParentScreen(dcgui); + dcgui.mc.displayGuiScreen(screen2); + if (screen2 instanceof GuiMultiplayer) { + final GuiMultiplayer mpgui = (GuiMultiplayer) screen2; + final ServerData serverData = this.target.get(mpgui); + if (serverData!=null) + this.compat.setPinged(serverData, false); + } + } } else if (screen instanceof GuiMainMenu) { final GuiMainMenu mmgui = (GuiMainMenu) screen; if (this.target.getIP()!=null&&!this.hasGuiOpened&&Config.getConfig().durationDisconnected.get()>=10)