Skip to content
This repository has been archived by the owner on Apr 27, 2024. It is now read-only.

Commit

Permalink
Add boolean
Browse files Browse the repository at this point in the history
  • Loading branch information
ryderbelserion committed Mar 13, 2023
1 parent f7b1a8e commit f40ad73
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions src/main/java/com/badbones69/crazyauctions/Main.java
Expand Up @@ -5,8 +5,8 @@
import com.badbones69.crazyauctions.api.events.AuctionListEvent;
import com.badbones69.crazyauctions.controllers.DupePatch;
import com.badbones69.crazyauctions.controllers.GUI;
import com.badbones69.crazyauctions.controllers.Metrics;
import com.badbones69.crazyauctions.currency.Vault;
import org.bstats.bukkit.Metrics;
import org.bukkit.Bukkit;
import org.bukkit.Material;
import org.bukkit.command.Command;
Expand Down Expand Up @@ -458,13 +458,13 @@ private ArrayList<Material> getDamageableItems() {

private boolean allowBook(ItemStack item) {
if (item != null && item.hasItemMeta() && item.getItemMeta() instanceof BookMeta) {
System.out.println("[Crazy Auctions] Checking " + item.getType() + " for illegal unicode.");
Bukkit.getLogger().info("Checking " + item.getType() + " for illegal unicode.");
try {
Files.TEST_FILE.getFile().set("Test", item);
Files.TEST_FILE.saveFile();
System.out.println("[Crazy Auctions] " + item.getType() + " has passed unicode checks.");
Bukkit.getLogger().info("" + item.getType() + " has passed unicode checks.");
} catch (YAMLException e) {
System.out.println("[Crazy Auctions] " + item.getType() + " has failed unicode checks and has been denied.");
Bukkit.getLogger().info("" + item.getType() + " has failed unicode checks and has been denied.");
return false;
}
return ((BookMeta) item.getItemMeta()).getPages().stream().mapToInt(String :: length).sum() < 2000;
Expand Down
Expand Up @@ -13,7 +13,7 @@ public class DupePatch implements Listener {
public void onPreCommand(PlayerCommandPreprocessEvent event) {
Player player = event.getPlayer();

boolean macro = FileManager.Files.CONFIG.getFile().getBoolean("Settings.Patches.Macro-Dupe");
boolean macro = FileManager.Files.CONFIG.getFile().getBoolean("Settings.Patches.Macro-Dupe", true);

if (!macro) return;

Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/config1.12.2-Down.yml
Expand Up @@ -20,7 +20,7 @@ Settings:
Selling: true #Able to use the selling part of the auction house.
Bidding: true #Able to use the bidding part of the auction house.
Patches:
Macro-Dupe: true #Turn to false if you have an issue but it should patch the bug.
Macro-Dupe: true #Turn to false if you have an issue, but it should patch the bug.
Sounds:
Toggle: False #Disable the clicking sound.
Sound: 'CLICK' #Make sure if you use 1.8 or lower you use the 1.8 sound and 1.9 and up use 1.9 sounds. The default sound is 1.8.
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/config1.13-Up.yml
Expand Up @@ -20,7 +20,7 @@ Settings:
Selling: true #Able to use the selling part of the auction house.
Bidding: true #Able to use the bidding part of the auction house.
Patches:
Macro-Dupe: true #Turn to false if you have an issue but it should patch the bug.
Macro-Dupe: true #Turn to false if you have an issue, but it should patch the bug.
Sounds:
Toggle: false #Disable the clicking sound.
Sound: 'CLICK' #Make sure if you use 1.8 or lower you use the 1.8 sound and 1.9 and up use 1.9 sounds. The default sound is 1.8.
Expand Down

0 comments on commit f40ad73

Please sign in to comment.