Skip to content

Commit

Permalink
[CI skip] [U] More info
Browse files Browse the repository at this point in the history
  • Loading branch information
ClayCoffee committed Apr 1, 2020
1 parent 5ba4cc0 commit bdfa56a
Show file tree
Hide file tree
Showing 7 changed files with 59 additions and 1 deletion.
17 changes: 17 additions & 0 deletions src/main/java/club/claycoffee/ClayTech/ClayTech.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,15 @@
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;
import org.bukkit.configuration.file.YamlConfiguration;
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;
Expand Down Expand Up @@ -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<String> 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
Expand Down
18 changes: 17 additions & 1 deletion src/main/java/club/claycoffee/ClayTech/utils/Utils.java
Original file line number Diff line number Diff line change
Expand Up @@ -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())) {
Expand Down
6 changes: 6 additions & 0 deletions src/main/resources/en-UK.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
6 changes: 6 additions & 0 deletions src/main/resources/en-US.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
1 change: 1 addition & 0 deletions src/main/resources/plugin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
6 changes: 6 additions & 0 deletions src/main/resources/zh-CN.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
6 changes: 6 additions & 0 deletions src/main/resources/zh-TW.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit bdfa56a

Please sign in to comment.