diff --git a/src/main/java/club/claycoffee/ClayTech/ClayTech.java b/src/main/java/club/claycoffee/ClayTech/ClayTech.java index 06cbd73..8848bdd 100644 --- a/src/main/java/club/claycoffee/ClayTech/ClayTech.java +++ b/src/main/java/club/claycoffee/ClayTech/ClayTech.java @@ -7,6 +7,7 @@ import java.util.Map; import org.bukkit.Bukkit; +import org.bukkit.ChatColor; import org.bukkit.Material; import org.bukkit.block.Block; import org.bukkit.configuration.file.FileConfiguration; @@ -14,6 +15,7 @@ import org.bukkit.inventory.Inventory; import org.bukkit.inventory.ItemStack; import org.bukkit.plugin.java.JavaPlugin; +import org.bukkit.scheduler.BukkitRunnable; import club.claycoffee.ClayTech.utils.DataYML; import club.claycoffee.ClayTech.utils.Lang; @@ -263,6 +265,21 @@ public void onEnable() { Bukkit.getPluginManager().registerEvents(new RocketLauncherListener(), this); Bukkit.getPluginManager().registerEvents(new PlanetBaseListener(), this); // Bukkit.getPluginManager().registerEvents(new Debug(), this); + new BukkitRunnable() { + + @Override + public void run() { + List Authors = plugin.getDescription().getAuthors(); + Bukkit.getLogger().info(ChatColor.GREEN + Lang.readGeneralText("Info_1")); + Bukkit.getLogger().info(ChatColor.GREEN + Lang.readGeneralText("Info_2").replaceAll("\\{version\\}", plugin.getDescription().getVersion())); + Bukkit.getLogger().info(ChatColor.GREEN + Lang.readGeneralText("Info_3").replaceAll("\\{author\\}", Utils.ArrayToString(Authors.toArray(new String[Authors.size()]), "," , "."))); + Bukkit.getLogger().info(ChatColor.GREEN + Lang.readGeneralText("Info_4")); + Bukkit.getLogger().info(ChatColor.GREEN + Lang.readGeneralText("Info_5").replaceAll("\\{issue_tracker\\}",plugin.getBugTrackerURL())); + Bukkit.getLogger().info(ChatColor.GREEN + Lang.readGeneralText("Info_6")); + } + + }.runTaskAsynchronously(this); + } @Override diff --git a/src/main/java/club/claycoffee/ClayTech/utils/Utils.java b/src/main/java/club/claycoffee/ClayTech/utils/Utils.java index 381c49c..c0c147e 100644 --- a/src/main/java/club/claycoffee/ClayTech/utils/Utils.java +++ b/src/main/java/club/claycoffee/ClayTech/utils/Utils.java @@ -40,7 +40,23 @@ public static ItemStack setLore(ItemStack is, int Line, String content) { is.setItemMeta(im); return (is); } - + + public static String ArrayToString(String[] Array,String split,String LastSplit) { + String returnMessage=""; + int i = 0; + for(String each : Array) { + i = i + 1; + if(i == Array.length) { + returnMessage += each + LastSplit; + } + else { + returnMessage += each; + continue; + } + } + return(returnMessage); + } + public static String readPlayerMetadataString(Player p, String key) { for (MetadataValue mv : p.getMetadata(key)) { if (mv.getOwningPlugin().equals(ClayTech.getInstance())) { diff --git a/src/main/resources/en-UK.yml b/src/main/resources/en-UK.yml index 18857e3..ad3f03a 100644 --- a/src/main/resources/en-UK.yml +++ b/src/main/resources/en-UK.yml @@ -2,6 +2,12 @@ General: startTip: "ClayTech By ClayCoffee." registeringItems: "Registering items.." registeringError: "There is an error when registering items:" + Info_1: "###########################################################" + Info_2: "Successfully loaded ClayTech v{version}." + Info_3: "Author: {author}" + Info_4: "" + Info_5: "Issue Tracker: {issue_tracker}" + Info_6: "###########################################################" CantPlaceLore: "&eCan't Place" CantPlace: "&b[ClayTech]&cYou cannot place this!" Blind_5_effect: "&7Blind V" diff --git a/src/main/resources/en-US.yml b/src/main/resources/en-US.yml index 18857e3..ad3f03a 100644 --- a/src/main/resources/en-US.yml +++ b/src/main/resources/en-US.yml @@ -2,6 +2,12 @@ General: startTip: "ClayTech By ClayCoffee." registeringItems: "Registering items.." registeringError: "There is an error when registering items:" + Info_1: "###########################################################" + Info_2: "Successfully loaded ClayTech v{version}." + Info_3: "Author: {author}" + Info_4: "" + Info_5: "Issue Tracker: {issue_tracker}" + Info_6: "###########################################################" CantPlaceLore: "&eCan't Place" CantPlace: "&b[ClayTech]&cYou cannot place this!" Blind_5_effect: "&7Blind V" diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml index 0292403..506538a 100644 --- a/src/main/resources/plugin.yml +++ b/src/main/resources/plugin.yml @@ -2,4 +2,5 @@ name: ClayTech main: club.claycoffee.ClayTech.ClayTech version: 1.1.0 api-version: 1.13 +author: ClayCoffee depend: [CS-CoreLib, Slimefun] \ No newline at end of file diff --git a/src/main/resources/zh-CN.yml b/src/main/resources/zh-CN.yml index 41a0577..bcd100a 100644 --- a/src/main/resources/zh-CN.yml +++ b/src/main/resources/zh-CN.yml @@ -2,6 +2,12 @@ General: startTip: "粘土科技 By ClayCoffee." registeringItems: "注册粘液科技物品中..." registeringError: "在注册物品时发生错误:" + Info_1: "###########################################################" + Info_2: "成功加载 ClayTech v{version}." + Info_3: "作者: {author}" + Info_4: "" + Info_5: "问题追踪器: {issue_tracker}" + Info_6: "###########################################################" CantPlaceLore: "&e不可放置" CantPlace: "§b[粘土科技]§c你不能放置该物品." Blind_5_effect: "&7失明 V" diff --git a/src/main/resources/zh-TW.yml b/src/main/resources/zh-TW.yml index f2c89d8..91b020b 100644 --- a/src/main/resources/zh-TW.yml +++ b/src/main/resources/zh-TW.yml @@ -2,6 +2,12 @@ General: startTip: "粘土科技 By ClayCoffee." registeringItems: "注冊粘液科技物品中..." registeringError: "在注冊物品時發生錯誤:" + Info_1: "###########################################################" + Info_2: "成功加載 ClayTech v{version}." + Info_3: "作者: {author}" + Info_4: "" + Info_5: "問題追蹤器: {issue_tracker}" + Info_6: "###########################################################" CantPlaceLore: "&e不可放置" CantPlace: "§b[粘土科技]§c妳不能放置該物品." Blind_5_effect: "&7失明 V"