forked from Enaium/spigot-plugin-TreeCutter
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
将写死的代码写入配置文件,允许自定义物品以支持全版本 更新Gradle到8.0版本
- Loading branch information
XiaMoHuaHuo_CN
committed
Jul 10, 2023
1 parent
68dd568
commit 958a5f0
Showing
6 changed files
with
59 additions
and
14 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package cn.enaium.treecutter; | ||
|
||
import java.util.List; | ||
|
||
public interface LLTMap { | ||
List<String> logs = TreeCutter.INSTANCE.getConfig().getStringList("list.logs"); | ||
//Arrays.asList("WARPED_STEM", "CRIMSON_STEM", "OAK_LOG", "BIRCH_LOG", "SPRUCE_LOG", "JUNGLE_LOG", "DARK_OAK_LOG", "ACACIA_LOG") | ||
List<String> leaves = TreeCutter.INSTANCE.getConfig().getStringList("list.leaves"); | ||
//Arrays.asList("NETHER_WART_BLOCK", "WARPED_WART_BLOCK", "OAK_LEAVES", "BIRCH_LEAVES", "SPRUCE_LEAVES", "JUNGLE_LEAVES", "DARK_OAK_LEAVES", "ACACIA_LEAVES"); | ||
List<String> tools = TreeCutter.INSTANCE.getConfig().getStringList("list.tools"); | ||
//Arrays.asList("NETHERITE_AXE", "DIAMOND_AXE", "GOLDEN_AXE", "IRON_AXE", "STONE_AXE", "WOODEN_AXE"); | ||
|
||
} |
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 |
---|---|---|
@@ -1,22 +1,24 @@ | ||
package cn.enaium.treecutter; | ||
|
||
import org.bukkit.Material; | ||
import org.bukkit.plugin.Plugin; | ||
import org.bukkit.plugin.java.JavaPlugin; | ||
|
||
import java.util.Objects; | ||
import java.util.logging.Level; | ||
|
||
public final class TreeCutter extends JavaPlugin { | ||
|
||
static Plugin INSTANCE = null; | ||
|
||
@Override | ||
public void onEnable() { | ||
getLogger().log(Level.INFO, "TreeCutter is enable"); | ||
INSTANCE = this; | ||
saveDefaultConfig(); | ||
getServer().getPluginManager().registerEvents(new Events(this), this); | ||
getLogger().log(Level.INFO, "TreeCutter is enabled."); | ||
} | ||
|
||
@Override | ||
public void onDisable() { | ||
saveConfig(); | ||
getLogger().log(Level.INFO, "TreeCutter is disable"); | ||
getLogger().log(Level.INFO, "TreeCutter is disabled."); | ||
} | ||
} |
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