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

Update Multi-Core version and allow inventory pass through on item set. #1

Merged
Merged
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 build.gradle
Original file line number Diff line number Diff line change
@@ -22,7 +22,7 @@ repositories {

dependencies {
compileOnly("io.papermc.paper:paper-api:1.21.1-R0.1-SNAPSHOT")
compileOnly 'com.onarandombox.multiversecore:Multiverse-Core:4.3.1'
compileOnly 'com.onarandombox.multiversecore:multiverse-core:4.3.12'
}

def targetJavaVersion = 21
5 changes: 5 additions & 0 deletions src/main/java/com/liphium/core/inventory/CScreen.java
Original file line number Diff line number Diff line change
@@ -43,6 +43,11 @@ public void setItemNotCached(Player player, int slot, CItem item) {
customItems.put(player, items);
}

public void setItemNotCached(Player player, int slot, CItem item, Inventory inventory) {
setItemNotCached(player, slot, item);
inventory.setItem(slot, item.getStack());
}

public void init(Player player) {
}

Original file line number Diff line number Diff line change
@@ -38,8 +38,7 @@ public void init(Player player, Inventory inventory) {
public void openCategory(CClickEvent event, int id, Inventory inventory) {
final ShopCategory category = ShopCategory.values()[id];
for (int i = 0; i < category.getItems().size(); i++) {
setItemNotCached(event.getPlayer(), 19 + i, category.getItems().get(i));
inventory.setItem(19 + i, category.getItems().get(i).getStack());
setItemNotCached(event.getPlayer(), 19 + i, category.getItems().get(i), inventory);
}
}