Skip to content

Commit

Permalink
Added 'Withdraw.*' and 'Deposit.*' BlobMessages
Browse files Browse the repository at this point in the history
Fixed ConfigDecorator in order to generate the default config.yml file in case of being the first time of loading a jar.
  • Loading branch information
anjoismysign committed Dec 25, 2023
1 parent 2b698a5 commit 2eb51ba
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import us.mytheria.bloblib.utilities.ResourceUtil;

import java.io.File;
import java.io.IOException;

public class ConfigDecorator {
private final JavaPlugin plugin;
Expand All @@ -15,6 +16,13 @@ public class ConfigDecorator {
public ConfigDecorator(JavaPlugin plugin) {
this.plugin = plugin;
File file = new File(plugin.getDataFolder(), "config.yml");
if (!file.exists()) {
try {
file.createNewFile();
} catch (IOException e) {
e.printStackTrace();
}
}
ResourceUtil.updateYml(file, plugin);
plugin.reloadConfig();
this.listenersSection = ListenersSection.of(plugin);
Expand Down
48 changes: 47 additions & 1 deletion src/main/resources/bloblib_lang.yml
Original file line number Diff line number Diff line change
Expand Up @@ -271,4 +271,50 @@ Economy:
Number-Exception:
Type: CHAT
Message: '&cProvided amount is not a valid number'
BlobSound: System.Alert
BlobSound: System.Alert
Withdraw:
Amount:
Type: TITLE
Title: '&f&lAMOUNT'
Subtitle: '&7Type amount to withdraw'
Amount-Timeout:
Type: TITLE
Title: '&c&lTIMEOUT'
Subtitle: '&7You took too long to input amount'
BlobSound: Builder.Timeout
Insufficient-Balance:
Type: TITLE
Title: '&c&lNO FUNDS'
Subtitle: '&7Not enough funds to withdraw'
BlobSound: System.Alert
Amount-Too-Small:
Type: TITLE
Title: '&c&lTOO SMALL'
Subtitle: '&7Amount is too small to withdraw'
BlobSound: System.Alert
Successful:
Type: CHAT
Message: 'You have withdrawn %display%'
Deposit:
Amount:
Type: TITLE
Title: '&f&lAMOUNT'
Subtitle: '&7Type amount to deposit'
Amount-Timeout:
Type: TITLE
Title: '&c&lTIMEOUT'
Subtitle: '&7You took too long to input amount'
BlobSound: Builder.Timeout
Insufficient-Balance:
Type: TITLE
Title: '&c&lNO FUNDS'
Subtitle: '&7Not enough funds to deposit'
BlobSound: System.Alert
Amount-Too-Small:
Type: TITLE
Title: '&c&lTOO SMALL'
Subtitle: '&7Amount is too small to deposit'
BlobSound: System.Alert
Successful:
Type: CHAT
Message: 'You have deposited %display%'

0 comments on commit 2eb51ba

Please sign in to comment.