Custom inventory titles for 1.14
This commit is contained in:
@@ -27,6 +27,7 @@ import com.lishid.openinv.commands.SilentChestPluginCommand;
|
||||
import com.lishid.openinv.internal.IAnySilentContainer;
|
||||
import com.lishid.openinv.internal.IInventoryAccess;
|
||||
import com.lishid.openinv.internal.ISpecialEnderChest;
|
||||
import com.lishid.openinv.internal.ISpecialInventory;
|
||||
import com.lishid.openinv.internal.ISpecialPlayerInventory;
|
||||
import com.lishid.openinv.listeners.InventoryClickListener;
|
||||
import com.lishid.openinv.listeners.InventoryCloseListener;
|
||||
@@ -56,6 +57,7 @@ import org.bukkit.command.PluginCommand;
|
||||
import org.bukkit.entity.HumanEntity;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.inventory.Inventory;
|
||||
import org.bukkit.inventory.InventoryView;
|
||||
import org.bukkit.plugin.Plugin;
|
||||
import org.bukkit.plugin.PluginManager;
|
||||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
@@ -458,6 +460,11 @@ public class OpenInv extends JavaPlugin implements IOpenInv {
|
||||
return player;
|
||||
}
|
||||
|
||||
@Override
|
||||
public @Nullable InventoryView openInventory(@NotNull Player player, @NotNull ISpecialInventory inventory) {
|
||||
return this.accessor.getPlayerDataManager().openInventory(player, inventory);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean notifyAnyChest() {
|
||||
return this.getConfig().getBoolean("notify.any-chest", true);
|
||||
|
@@ -142,7 +142,7 @@ public class OpenEnderPluginCommand implements CommandExecutor {
|
||||
}
|
||||
|
||||
// Open the inventory
|
||||
player.openInventory(chest.getBukkitInventory());
|
||||
plugin.openInventory(player, chest);
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -151,7 +151,7 @@ public class OpenInvPluginCommand implements CommandExecutor {
|
||||
}
|
||||
|
||||
// Open the inventory
|
||||
player.openInventory(inv.getBukkitInventory());
|
||||
plugin.openInventory(player, inv);
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user