Skip to content
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
import com.willfp.eco.core.items.Items;
import fr.maxlego08.menu.api.annotations.AutoMaterialLoader;
import fr.maxlego08.menu.api.annotations.RequiresPlugin;
import fr.maxlego08.menu.api.configuration.Configuration;
import fr.maxlego08.menu.api.loader.MaterialLoader;
import fr.maxlego08.menu.zcore.logger.Logger;
import org.bukkit.configuration.file.YamlConfiguration;
import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack;
Expand All @@ -23,7 +25,10 @@ public ItemStack load(@NonNull Player player, @NonNull YamlConfiguration yamlCon
//eco item lookup system:
// https://plugins.auxilor.io/all-plugins/the-item-lookup-system
return Items.lookup(materialString).getItem();
} catch (Exception ignored) {
} catch (Exception exception) {
if (Configuration.enableDebug) {
Logger.info("Failed to load eco item: " + materialString + " for player: " + player.getName() + ", reason: " + exception.getMessage()+".");
}
return null;
}
}
Expand Down
4 changes: 3 additions & 1 deletion src/main/java/fr/maxlego08/menu/ZItemManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import fr.maxlego08.menu.api.mechanic.MechanicListener;
import fr.maxlego08.menu.item.CustomItemData;
import fr.maxlego08.menu.mechanics.itemjoin.ItemJoinMechanicFactory;
import fr.maxlego08.menu.mechanics.onclick.OnClickMechanicFactory;
import fr.maxlego08.menu.zcore.logger.Logger;
import org.bukkit.NamespacedKey;
import org.bukkit.configuration.ConfigurationSection;
Expand Down Expand Up @@ -50,6 +51,7 @@ public ZItemManager(ZMenuPlugin menuPlugin) {

private void loadMechanics(){
this.registerMechanicFactory(new ItemJoinMechanicFactory(this.menuPlugin));
this.registerMechanicFactory(new OnClickMechanicFactory(this.menuPlugin));
}

@Override
Expand Down Expand Up @@ -100,7 +102,7 @@ public void loadCustomItem(File file) {
factory.parse(this.menuPlugin, itemId, mechanicSection.getConfigurationSection(mechanicId), config, file, path + mechanicId + ".");
mechanicIds.add(mechanicId);
} else {
Logger.info("No MechanicFactory found for mechanicId " + mechanicId + " in item " + itemId, Logger.LogType.WARNING);
Logger.info("No MechanicFactory found for mechanicId " + mechanicId + " in item " + itemId + " from file " + file.getName() + "(available factories: " + this.mechanicFactories.keySet() + ")", Logger.LogType.WARNING);
}
}
}
Expand Down
49 changes: 49 additions & 0 deletions src/main/resources/paper-plugin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -143,5 +143,54 @@ dependencies:

Geyser-Spigot:
load: BEFORE
required: false
join-classpath: true

# -- Economy plugins
Vault:
required: false
join-classpath: true

BeastTokens:
required: false
join-classpath: true

PlayerPoints:
required: false
join-classpath: true

ElementalTokens:
required: false
join-classpath: true

ElementalGems:
required: false
join-classpath: true

zEssentials:
required: false
join-classpath: true

EcoBits:
required: false
join-classpath: true

CoinsEngine:
required: false
join-classpath: true

ExcellentEconomy:
required: false
join-classpath: true

VotingPlugin:
required: false
join-classpath: true

RedisEconomy:
required: false
join-classpath: true

RoyaleEconomy:
required: false
join-classpath: true
Loading