-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ver 0.10.1-Beta.2: Removed unused dependency.
- Loading branch information
1 parent
8dc456c
commit c852767
Showing
18 changed files
with
112 additions
and
270 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
src/main/java/icu/nyat/kusunoki/Action/NyatLibOnDisable.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package icu.nyat.kusunoki.Action; | ||
|
||
import icu.nyat.kusunoki.Utils.NyatLibLogger; | ||
|
||
import static icu.nyat.kusunoki.NyatLib.brandUpdater; | ||
|
||
public class NyatLibOnDisable { | ||
public static void DisableStep(){ | ||
if(brandUpdater != null){ | ||
brandUpdater.stop(); | ||
} | ||
NyatLibLogger.logINFO("Goodbye!"); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...va/icu/nyat/kusunoki/utils/ReloadCmd.java → .../icu/nyat/kusunoki/Command/ReloadCmd.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 1 addition & 2 deletions
3
.../nyat/kusunoki/packet/PlayerListener.java → .../nyat/kusunoki/Packet/PlayerListener.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package icu.nyat.kusunoki.Utils; | ||
|
||
import icu.nyat.kusunoki.NyatLib; | ||
import org.bukkit.configuration.file.FileConfiguration; | ||
|
||
import java.util.ArrayList; | ||
|
||
public class ConfigReader { | ||
public static void Read(FileConfiguration config){ | ||
NyatLib.BrandName = config.getString("default.ServerName"); | ||
NyatLib.BrandVersion = config.getString("default.ServerVersion"); | ||
NyatLib.BrandProtocolVersion = (int)config.get("default.ServerProtocolVersion"); | ||
NyatLib.ServerSupportedProtocolVersion = (ArrayList<Integer>) config.get("default.ServerSupportedProtocolVersion"); | ||
NyatLib.isBroadcastEnabled = config.getBoolean("default.EnableBroadcast"); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package icu.nyat.kusunoki.Utils; | ||
|
||
import java.io.BufferedReader; | ||
import java.io.InputStreamReader; | ||
import java.net.HttpURLConnection; | ||
import java.net.URL; | ||
|
||
public class HttpUtil { | ||
public String Fetch(String urlString) throws Exception { | ||
StringBuilder result = new StringBuilder(); | ||
URL url = new URL(urlString); | ||
HttpURLConnection HttpRequest = (HttpURLConnection) url.openConnection(); | ||
HttpRequest.setRequestMethod("GET"); | ||
HttpRequest.setConnectTimeout(2000); | ||
HttpRequest.setReadTimeout(3000); | ||
BufferedReader reader = new BufferedReader(new InputStreamReader(HttpRequest.getInputStream())); | ||
String line; | ||
while ((line = reader.readLine()) != null) { | ||
result.append(line); | ||
} | ||
reader.close(); | ||
return result.toString(); | ||
} | ||
|
||
} |
7 changes: 1 addition & 6 deletions
7
...cu/nyat/kusunoki/utils/NyatLibLogger.java → ...cu/nyat/kusunoki/Utils/NyatLibLogger.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.