Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

786 Mystery Dust With Full Inventory #791

Merged
merged 2 commits into from
Feb 19, 2024
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
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ issues = https://github.com/Crazy-Crew/CrazyEnchantments/issues

group = com.badbones69.crazyenchantments
description = Adds over 80 unique enchantments to your server and more!
version = 2.2.5
version = 2.2.6
apiVersion = 1.20

minecraftVersion = 1.20.4
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import com.badbones69.crazyenchantments.paper.api.CrazyManager;
import com.badbones69.crazyenchantments.paper.api.FileManager.Files;
import com.badbones69.crazyenchantments.paper.api.enums.Dust;
import com.badbones69.crazyenchantments.paper.api.enums.Messages;
import com.badbones69.crazyenchantments.paper.api.enums.pdc.DustData;
import com.badbones69.crazyenchantments.paper.api.enums.pdc.EnchantedBook;
import com.badbones69.crazyenchantments.paper.api.enums.pdc.DataKeys;
Expand Down Expand Up @@ -190,6 +191,11 @@ private boolean openAnyHandDust(Player player, PlayerInteractEvent event, boolea
} else if(data.getConfigName().equals(Dust.MYSTERY_DUST.getConfigName())) {
event.setCancelled(true);

if (methods.isInventoryFull(player)) {
player.sendMessage(Messages.INVENTORY_FULL.getMessage());
return true;
}

if (mainHand) {
player.getInventory().setItemInMainHand(this.methods.removeItem(item));
} else {
Expand Down