Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Supported Minecraft versions: 1.16.5 ~ 1.21
Supported Minecraft versions: 1.16.5 ~ 1.21.10

Free version https://www.spigotmc.org/resources/65603/

Expand Down
12 changes: 8 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>me.sat7</groupId>
<artifactId>DynamicShop</artifactId>
<version>3.120.1</version>
<version>3.120.4</version>
<packaging>jar</packaging>

<name>DynamicShop</name>
Expand Down Expand Up @@ -104,6 +104,10 @@
<id>rosewood-repo</id>
<url>https://repo.rosewooddev.io/repository/public/</url>
</repository>
<repository>
<id>codemc-repo</id>
<url>https://repo.codemc.io/repository/maven-public/</url>
</repository>
</repositories>

<dependencies>
Expand All @@ -128,12 +132,12 @@
<dependency>
<groupId>com.opencsv</groupId>
<artifactId>opencsv</artifactId>
<version>5.2</version>
<version>5.11.2</version>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.11.0</version>
<version>2.14.0</version>
</dependency>
<dependency>
<groupId>me.clip</groupId>
Expand Down Expand Up @@ -162,7 +166,7 @@
<dependency>
<groupId>com.github.PikaMug</groupId>
<artifactId>LocaleLib</artifactId>
<version>3.9</version>
<version>4.1.1</version>
</dependency>
<dependency>
<groupId>org.black_ixx</groupId>
Expand Down
32 changes: 16 additions & 16 deletions src/main/java/me/sat7/dynamicshop/DynaShopAPI.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public static boolean IsShopEnable(String shopName)
return shopData.get().getBoolean("Options.enable", true);
}

// 상점 UI생성 후 열기
// 상점 UI생성 후 열기 (建立商店UI後開啟)
public static void openShopGui(Player player, String shopName, int page)
{
if(!IsShopEnable(shopName))
Expand All @@ -60,23 +60,23 @@ public static void openShopGui(Player player, String shopName, int page)
}
}

// 상점 설정 화면
// 상점 설정 화면 (商店設定畫面)
public static void openShopSettingGui(Player player, String shopName)
{
ShopSettings uiClass = new ShopSettings();
Inventory inventory = uiClass.getGui(player, shopName);
UIManager.Open(player, inventory, uiClass);
}

// 상점 로테이트 편집기
// 상점 로테이트 편집기 (商店輪換編輯器)
public static void OpenRotationEditor(Player player, String shopName)
{
RotationEditor uiClass = new RotationEditor();
Inventory inventory = uiClass.getGui(player, shopName);
UIManager.Open(player, inventory, uiClass);
}

// 거래화면 생성 및 열기
// 거래화면 생성 및 열기 (建立並開啟交易畫面)
public static void openItemTradeGui(Player player, String shopName, String tradeIdx)
{
if(!IsShopEnable(shopName))
Expand All @@ -94,7 +94,7 @@ public static void openItemTradeGui(Player player, String shopName, String trade
}


// 아이탬 파렛트 생성 및 열기
// 아이탬 파렛트 생성 및 열기 (建立並開啟物品調色盤)
public static void openItemPalette(Player player, int uiSubType, String shopName, int targetSlot, int page, String search)
{
ItemPalette uiClass = new ItemPalette();
Expand All @@ -114,69 +114,69 @@ public static void openItemSettingGui(Player player, String shopName, int shopSl
UIManager.Open(player, inventory, uiClass);
}

// 페이지 에디터 열기
// 페이지 에디터 열기 (開啟頁面編輯器)
public static void openPageEditor(Player player, String shopName, int page)
{
PageEditor uiClass = new PageEditor();
Inventory inventory = uiClass.getGui(player, shopName, page);
UIManager.Open(player, inventory, uiClass);
}

// 로그뷰어 열기
// 로그뷰어 열기 (開啟日誌檢視器)
public static void openLogViewer(Player player, String shopName)
{
LogViewer uiClass = new LogViewer();
Inventory inventory = uiClass.getGui(player, shopName);
UIManager.Open(player, inventory, uiClass);
}

// 재고 시뮬레이터 열기
// 재고 시뮬레이터 열기 (開啟庫存模擬器)
public static void openStockSimulator(Player player, String shopName)
{
StockSimulator uiClass = new StockSimulator();
Inventory inventory = uiClass.getGui(player, shopName);
UIManager.Open(player, inventory, uiClass);
}

// 스타트 페이지
// 스타트 페이지 (起始頁)
public static void openStartPage(Player player)
{
StartPage uiClass = new StartPage();
Inventory inventory = uiClass.getGui(player);
UIManager.Open(player, inventory, uiClass);
}

// 상점 목록창
// 상점 목록창 (商店列表視窗)
public static void openShopListUI(Player player, int page, int slotIndex)
{
ShopList uiClass = new ShopList();
Inventory inventory = uiClass.getGui(player, page, slotIndex);
UIManager.Open(player, inventory, uiClass);
}

// 컬러 픽커
// 컬러 픽커 (顏色選擇器)
public static void openColorPicker(Player player, int slotIndex)
{
ColorPicker uiClass = new ColorPicker();
Inventory inventory = uiClass.getGui(player, slotIndex);
UIManager.Open(player, inventory, uiClass);
}

// 퀵셀 창
// 퀵셀 창 (快速銷售視窗)
public static void openQuickSellGUI(Player player)
{
QuickSell uiClass = new QuickSell();
Inventory inventory = uiClass.getGui(player);
UIManager.Open(player, inventory, uiClass);
}

// 유저 데이터를 다시 만들고 만들어졌는지 확인함.
// 유저 데이터를 다시 만들고 만들어졌는지 확인함. (重新建立使用者資料並確認是否已建立)
public static boolean recreateUserData(Player player)
{
return UserUtil.RecreateUserData(player);
}

// 스타트페이지 셋팅창
// 스타트페이지 셋팅창 (起始頁設定視窗)
public static void openStartPageSettingGui(Player player, int slotIndex)
{
StartPageSettings uiClass = new StartPageSettings();
Expand Down Expand Up @@ -245,10 +245,10 @@ public static ArrayList<ItemStack> getShopItems(@NonNull String shopName)

if (!data.get().contains(s + ".value"))
{
continue; // 장식용임
continue; // 장식용임 (裝飾用)
}

String itemName = data.get().getString(s + ".mat"); // 메테리얼
String itemName = data.get().getString(s + ".mat"); // 메테리얼 (材料)
try
{
Material mat = Material.getMaterial(itemName);
Expand Down
23 changes: 12 additions & 11 deletions src/main/java/me/sat7/dynamicshop/DynamicShop.java
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@

public final class DynamicShop extends JavaPlugin implements Listener
{
private static Economy econ = null; // 볼트에 물려있는 이코노미
private static Economy econ = null; // 볼트에 물려있는 이코노미 (與Vault掛鉤的經濟系統)
public static Economy getEconomy()
{
return econ;
Expand Down Expand Up @@ -203,14 +203,14 @@ private void Init()

RotationUtil.RestartAllRotationTask();

// 완료
// 완료 (完成)
console.sendMessage(Constants.DYNAMIC_SHOP_PREFIX + " Enabled! :)");

CheckUpdate();
InitBstats();
}

// 볼트 이코노미 초기화
// 볼트 이코노미 초기화 (Vault經濟系統初始化)
private void SetupVault()
{
if (getServer().getPluginManager().getPlugin("Vault") == null)
Expand Down Expand Up @@ -380,8 +380,8 @@ public void PeriodicRepetitiveTask()
periodicRepetitiveTask.cancel();
}

// 1000틱 = 50초 = 마인크래프트 1시간
// 20틱 = 현실시간 1초
// 1000틱 = 50초 = 마인크래프트 1시간 (1000 tick = 50秒 = Minecraft 1小時)
// 20틱 = 현실시간 1초 (20 tick = 現實時間 1秒)
periodicRepetitiveTask = Bukkit.getScheduler().runTaskTimer(DynamicShop.plugin, this::RepeatAction, 20, 20);
}

Expand All @@ -394,7 +394,7 @@ private void RepeatAction()
//String time = sdf.format(System.currentTimeMillis());
//console.sendMessage(time + " / " + repeatTaskCount);

if (repeatTaskCount == 25) // 25초 = 500틱 = 마인크래프트 30분
if (repeatTaskCount == 25) // 25초 = 500틱 = 마인크래프트 30분 (25秒 = 500 tick = Minecraft 30分鐘)
{
ShopUtil.randomChange(new Random());
repeatTaskCount = 0;
Expand Down Expand Up @@ -458,12 +458,12 @@ private void hookIntoPlayerPoints()

private void initCommands()
{
// 명령어 등록 (개별 클레스로 되어있는것들)
// 명령어 등록 (개별 클레스로 되어있는것들) (指令註冊(分別在不同的類別中))
getCommand("DynamicShop").setExecutor(new Root());
getCommand("shop").setExecutor(new Optional());
getCommand("sell").setExecutor(new Sell());

// 자동완성
// 자동완성 (自動完成)
getCommand("DynamicShop").setTabCompleter(this);
getCommand("shop").setTabCompleter(this);
getCommand("sell").setTabCompleter(this);
Expand All @@ -484,7 +484,7 @@ private void registerEvents()
private void makeFolders()
{
File shopFolder = new File(getDataFolder(), "Shop");
shopFolder.mkdir(); // new 하고 같은줄에서 바로 하면 폴더 안만들어짐.
shopFolder.mkdir(); // new 하고 같은줄에서 바로 하면 폴더 안만들어짐. (如果在new的同一行直接執行,資料夾不會建立)

File rotationFolder = new File(getDataFolder(), "Rotation");
rotationFolder.mkdir();
Expand All @@ -498,8 +498,9 @@ private void InitConfig()
UserUtil.Init();
ShopUtil.Reload();
ConfigUtil.Load();
DynamicShop.DEBUG_MODE = ConfigUtil.GetDebugMode();

LangUtil.setupLangFile(ConfigUtil.GetLanguage()); // ConfigUtil.Load() 보다 밑에 있어야함.
LangUtil.setupLangFile(ConfigUtil.GetLanguage()); // ConfigUtil.Load() 보다 밑에 있어야함. (必須在 ConfigUtil.Load() 之後)
LayoutUtil.Setup();

StartPage.setupStartPageFile();
Expand All @@ -518,7 +519,7 @@ private void setupSignFile()
ccSign.save();
}

// 명령어 자동완성
// 명령어 자동완성 (指令自動完成)
@Override
public List<String> onTabComplete(CommandSender sender, Command cmd, String commandLabel, String[] args)
{
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/me/sat7/dynamicshop/commands/CMDManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,8 @@ public static void RunCMD(String key, String[] args, CommandSender sender)
if(CMDHashMap.containsKey(key))
{
CMDHashMap.get(key).RunCMD(args, sender);
} else {
Help.showHelp("main", sender, args);
}
}
}
2 changes: 1 addition & 1 deletion src/main/java/me/sat7/dynamicshop/commands/DeleteUser.java
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public void RunCMD(String[] args, CommandSender sender)
if (lastJoinLong == 0)
continue;

// 마지막으로 접속한지 입력한 일보다 더 지남.
// 마지막으로 접속한지 입력한 일보다 더 지남. (最後上線時間已超過輸入的天數)
long dayPassed = currentTime - lastJoinLong;
if (dayPassed > target)
{
Expand Down
Loading