Skip to content

Commit

Permalink
Merge pull request #2 from micrsky/Preview
Browse files Browse the repository at this point in the history
Preview
  • Loading branch information
Shiroiame-Kusu authored Aug 5, 2023
2 parents 4c9919d + b3a686f commit 3270891
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 21 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>icu.nyat.Kusunoki</groupId>
<artifactId>NyatLib</artifactId>
<version>0.5.0-Beta.1</version>
<version>0.5.1-Beta.2</version>

<packaging>jar</packaging>

Expand Down
18 changes: 2 additions & 16 deletions src/main/java/icu/nyat/kusunoki/NyatLib.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,35 +3,20 @@
import icu.nyat.kusunoki.utils.NyatLibLogger;
import icu.nyat.kusunoki.utils.ReloadCmd;
import icu.nyat.kusunoki.packet.*;
import icu.nyat.kusunoki.utils.HttpUtil;
import icu.nyat.kusunoki.packet.PlayerListener;
import icu.nyat.kusunoki.utils.NyatLibYAMLPraser;
import icu.nyat.kusunoki.motd.PingEventPaper;
import icu.nyat.kusunoki.motd.PingEventSpigot;
import io.papermc.lib.PaperLib;
import org.bukkit.plugin.Plugin;
import org.bukkit.plugin.java.JavaPlugin;
import org.bukkit.Bukkit;
import com.comphenix.protocol.ProtocolLibrary;
import com.comphenix.protocol.ProtocolManager;
import org.yaml.snakeyaml.Yaml;

import java.io.InputStream;
import java.util.Collections;
import java.util.Objects;

import static icu.nyat.kusunoki.utils.NyatLibYAMLPraser.*;
import static org.bukkit.Bukkit.getServer;

public final class NyatLib extends JavaPlugin {
//public static final NyatLib plugin = NyatLib.getPlugin(NyatLib.class);
private static NyatLib Main;
private String version = this.getDescription().getVersion().toString();
//public String author = this.getDescription().getAuthors().toString();
//public String website = this.getDescription().getWebsite().toString();
private NyatLibCore brandUpdater;
//public boolean isProtocolLibInstalled;


@Override
public void onLoad(){
Expand All @@ -51,7 +36,7 @@ public void onLoad(){
public void onEnable(){
NyatLibLogger Logger = new NyatLibLogger();
Main = this;
NyatLibOnEnableLog ResourceFetch = new NyatLibOnEnableLog();
NyatLibOnEnable ResourceFetch = new NyatLibOnEnable();
try {
ResourceFetch.Fetch();
}catch(Exception e){
Expand Down Expand Up @@ -87,5 +72,6 @@ public void onEnable(){
public void onDisable() {
// Plugin shutdown logic
brandUpdater.stop();
NyatLibOnDisable.DisableStep();
}
}
10 changes: 10 additions & 0 deletions src/main/java/icu/nyat/kusunoki/NyatLibOnDisable.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package icu.nyat.kusunoki;

import icu.nyat.kusunoki.utils.NyatLibLogger;

public class NyatLibOnDisable {
public static void DisableStep(){
NyatLibLogger Logger = new NyatLibLogger();
Logger.logINFO("Goodbye!");
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package icu.nyat.kusunoki;

import icu.nyat.kusunoki.NyatLib;
import icu.nyat.kusunoki.utils.HttpUtil;
import icu.nyat.kusunoki.utils.NyatLibLogger;

Expand All @@ -10,16 +9,14 @@
import static org.bukkit.Bukkit.getServer;

import org.bukkit.plugin.Plugin;
import org.bukkit.plugin.java.JavaPlugin;

public class NyatLibOnEnableLog {
public class NyatLibOnEnable {
public static final Plugin plugin = NyatLib.getPlugin(NyatLib.class);
private String author = plugin.getDescription().getVersion();
private String website = plugin.getDescription().getWebsite();
public static String SubMCVersion;

public boolean isProtocolLibInstalled;
public String ProtocolLibVersion;
NyatLibLogger Logger = new NyatLibLogger();
public void Fetch(){
Logger.logINFO("§3Powered By " + author);
Expand Down

0 comments on commit 3270891

Please sign in to comment.