Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
09da9cbe66 | ||
|
|
1a2c27af99 | ||
|
|
6d9bd57654 | ||
|
|
39f469eedf | ||
|
|
059f43a18c | ||
|
|
98a7b69058 | ||
|
|
92abe0f5f0 | ||
|
|
dafd515beb | ||
|
|
fe9ce58751 | ||
|
|
648d573fcd | ||
|
|
f6ba836c98 | ||
|
|
61486763ec | ||
|
|
6a6454bbfe | ||
|
|
5e356b676d | ||
|
|
2a2a99af72 | ||
|
|
fd7b77ac43 | ||
|
|
25cdefe152 | ||
|
|
7f83d5c403 | ||
|
|
59b0da3170 | ||
|
|
15aead2b5a | ||
|
|
8f02e44191 | ||
|
|
91eb3c4bea | ||
|
|
708946de40 | ||
|
|
d8108dbedc | ||
|
|
243ab18953 | ||
|
|
b15c0fb9c5 | ||
|
|
1f0f8d9c39 | ||
|
|
72b6940b6c | ||
|
|
c9f5022ba6 | ||
|
|
fcdbc65a97 | ||
|
|
3026129bc2 | ||
|
|
af44d394f8 | ||
|
|
33a3ac1a04 | ||
|
|
e9af79d75e | ||
|
|
1547e4d1b2 | ||
|
|
9b2ade0759 | ||
|
|
ced8a03492 | ||
|
|
5a77e45910 | ||
|
|
b5f3babc4c | ||
|
|
6eea38d344 | ||
|
|
1ee460687d | ||
|
|
d412a96776 | ||
|
|
293be5887a | ||
|
|
25a83e7dc5 | ||
|
|
f963ca97c2 | ||
|
|
045738fa28 | ||
|
|
b2bd9ecf39 | ||
|
|
0becbb6089 | ||
|
|
6f7f2cb15e | ||
|
|
8d19ba1e7f | ||
|
|
cc3e0e4e69 | ||
|
|
5e3d95472a | ||
|
|
4969de68f3 | ||
|
|
0d234f151b | ||
|
|
992b3b65c1 | ||
|
|
ec06cb3cb0 | ||
|
|
ef41c1c34f | ||
|
|
943ba9a53b | ||
|
|
dc18a5ded3 |
No files matched your search
@@ -32,7 +32,7 @@ plugins/
|
||||
|
||||
📷 Screenshot
|
||||
|
||||

|
||||

|
||||
|
||||
# Step 3 - Start Your Server
|
||||
|
||||
@@ -42,7 +42,7 @@ During startup RS-Warehouse will automatically create its data folder, configura
|
||||
|
||||
📷 Screenshot
|
||||
|
||||

|
||||

|
||||
|
||||
---
|
||||
|
||||
@@ -55,10 +55,27 @@ Your plugins folder should now contain:
|
||||
```
|
||||
plugins/
|
||||
└── RS-Warehouse/
|
||||
└── db-files-templates
|
||||
├── empty_database.db
|
||||
└── populated_database.db
|
||||
├── config.yml
|
||||
└── database.db
|
||||
|
||||
|
||||
```
|
||||
|
||||
📷 Screenshot
|
||||
```
|
||||
NOTE:
|
||||
RS-Warehouse comes with 2 additional database files.
|
||||
1) empty_database.db = A totally empty database file. No categories, no items.
|
||||
the only items contained in this databse are the Uncategorized, Server
|
||||
Rules, Server Commands, and Auto-Deposit categories
|
||||
2) populated_database.db = A populated and organized database for your ease of
|
||||
use. This is the default database.
|
||||
|
||||

|
||||
If you wish to start with a completely empty database, simply delete the plugins
|
||||
database.db file, copy the empty_database.db file to the /RS-Warehouse directory
|
||||
and rename it to database.db. Be sure to enter the admin menu and reload the
|
||||
plugin or restart your server for the change to take effect.
|
||||
|
||||
```
|
||||
@@ -0,0 +1,325 @@
|
||||
# Configuration
|
||||
|
||||
RS-Warehouse includes a `config.yml` file that allows you to control how certain features of the plugin behave.
|
||||
|
||||
The configuration file is located at:
|
||||
|
||||
`plugins/RS-Warehouse/config.yml`
|
||||
|
||||
After changing a setting, reload the plugin for the changes to take effect.
|
||||
|
||||
---
|
||||
|
||||
# Display Settings
|
||||
|
||||
The `display` section controls optional information and categories that are shown to players.
|
||||
|
||||
```yaml
|
||||
display:
|
||||
```
|
||||
|
||||
## Show Discovery Information
|
||||
|
||||
```yaml
|
||||
show-discovery-information: true
|
||||
```
|
||||
|
||||
Controls whether RS-Warehouse displays information about when an item was first deposited into the Warehouse database.
|
||||
When enabled, discovery information can include information about when the item was first discovered.
|
||||
|
||||
### Options
|
||||
|
||||
```text
|
||||
true
|
||||
```
|
||||
|
||||
Discovery information will be displayed.
|
||||
|
||||
```text
|
||||
false
|
||||
```
|
||||
|
||||
Discovery information will not be displayed.
|
||||
|
||||
---
|
||||
|
||||
## Show Server Commands
|
||||
|
||||
```yaml
|
||||
show-server-commands: true
|
||||
```
|
||||
|
||||
Controls whether the **Server Commands** category is displayed.
|
||||
The Server Commands category contains a list of commands available on your server.
|
||||
|
||||
> **NOTE:** This category does not execute commands. It is only used to provide players with a list of available commands.
|
||||
|
||||
### Options
|
||||
|
||||
```text
|
||||
true
|
||||
```
|
||||
|
||||
The Server Commands category will be displayed.
|
||||
|
||||
```text
|
||||
false
|
||||
```
|
||||
|
||||
The Server Commands category will be hidden.
|
||||
|
||||
---
|
||||
|
||||
## Show Server Rules
|
||||
|
||||
```yaml
|
||||
show-server-rules: true
|
||||
```
|
||||
|
||||
Controls whether the **Server Rules** category is displayed.
|
||||
This category can be used to provide players with a list of rules for your server.
|
||||
|
||||
### Options
|
||||
|
||||
```text
|
||||
true
|
||||
```
|
||||
|
||||
The Server Rules category will be displayed.
|
||||
|
||||
```text
|
||||
false
|
||||
```
|
||||
|
||||
The Server Rules category will be hidden.
|
||||
|
||||
---
|
||||
|
||||
# Automatic Chest Processing
|
||||
|
||||
The `chest-auto-processing` section controls automatic scanning and processing of Warehouse Chests.
|
||||
|
||||
```yaml
|
||||
chest-auto-processing:
|
||||
```
|
||||
|
||||
## Enable Automatic Processing
|
||||
|
||||
```yaml
|
||||
enabled: true
|
||||
```
|
||||
|
||||
Controls whether Warehouse Chests are automatically scanned and processed.
|
||||
|
||||
### Options
|
||||
|
||||
```text
|
||||
true
|
||||
```
|
||||
|
||||
Warehouse Chests will automatically be scanned and processed.
|
||||
|
||||
```text
|
||||
false
|
||||
```
|
||||
|
||||
Automatic processing will be disabled.
|
||||
|
||||
---
|
||||
|
||||
## Processing Interval
|
||||
|
||||
```yaml
|
||||
interval-seconds: 30
|
||||
```
|
||||
|
||||
Controls how often RS-Warehouse automatically scans and processes Warehouse Chests.
|
||||
The value is measured in seconds.
|
||||
|
||||
For example:
|
||||
|
||||
```yaml
|
||||
interval-seconds: 30
|
||||
```
|
||||
|
||||
The plugin will process Warehouse Chests every 30 seconds.
|
||||
Increasing this value means chests will be processed less frequently.
|
||||
Decreasing this value means chests will be processed more frequently.
|
||||
|
||||
---
|
||||
|
||||
# Item Creation Settings
|
||||
|
||||
These settings control how RS-Warehouse handles items that do not currently exist in the Warehouse database.
|
||||
|
||||
## Allow Uncategorized Item Creation
|
||||
|
||||
```yaml
|
||||
allow-uncategorized-item-creation: true
|
||||
```
|
||||
|
||||
Controls whether new items can automatically be added to the **Uncategorized** category when they are deposited into a Warehouse Chest.
|
||||
|
||||
### Options
|
||||
|
||||
```text
|
||||
true
|
||||
```
|
||||
|
||||
Items that do not already exist in the Warehouse can be automatically added to the Uncategorized category.
|
||||
|
||||
```text
|
||||
false
|
||||
```
|
||||
|
||||
Items that do not already exist in the Warehouse will not automatically be created.
|
||||
|
||||
---
|
||||
|
||||
## Always Show Uncategorized
|
||||
|
||||
```yaml
|
||||
always-show-uncategorized: false
|
||||
```
|
||||
|
||||
Controls whether the **Uncategorized** category is always displayed in the main Warehouse Category Menu.
|
||||
|
||||
### Options
|
||||
|
||||
```text
|
||||
true
|
||||
```
|
||||
|
||||
The Uncategorized category will always be displayed.
|
||||
|
||||
```text
|
||||
false
|
||||
```
|
||||
|
||||
The Uncategorized category will only be displayed when it contains items.
|
||||
|
||||
---
|
||||
|
||||
## Allow Damaged Item Creation
|
||||
|
||||
```yaml
|
||||
allow-damaged-item-creation: true
|
||||
```
|
||||
|
||||
Controls whether damaged versions of items can automatically be added as damaged variants of their base item.
|
||||
|
||||
### Options
|
||||
|
||||
```text
|
||||
true
|
||||
```
|
||||
|
||||
Damaged items can automatically be added to the damaged variants menu of their base item.
|
||||
|
||||
```text
|
||||
false
|
||||
```
|
||||
|
||||
Damaged items will not automatically be added as damaged variants.
|
||||
|
||||
---
|
||||
|
||||
# Chest Close Processing
|
||||
|
||||
The `chest-close-processing` section controls whether Warehouse Chests are processed when a player closes them.
|
||||
|
||||
```yaml
|
||||
chest-close-processing:
|
||||
```
|
||||
|
||||
## Enable Chest Close Processing
|
||||
|
||||
```yaml
|
||||
enabled: true
|
||||
```
|
||||
|
||||
Controls whether a Warehouse Chest is immediately processed when a player closes it.
|
||||
|
||||
### Options
|
||||
|
||||
```text
|
||||
true
|
||||
```
|
||||
|
||||
The Warehouse Chest will be processed immediately when a player closes it.
|
||||
|
||||
```text
|
||||
false
|
||||
```
|
||||
|
||||
The Warehouse Chest will not be processed when it is closed.
|
||||
Items will instead be processed according to the Automatic Chest Processing settings if automatic processing is enabled.
|
||||
|
||||
---
|
||||
|
||||
# Default Configuration
|
||||
|
||||
The default `config.yml` is:
|
||||
|
||||
```yaml
|
||||
#
|
||||
# RS-Warehouse
|
||||
#
|
||||
|
||||
display:
|
||||
|
||||
# Display when item was first deposited
|
||||
# to database and what date it happened.
|
||||
show-discovery-information: true
|
||||
|
||||
# Display the Server Commands category.
|
||||
# This category is a list of commands
|
||||
# available on your server. It DOES NOT
|
||||
# execute any commands.
|
||||
show-server-commands: true
|
||||
|
||||
# Display the Server Rules category.
|
||||
# This category is a list of rules for
|
||||
# your server.
|
||||
show-server-rules: true
|
||||
|
||||
|
||||
############################################
|
||||
# Automatic-Chest scan and process settings.
|
||||
############################################
|
||||
|
||||
chest-auto-processing:
|
||||
|
||||
enabled: true
|
||||
interval-seconds: 30
|
||||
|
||||
|
||||
############################################
|
||||
# Item Creation. Whether to allow automatic
|
||||
# creation when items aren't in the database.
|
||||
############################################
|
||||
|
||||
# Allow item to be added to Uncategorized
|
||||
# if item is not currently in warehouse.
|
||||
allow-uncategorized-item-creation: true
|
||||
|
||||
# Whether or not to always show the Uncategorized category.
|
||||
# True = Uncategorized will always show.
|
||||
# False = Uncategorized will only show if it has items inside.
|
||||
always-show-uncategorized: false
|
||||
|
||||
# Allow damaged items to be added to
|
||||
# damaged variant menu of base items.
|
||||
allow-damaged-item-creation: true
|
||||
|
||||
|
||||
#######################################
|
||||
# Chest Close Processing Settings
|
||||
#######################################
|
||||
|
||||
chest-close-processing:
|
||||
|
||||
# Process warehouse chests immediately
|
||||
# when a player closes them.
|
||||
enabled: true
|
||||
```
|
||||
@@ -1,67 +0,0 @@
|
||||
# Creating a Warehouse Chest
|
||||
|
||||
This guide walks you through creating your first Warehouse Chest.
|
||||
|
||||
---
|
||||
|
||||
## Before You Begin
|
||||
|
||||
Ensure:
|
||||
|
||||
- RS-Warehouse is installed.
|
||||
- You have administrative permissions.
|
||||
- The server has been started at least once.
|
||||
|
||||
If not, complete the
|
||||
[Installation And Setup](../01%29%20Getting%20Started/A%29%20Installation%20And%20Setup.md)
|
||||
guide first.
|
||||
|
||||
---
|
||||
|
||||
## Step 1 - Convert A Chest
|
||||
|
||||
Place a normal chest anywhere in the world. Then with a stick in your hand SNEAK and strike the chest
|
||||
with the chest. This will open the *Conversion* Menu.
|
||||
|
||||
📷 Screenshot
|
||||
|
||||

|
||||
---
|
||||
|
||||
## Step 3 - Convert the Chest
|
||||
|
||||
In the *Conversion* menu pick up the *Crafting Table*. The action will be cancelled and the chest will
|
||||
be converted.
|
||||
|
||||
**NOTE:** Warehouse chests cannot be broken or damaged. To pick one up, you will need to convert
|
||||
it back into a normal chest.
|
||||
|
||||
📷 Screenshot
|
||||
|
||||

|
||||
|
||||
---
|
||||
|
||||
## Step 3A - *Main Chest Menu*
|
||||
There are 3 options in this menu. Picking up the item triggers the next action.
|
||||
1. Composter. This Will convert the chest back into a standard chest.
|
||||
2. Command Block. This will open the chest *Administration Menu*
|
||||
3. Book Shelf. This will open the *Warehouse Category Menu*.
|
||||
|
||||
|
||||
📷 Screenshot
|
||||
|
||||

|
||||
---
|
||||
|
||||
## Step 4 - Open the Warehouse
|
||||
|
||||
Click on the *Book Shelf*. to open the *Warehouse Category Menu*. If you have
|
||||
not created any categories yet you will only see 2 options in this menu. You can find
|
||||
a fully organized and populated warehouse file in the *[Extras Folder](../Blank%20Pages/Extras%20Folder.md)* of the plugin.
|
||||
1. Hopper. This is your [Auto-Deposit](../50%29%20Side%20Pages/Auto-Deposit.md) section.
|
||||
2. Chest. This is the [UnCategorized Category](../50%29%20Side%20Pages/UnCategorized%20Category.md) section.
|
||||
|
||||
📷 Screenshot
|
||||
|
||||

|
||||
@@ -0,0 +1,63 @@
|
||||
# Database Templates
|
||||
|
||||
RS-Warehouse includes a `db-files-templates` folder inside the plugin folder.
|
||||
|
||||
This folder contains two database templates:
|
||||
|
||||
- `empty_database.db`
|
||||
- `populated_database.db`
|
||||
|
||||
These files can be used to quickly replace the active Warehouse database.
|
||||
|
||||
---
|
||||
|
||||
## Populated Database
|
||||
|
||||
The `populated_database.db` file is the default database included with RS-Warehouse.
|
||||
It contains the preconfigured categories and items included with the plugin.
|
||||
This database is automatically used as the starting database when RS-Warehouse is installed for the first time.
|
||||
|
||||
---
|
||||
|
||||
## Empty Database
|
||||
|
||||
The `empty_database.db` file is a completely empty Warehouse database.
|
||||
|
||||
It contains:
|
||||
|
||||
- Zero categories
|
||||
- Zero items
|
||||
|
||||
This can be used if you want to start with a completely blank Warehouse and create your own category and item organization from scratch.
|
||||
|
||||
---
|
||||
|
||||
## Using a Database Template
|
||||
|
||||
To replace the active Warehouse database with one of the templates:
|
||||
|
||||
1. Stop the server or disable/reload the plugin.
|
||||
2. Open:
|
||||
|
||||
`plugins/RS-Warehouse/db-files-templates/`
|
||||
|
||||
3. Choose the database template you want to use:
|
||||
|
||||
- `populated_database.db`
|
||||
- `empty_database.db`
|
||||
|
||||
4. Make a copy of the selected file.
|
||||
5. Rename the copied file to:
|
||||
|
||||
`database.db`
|
||||
|
||||
6. Copy it into:
|
||||
|
||||
`plugins/RS-Warehouse/`
|
||||
|
||||
7. Overwrite the existing `database.db` file.
|
||||
8. Reload the RS-Warehouse plugin.
|
||||
|
||||
The selected database template will now become the active Warehouse database.
|
||||
|
||||
> **WARNING:** Replacing `database.db` will replace your current Warehouse categories, items, and stored database information. Make a backup of your existing `database.db` before replacing it if you may want to restore it later.
|
||||
@@ -0,0 +1,23 @@
|
||||
# Permissions
|
||||
|
||||
This page documents every permission node used by RS-Warehouse.
|
||||
|
||||
| Permission | Description | Default |
|
||||
|---------------------|---------------------------------------------------------------------------|---------|
|
||||
| `rswarehouse.admin` | Allows access to the RS-Warehouse Admin menu and administrative features. | OP |
|
||||
|
||||
## Admin Permission
|
||||
|
||||
The `rswarehouse.admin` permission is required to access the RS-Warehouse Admin menu.
|
||||
Players must also be **OP** to access the Admin menu.
|
||||
The Admin menu provides access to administrative functions such as:
|
||||
|
||||
- Creating and managing categories
|
||||
- Managing subcategories
|
||||
- Managing warehouse items
|
||||
- Creating Server Commands
|
||||
- Creating Server Rules
|
||||
- Reloading the plugin
|
||||
- Viewing warehouse statistics
|
||||
|
||||
Regular players do not need the admin permission to use the normal warehouse features.
|
||||
@@ -0,0 +1,60 @@
|
||||
# Creating Your First Category
|
||||
Categories are used to organize items in the Warehouse. Your first category can be created from the **Admin Menu**.
|
||||
|
||||
## Open the Admin Menu
|
||||
|
||||
📷 Screenshot
|
||||
|
||||

|
||||
|
||||
Open the Warehouse by sneaking and right clicking a warehouse chest with a stick and select the **Admin** option. From the Admin Menu, select:
|
||||
**Create Category**. That option is the Book shelf icon.
|
||||
|
||||
📷 Screenshot
|
||||
|
||||

|
||||
|
||||
## Enter the Internal Name
|
||||
The first step is to enter the category's internal name. This is an internal identifier that may be used for later features.
|
||||
|
||||
📷 Screenshot
|
||||
|
||||

|
||||
|
||||
The internal name is used internally by RS-Warehouse and is not normally shown to players. Enter the name you want to use and confirm it.
|
||||
|
||||
## Enter the Display Name
|
||||
Next, enter the name that players will see when viewing the category.
|
||||
|
||||
📷 Screenshot
|
||||
|
||||

|
||||
|
||||
Choose a clear name that describes the items the category will contain.
|
||||
|
||||
For example:
|
||||
- Building Blocks
|
||||
- Tools
|
||||
- Food
|
||||
- Ores
|
||||
|
||||
## Add a Description
|
||||
The category can have a description that appears in the category menu.
|
||||
|
||||
📷 Screenshot
|
||||
|
||||

|
||||
|
||||
You can add up to five lines of description text.
|
||||
|
||||
This is useful for explaining what belongs in the category.
|
||||
|
||||
## Choose the Category Icon
|
||||
Next, select the material that will be used as the category's icon.
|
||||
|
||||
📷 Screenshot
|
||||
|
||||

|
||||
|
||||
The **Select Material** menu displays available Minecraft items across multiple pages. Select the item you want to use as the category icon.
|
||||
After you click on the item you want to use as the icon, the category will be created.
|
||||
@@ -1,138 +0,0 @@
|
||||
# Depositing Items
|
||||
|
||||
RS-Warehouse provides several ways to deposit items into the Warehouse.
|
||||
|
||||
Items can be deposited using:
|
||||
|
||||
1. **Transaction Menu**
|
||||
2. **Auto-Deposit**
|
||||
3. **Warehouse Chest — Automatic Processing**
|
||||
4. **Warehouse Chest — On Chest Close**
|
||||
5. **Command — `/shop deposit`**
|
||||
|
||||
Each method ultimately adds the deposited items to the shared Warehouse inventory.
|
||||
|
||||
---
|
||||
|
||||
## 1. Deposit Through the Transaction Menu
|
||||
|
||||
Items can be deposited directly through the item's **Transaction Menu**.
|
||||
|
||||
Open the Warehouse and select the category containing the item you want to deposit.
|
||||
|
||||
Select the item to open its Transaction Menu.
|
||||
|
||||
From the Transaction Menu, click the wool to set the amount you want to deposit. Deposit amount will be displayed in the
|
||||
title. Green wool adds to the deposit amount, Red wool will subtract from it.
|
||||
|
||||
Once you have the desired amount set, click the item in the center of the wool.
|
||||
|
||||
📷 Screenshot
|
||||
|
||||
|
||||
|
||||
> **NOTE:** Variant items such as damaged, enchanted, and partially filled items have their own transaction menus and are handled separately from the primary item.
|
||||
|
||||
---
|
||||
|
||||
## 2. Auto-Deposit
|
||||
|
||||
**Auto-Deposit** allows you to automatically deposit items when you pick them up.
|
||||
|
||||
Each player has their own Auto-Deposit filter.
|
||||
|
||||
When Auto-Deposit is enabled and you pick up an item that matches one of the items in your filter, RS-Warehouse sends the item directly to the Warehouse instead of placing it into your inventory.
|
||||
|
||||
📷 Screenshot
|
||||
|
||||
### Adding Items to the Auto-Deposit Filter
|
||||
|
||||
Open the **Auto-Deposit** menu from the Warehouse.
|
||||
|
||||
Place an item into the Auto-Deposit menu to add it to your personal filter.
|
||||
|
||||
The item placed into the filter is used as a copy of the item you want to automatically deposit.
|
||||
|
||||
📷 Screenshot
|
||||
|
||||
> **NOTE:** Adding an item to the Auto-Deposit filter does not remove that item from your inventory.
|
||||
|
||||
For more information, see **[Auto-Deposit](...)**.
|
||||
|
||||
---
|
||||
|
||||
## 3. Warehouse Chest — Automatic Processing
|
||||
|
||||
A **Warehouse Chest** can automatically process its contents at regular intervals.
|
||||
|
||||
The processing interval is controlled by the server's `config.yml`.
|
||||
|
||||
The configured interval determines how often RS-Warehouse checks the Warehouse Chest for items to deposit.
|
||||
|
||||
📷 Screenshot
|
||||
|
||||
> **NOTE:** The automatic processing interval is controlled by the server configuration and may be different on your server.
|
||||
|
||||
---
|
||||
|
||||
## 4. Warehouse Chest — On Chest Close
|
||||
|
||||
A **Warehouse Chest** can also process its contents when the chest is closed.
|
||||
|
||||
When this option is enabled, RS-Warehouse processes the items in the Warehouse Chest when the player closes the chest.
|
||||
|
||||
📷 Screenshot
|
||||
|
||||
This allows items to be deposited without waiting for the next automatic processing interval.
|
||||
|
||||
> **NOTE:** Chest-close processing and automatic timed processing are separate options controlled by the server configuration.
|
||||
|
||||
---
|
||||
|
||||
## 5. Command — `/shop deposit`
|
||||
|
||||
Items can also be deposited using the **`/shop deposit`** command.
|
||||
|
||||
This command opens the **Warehouse Deposit** inventory.
|
||||
|
||||
📷 Screenshot
|
||||
|
||||
Place the items you want to deposit into the inventory.
|
||||
|
||||
When the inventory is closed, RS-Warehouse processes the items and adds them to the Warehouse.
|
||||
|
||||
📷 Screenshot
|
||||
|
||||
> **NOTE:** The `/shop deposit` command provides a convenient way to access the Warehouse Deposit inventory without navigating through the Warehouse menus.
|
||||
|
||||
---
|
||||
|
||||
## New Items
|
||||
|
||||
Items that have not yet been assigned to a category can still be deposited.
|
||||
|
||||
Depending on the server configuration, newly discovered items may be placed into the **Unassigned** category.
|
||||
|
||||
For more information, see **[The Unassigned Category](...)**.
|
||||
|
||||
---
|
||||
|
||||
## Which Method Should I Use?
|
||||
|
||||
Each deposit method is useful in different situations.
|
||||
|
||||
| Method | Best Used For |
|
||||
|---|---|
|
||||
| **Transaction Menu** | Depositing a specific item directly |
|
||||
| **Auto-Deposit** | Automatically depositing items when picked up |
|
||||
| **Warehouse Chest — Automatic Processing** | Farms and storage systems that continuously feed a Warehouse Chest |
|
||||
| **Warehouse Chest — On Chest Close** | Manually placing items into a Warehouse Chest |
|
||||
| **`/shop deposit`** | Quickly depositing items through a dedicated inventory |
|
||||
|
||||
---
|
||||
|
||||
## Finished
|
||||
|
||||
RS-Warehouse provides several ways to get items into the Warehouse.
|
||||
|
||||
Choose the method that best fits how you collect and store items on your server.
|
||||
@@ -1,103 +0,0 @@
|
||||
# Withdrawing Items
|
||||
|
||||
Items stored in the Warehouse can be withdrawn directly into your inventory.
|
||||
|
||||
The normal withdrawal process is:
|
||||
|
||||
1. Open the Warehouse.
|
||||
2. Select a category.
|
||||
3. Select the item you want.
|
||||
4. Open the item's Transaction Menu.
|
||||
5. Select **Withdraw**.
|
||||
6. Choose the amount.
|
||||
7. Confirm the withdrawal by picking up the item in the center.
|
||||
|
||||
📷 Screenshot
|
||||
|
||||
---
|
||||
|
||||
## Selecting an Item
|
||||
|
||||
Open the Warehouse and select the category containing the item you want to withdraw.
|
||||
|
||||
📷 Screenshot
|
||||
|
||||
Select the item to open its **Transaction Menu**.
|
||||
|
||||
📷 Screenshot
|
||||
|
||||
The Transaction Menu displays the item currently selected along with its available Warehouse quantity.
|
||||
|
||||
---
|
||||
|
||||
## Choosing the Withdrawal Amount
|
||||
|
||||
Select **Withdraw** to choose how many items you want to remove from the Warehouse.
|
||||
|
||||
📷 Screenshot
|
||||
|
||||
The amount selection menu allows you to adjust the amount before completing the withdrawal.
|
||||
|
||||
📷 Screenshot
|
||||
|
||||
> **NOTE:** The amount available for withdrawal is limited by the quantity stored in the Warehouse and the amount that can be placed into your inventory.
|
||||
|
||||
---
|
||||
|
||||
## Completing the Withdrawal
|
||||
|
||||
Confirm the withdrawal to receive the selected items.
|
||||
|
||||
The items are removed from the Warehouse and added to your inventory.
|
||||
|
||||
📷 Screenshot
|
||||
|
||||
The Warehouse quantity is updated after a successful withdrawal.
|
||||
|
||||
---
|
||||
|
||||
## Withdrawing Variants
|
||||
|
||||
Some items may have variants stored separately from the primary item.
|
||||
|
||||
RS-Warehouse supports transaction menus for:
|
||||
|
||||
- **Damaged Variants**
|
||||
- **Enchanted Variants**
|
||||
- **Partially Filled Variants**
|
||||
|
||||
These variants can be selected and withdrawn independently.
|
||||
|
||||
📷 Screenshot
|
||||
|
||||
> **NOTE:** A variant represents a specific version of an item and is handled separately from the primary item.
|
||||
|
||||
---
|
||||
|
||||
## Inventory Space
|
||||
|
||||
Your available inventory space affects how many items can be withdrawn at one time.
|
||||
|
||||
If your inventory cannot hold the requested amount, the available withdrawal amount is limited accordingly.
|
||||
|
||||
> **IMPORTANT:** Make sure you have enough inventory space before withdrawing large quantities.
|
||||
|
||||
---
|
||||
|
||||
## Auto-Deposit and Withdrawals
|
||||
|
||||
If an item is configured for **Auto-Deposit**, RS-Warehouse may prevent it from being withdrawn while that Auto-Deposit filter is active.
|
||||
|
||||
If this occurs, remove the item from your Auto-Deposit filter before attempting to withdraw it.
|
||||
|
||||
📷 Screenshot
|
||||
|
||||
For more information, see **[Auto-Deposit](...)**.
|
||||
|
||||
---
|
||||
|
||||
## Finished
|
||||
|
||||
You can withdraw Warehouse items whenever you need them.
|
||||
|
||||
Use the category and item menus to locate the item, select the desired amount, and complete the withdrawal.
|
||||
@@ -1,7 +1,6 @@
|
||||
# Auto-Deposit
|
||||
|
||||
**Auto-Deposit** allows each player to choose which items should automatically be sent to the Warehouse when they pick them up.
|
||||
|
||||
When a player picks up an item that has been added to their Auto-Deposit filter, the item is sent directly to the Warehouse instead of being added to their inventory.
|
||||
|
||||
> **NOTE:** Auto-Deposit is configured separately by each player. Your Auto-Deposit items do not affect other players.
|
||||
@@ -11,23 +10,19 @@ When a player picks up an item that has been added to their Auto-Deposit filter,
|
||||
## Adding an Item to Auto-Deposit
|
||||
|
||||
Open the Warehouse and access the **Auto-Deposit** menu.
|
||||
|
||||
To add an item to your Auto-Deposit filter, place the item into the Auto-Deposit menu.
|
||||
|
||||
RS-Warehouse copies the item into your Auto-Deposit filter.
|
||||
|
||||
The original item is **not removed from your inventory**.
|
||||
|
||||
📷 Screenshot
|
||||
|
||||

|
||||

|
||||
|
||||
---
|
||||
|
||||
## How Auto-Deposit Works
|
||||
|
||||
Once an item has been added to your Auto-Deposit filter, you can simply pick up that item normally.
|
||||
|
||||
When you pick up an item that matches one of your Auto-Deposit items:
|
||||
|
||||
1. RS-Warehouse detects the item pickup.
|
||||
@@ -39,9 +34,7 @@ When you pick up an item that matches one of your Auto-Deposit items:
|
||||
## Items Not in the Filter
|
||||
|
||||
Items that are not in your Auto-Deposit filter behave normally.
|
||||
|
||||
When you pick up an item that has not been added to Auto-Deposit, Minecraft adds the item to your inventory as usual.
|
||||
|
||||
This allows you to choose exactly which items should be automatically sent to the Warehouse.
|
||||
|
||||
---
|
||||
@@ -49,12 +42,11 @@ This allows you to choose exactly which items should be automatically sent to th
|
||||
## Managing Your Auto-Deposit Items
|
||||
|
||||
Your Auto-Deposit filter can be changed at any time.
|
||||
|
||||
Open the Auto-Deposit menu to view the items currently configured for automatic deposit.
|
||||
|
||||
📷 Screenshot
|
||||
|
||||

|
||||

|
||||
|
||||
Items can be removed from the filter when you no longer want them to be automatically deposited by simply picking them
|
||||
up. The item will disappear and will no longer be in the filter.
|
||||
@@ -72,7 +64,6 @@ then *Auto-Deposit* is paused. If it is **GREEN** then *Auto-Deposit* is running
|
||||
## Using Auto-Deposit with the Warehouse
|
||||
|
||||
Auto-Deposit is especially useful for items that you collect frequently.
|
||||
|
||||
For example, you may want all of the following to automatically go to the Warehouse:
|
||||
|
||||
- Cobblestone
|
||||
@@ -0,0 +1,44 @@
|
||||
# Warehouse Chest Deposits
|
||||
A Warehouse Chest can automatically process items placed inside it and deposit them into the shared Warehouse.
|
||||
RS-Warehouse supports two methods of processing items from a Warehouse Chest:
|
||||
|
||||
- **Auto-Scan**
|
||||
- **Process on Close**
|
||||
|
||||
Both methods ultimately deposit eligible items into the Warehouse.
|
||||
|
||||
---
|
||||
|
||||
## Auto-Scan
|
||||
Auto-Scan periodically checks the contents of the Warehouse Chest while the chest is open or in use.
|
||||
When Auto-Scan is enabled, RS-Warehouse checks the chest at the configured interval and processes any eligible items it finds.
|
||||
By default, Auto-Scan runs every **30 seconds**.
|
||||
|
||||
### Configuration
|
||||
Auto-Scan is controlled by the following configuration settings:
|
||||
|
||||
```yaml
|
||||
chest-auto-processing:
|
||||
enabled: true
|
||||
interval-seconds: 30
|
||||
```
|
||||
|
||||
## Chest Close Processing
|
||||
|
||||
### How It Works
|
||||
|
||||
1. Place items into the Warehouse Chest.
|
||||
2. RS-Warehouse automatically scans the chest when it is closed.
|
||||
3. Eligible items are removed from the chest.
|
||||
4. The items are deposited into the Warehouse.
|
||||
5. The chest is left with any items that could not be processed.
|
||||
|
||||
### Configuration
|
||||
Auto-Scan is controlled by the following configuration settings:
|
||||
|
||||
```yaml
|
||||
chest-close-processing:
|
||||
# Process warehouse chests immediately
|
||||
# when a player closes them.
|
||||
enabled: true
|
||||
```
|
||||
@@ -0,0 +1,44 @@
|
||||
# shop deposit
|
||||
The `/shop deposit` command opens the **Mass Deposit** menu, allowing you to deposit multiple items from your inventory into the Warehouse at once.
|
||||
This is useful when you want to quickly deposit several items without opening the Warehouse Chest.
|
||||
|
||||
---
|
||||
|
||||
## Opening the Mass Deposit Menu
|
||||
Use:
|
||||
|
||||
/shop deposit
|
||||
|
||||
The command opens the Mass Deposit screen.
|
||||
|
||||
📷 Screenshot
|
||||
|
||||

|
||||
---
|
||||
|
||||
## Adding Items
|
||||
Place the items you want to deposit into the Mass Deposit menu.
|
||||
Items can be added individually or in larger quantities.
|
||||
Once the items have been added, the menu provides the option to process the deposit.
|
||||
|
||||
📷 Screenshot
|
||||
|
||||

|
||||
---
|
||||
|
||||
|
||||
## Using `/shop deposit`
|
||||
|
||||
### 1. Open the menu
|
||||
|
||||
/shop deposit
|
||||
|
||||
### 2. Add items
|
||||
Place the items you want to deposit into the Mass Deposit menu.
|
||||
|
||||
### 3. Process the deposit
|
||||
The items will be deposited when you close the menu out..
|
||||
|
||||
### 4. Items are deposited
|
||||
Successfully processed items are added to the Warehouse.
|
||||
Any items that cannot be processed remain in the players inventory.
|
||||
@@ -0,0 +1,90 @@
|
||||
# Item Options
|
||||
The **Item Options** menu provides administrators with tools for managing individual items in the Warehouse.
|
||||
To open Item Options, **Shift-Right-Click** an item while viewing a category.
|
||||
|
||||
📷 Screenshot
|
||||
|
||||

|
||||
|
||||
The available options allow you to change how an item is displayed, organize items into categories and subcategories, control its position in the menu, and remove or duplicate item references.
|
||||
|
||||
---
|
||||
|
||||
## Edit Display Name
|
||||
Icon: Name Tag
|
||||
Change the name displayed to players for the selected item.
|
||||
|
||||
---
|
||||
|
||||
## Create SubCategory
|
||||
Icon: Crafter
|
||||
Create a new SubCategory using the selected item as the starting point. The Original item will be copied into the SubCategory when it is created.
|
||||
|
||||
---
|
||||
|
||||
## Assign Page / Slot
|
||||
Icon: Book
|
||||
Choose which page and slot the item appears in within its category.
|
||||
|
||||
---
|
||||
|
||||
## Edit Lore
|
||||
Icon: Book With Quill
|
||||
Change the description displayed underneath the SubCategory.
|
||||
|
||||
---
|
||||
|
||||
## Move to Category
|
||||
Icon: Piston
|
||||
Move the item from its current category to another category.
|
||||
|
||||
---
|
||||
|
||||
## Move to SubCategory
|
||||
Icon: Sticky Piston
|
||||
Move the item into an existing SubCategory.
|
||||
|
||||
---
|
||||
|
||||
## Delete Item
|
||||
Icon: Barrier Block
|
||||
Delete the selected item reference from the Warehouse.
|
||||
Deletion is permanent and may be restricted when the item is still being used or contains inventory.
|
||||
|
||||
---
|
||||
|
||||
## Copy to Category
|
||||
Icon: Sign
|
||||
Create an additional reference to the same Warehouse item in another category.
|
||||
|
||||
---
|
||||
|
||||
## Copy to SubCategory
|
||||
Icon: Hanging Sign
|
||||
Create an additional reference to the same Warehouse item in a SubCategory.
|
||||
|
||||
---
|
||||
|
||||
## Back
|
||||
Icon: Door
|
||||
The **Back** button returns you to the category and page where the item was selected.
|
||||
|
||||
---
|
||||
|
||||
## Item Options at a Glance
|
||||
|
||||
| Option | Purpose |
|
||||
|---|---|
|
||||
| **Edit Display Name** | Change the item's displayed name |
|
||||
| **Create SubCategory** | Create a SubCategory from the item |
|
||||
| **Assign Page / Slot** | Choose the item's page and menu position |
|
||||
| **Edit Lore** | Change the item's displayed description |
|
||||
| **Move to Category** | Move the item to another category |
|
||||
| **Move to SubCategory** | Move the item into a SubCategory |
|
||||
| **Delete Item** | Remove the item reference |
|
||||
| **Copy to Category** | Add another category reference |
|
||||
| **Copy to SubCategory** | Add another SubCategory reference |
|
||||
| **Back** | Return to the previous item list |
|
||||
|
||||
**Note:**
|
||||
Some options are unavailable for special items such as **Convert To SubCategory** and **Delete**
|
||||
@@ -1,51 +0,0 @@
|
||||
# The UnCategorized Category
|
||||
|
||||
The **UnCategorized** category is where RS-Warehouse places items that have been discovered by the warehouse but have not yet been assigned to another category.
|
||||
|
||||
This allows items to be added to the warehouse immediately without requiring an administrator to organize every item first.
|
||||
|
||||
> **NOTE:** The UnCategorized category is intended to be a temporary holding area for items that have not yet been organized.
|
||||
> This category can be enable and disabled in the plugins config.yml file. It is enabled by default.
|
||||
|
||||
---
|
||||
|
||||
## How Items Become UnCategorized
|
||||
|
||||
When an item is deposited into the warehouse, RS-Warehouse checks whether the item has been assigned to a category.
|
||||
|
||||
If the item has not been assigned to a category, it is placed in the **UnCategorized** category.
|
||||
|
||||
This means you can continue adding items to the warehouse without having to stop and organize each new item as it is discovered.
|
||||
|
||||
---
|
||||
|
||||
## Viewing UnCategorized Items
|
||||
|
||||
Open the Warehouse and select the **UnCategorized** category.
|
||||
|
||||
The category will display the items that have not yet been assigned to another category. These items can be withdrawn
|
||||
just like any other item and even deposited. They can be moved by an admin into a *Category* or *SubCategory* by any
|
||||
admin.
|
||||
|
||||
📷 Screenshot
|
||||

|
||||
|
||||
---
|
||||
|
||||
## Keeping the Warehouse Organized
|
||||
|
||||
The UnCategorized category makes it possible to build your warehouse inventory first and organize it later.
|
||||
|
||||
For example, you may discover several new items while playing:
|
||||
|
||||
1. Deposit the items into the Warehouse.
|
||||
2. The items are automatically placed in **UnCategorized** if they have not yet been categorized.
|
||||
3. Continue using the warehouse normally.
|
||||
4. When convenient, open **UnCategorized**.
|
||||
5. Move the items into their appropriate categories.
|
||||
|
||||
Once an item has been moved to its appropriate category, it will appear there instead of in Unassigned.
|
||||
|
||||
This allows the warehouse to remain usable without requiring constant administrative organization.
|
||||
|
||||
> **IMPORTANT:** Items in Unassigned are still part of the warehouse inventory. Unassigned simply means that they have not yet been organized into a specific category.
|
||||
@@ -1,82 +0,0 @@
|
||||
# Categories
|
||||
|
||||
Categories organize every item stored inside the warehouse.
|
||||
|
||||
Well-designed categories make browsing quick and intuitive.
|
||||
|
||||
---
|
||||
|
||||
## Opening Category Management
|
||||
|
||||
Open the Warehouse.
|
||||
|
||||
Open the Administration menu.
|
||||
|
||||
Select Categories.
|
||||
|
||||
📷 Screenshot
|
||||
|
||||
---
|
||||
|
||||
## Creating a Category
|
||||
|
||||
Choose **Create Category**.
|
||||
|
||||
📷 Screenshot
|
||||
|
||||
---
|
||||
|
||||
## Internal Name
|
||||
|
||||
Enter a unique internal name.
|
||||
|
||||
Example:
|
||||
|
||||
building_blocks
|
||||
|
||||
📷 Screenshot
|
||||
|
||||
---
|
||||
|
||||
## Display Name
|
||||
|
||||
Enter the player-visible name.
|
||||
|
||||
Examples:
|
||||
|
||||
- Building Blocks
|
||||
- Food
|
||||
- Farming
|
||||
- Combat
|
||||
|
||||
📷 Screenshot
|
||||
|
||||
---
|
||||
|
||||
## Icon
|
||||
|
||||
Select an icon that represents the category.
|
||||
|
||||
📷 Screenshot
|
||||
|
||||
---
|
||||
|
||||
## Description
|
||||
|
||||
Enter an optional description.
|
||||
|
||||
This is displayed in the category lore.
|
||||
|
||||
📷 Screenshot
|
||||
|
||||
---
|
||||
|
||||
## Finished
|
||||
|
||||
Repeat these steps until your warehouse is organized.
|
||||
|
||||
---
|
||||
|
||||
⬅️ Previous: [Creating a Warehouse Chest](01%20Getting%20Started/C)%20Creating%20A%20Warehouse%20Chest.md)
|
||||
|
||||
➡️ Next: [Subcategories](Subcategories.md)
|
||||
@@ -1,11 +0,0 @@
|
||||
# Commands
|
||||
|
||||
| Command | Description |
|
||||
|---------|-------------|
|
||||
| *(To be completed)* | |
|
||||
|
||||
---
|
||||
|
||||
⬅️ Previous: [Permissions](Permissions.md)
|
||||
|
||||
➡️ Next: [Configuration](Configuration.md)
|
||||
@@ -1,13 +0,0 @@
|
||||
# Configuration
|
||||
|
||||
Every configuration option is documented below.
|
||||
|
||||
| Setting | Description | Default |
|
||||
|----------|-------------|---------|
|
||||
| *(To be completed)* | | |
|
||||
|
||||
---
|
||||
|
||||
⬅️ Previous: [Commands](Commands.md)
|
||||
|
||||
➡️ Next: [FAQ](01)%20Getting%20Started/FAQ.md)
|
||||
@@ -1,37 +0,0 @@
|
||||
# Frequently Asked Questions
|
||||
|
||||
## Why is my warehouse empty?
|
||||
|
||||
Items have not yet been deposited.
|
||||
|
||||
---
|
||||
|
||||
## Can multiple players use the same warehouse?
|
||||
|
||||
Yes.
|
||||
|
||||
---
|
||||
|
||||
## Does RS-Warehouse support SQLite?
|
||||
|
||||
Yes.
|
||||
|
||||
SQLite is used by default.
|
||||
|
||||
---
|
||||
|
||||
## Can I organize items?
|
||||
|
||||
Yes.
|
||||
|
||||
Categories and subcategories provide flexible organization.
|
||||
|
||||
---
|
||||
|
||||
## Where can I request features?
|
||||
|
||||
Please use the repository's **Issues** page.
|
||||
|
||||
---
|
||||
|
||||
⬅️ Previous: [Configuration](Configuration.md)
|
||||
@@ -1,13 +0,0 @@
|
||||
# Permissions
|
||||
|
||||
This page documents every permission node used by RS-Warehouse.
|
||||
|
||||
| Permission | Description | Default |
|
||||
|------------|-------------|---------|
|
||||
| *(To be completed)* | | |
|
||||
|
||||
---
|
||||
|
||||
⬅️ Previous: [Withdrawing Items](../02)%20Depositing%20And%20Withdrawing/Withdrawing-Items.md)
|
||||
|
||||
➡️ Next: [Commands](Commands.md)
|
||||
@@ -1,76 +0,0 @@
|
||||
# Subcategories
|
||||
|
||||
Subcategories allow large categories to be broken into smaller groups.
|
||||
|
||||
Example:
|
||||
|
||||
Building Blocks
|
||||
|
||||
- Stone
|
||||
- Wood
|
||||
- Glass
|
||||
- Decorative
|
||||
|
||||
---
|
||||
|
||||
## Creating a Subcategory
|
||||
|
||||
Open Category Management.
|
||||
|
||||
Choose a category.
|
||||
|
||||
Select Subcategories.
|
||||
|
||||
📷 Screenshot
|
||||
|
||||
---
|
||||
|
||||
## Create Subcategory
|
||||
|
||||
Choose Create.
|
||||
|
||||
📷 Screenshot
|
||||
|
||||
---
|
||||
|
||||
## Internal Name
|
||||
|
||||
Enter a unique internal name.
|
||||
|
||||
📷 Screenshot
|
||||
|
||||
---
|
||||
|
||||
## Display Name
|
||||
|
||||
Enter the player-visible name.
|
||||
|
||||
📷 Screenshot
|
||||
|
||||
---
|
||||
|
||||
## Icon
|
||||
|
||||
Select an icon.
|
||||
|
||||
📷 Screenshot
|
||||
|
||||
---
|
||||
|
||||
## Description
|
||||
|
||||
(Optional)
|
||||
|
||||
📷 Screenshot
|
||||
|
||||
---
|
||||
|
||||
## Finished
|
||||
|
||||
The subcategory is now available.
|
||||
|
||||
---
|
||||
|
||||
⬅️ Previous: [Categories](Categories.md)
|
||||
|
||||
➡️ Next: [Depositing Items](../02)%20Depositing%20And%20Withdrawing/Depositing-Items.md)
|
||||
@@ -2,29 +2,17 @@
|
||||
|
||||
### Getting Started
|
||||
- Home
|
||||
- [Installagion And Setup](01%29%20Getting%20Started/A%29%20Installation%20And%20Setup.md)
|
||||
- [Creating A Warehouse Chest](01%29%20Getting%20Started/B%29%20Creating%20A%20Warehouse%20Chest.md)
|
||||
- [Installation And Setup](01%29%20Getting%20Started/A%29%20Installation%20And%20Setup.md)
|
||||
- [Configuration](01%29%20Getting%20Started/B%29%20Config%20File.md)
|
||||
- [Database File Selection](01%29%20Getting%20Started/C%29%20Database%20File%20Selection.md)
|
||||
- [Permissions](01%29%20Getting%20Started/D%29%20Permissions.md)
|
||||
|
||||
### Using the Warehouse
|
||||
### Depositing items
|
||||
- [Auto-Deposit](02%29%20Depositing%20Items/A%29%20Auto-Deposit.md)
|
||||
- [Chest-Deposit](02%29%20Depositing%20Items/B%29%20Warehouse%20Chest%20Deposit.md)
|
||||
- [Deposit Command](02%29%20Depositing%20Items/C%29%20Shop%20Deposit%20Command.md)
|
||||
|
||||
- [Auto-Deposit](50%29%20Side%20Pages/Auto-Deposit.md)
|
||||
- [UnCategorized Category](50%29%20Side%20Pages/UnCategorized%20Category.md)
|
||||
- [Depositing Items](02%29%20Depositing%20And%20Withdrawing/B%29%20Depositing%20items.md)
|
||||
- [Withdrawing Items](02%29%20Depositing%20And%20Withdrawing/B%29%20Withdrawing%20items.md)
|
||||
### Item Options
|
||||
- [Item Option Menu](03%29%20Item%20Options/A%29%20Item%20Option%20Menu.md)
|
||||
|
||||
### Organization
|
||||
|
||||
- [Categories]
|
||||
- [Subcategories]
|
||||
|
||||
### Administration
|
||||
|
||||
- [Permissions]
|
||||
- [Commands]
|
||||
- [Configuration]
|
||||
|
||||
### Reference
|
||||
|
||||
- [FAQ]
|
||||
|
||||
---
|
||||
|
After Width: | Height: | Size: 64 KiB |
|
Before Width: | Height: | Size: 4.5 KiB |
|
After Width: | Height: | Size: 27 KiB |
|
After Width: | Height: | Size: 20 KiB |
|
After Width: | Height: | Size: 46 KiB |
|
After Width: | Height: | Size: 30 KiB |
|
Before Width: | Height: | Size: 3.0 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 5.0 KiB |
|
After Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 3.5 KiB |
|
After Width: | Height: | Size: 32 KiB |
|
Before Width: | Height: | Size: 5.8 KiB |
|
Before Width: | Height: | Size: 4.1 KiB |
|
After Width: | Height: | Size: 62 KiB |
|
After Width: | Height: | Size: 50 KiB |
|
After Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 5.6 KiB |
|
After Width: | Height: | Size: 60 KiB |
|
Before Width: | Height: | Size: 34 KiB |
|
Before Width: | Height: | Size: 4.0 KiB |
@@ -8,33 +8,76 @@
|
||||
<groupId>com.rsscripting</groupId>
|
||||
<artifactId>RS-Warehouse</artifactId>
|
||||
<name>RS-Warehouse</name>
|
||||
<version>1.3.0</version>
|
||||
<version>2.0.0</version>
|
||||
|
||||
<properties>
|
||||
<maven.compiler.source>21</maven.compiler.source>
|
||||
<maven.compiler.target>21</maven.compiler.target>
|
||||
<maven.compiler.source>25</maven.compiler.source>
|
||||
<maven.compiler.target>25</maven.compiler.target>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
</properties>
|
||||
|
||||
<build>
|
||||
<resources>
|
||||
|
||||
<!-- Normal resources that need filtering -->
|
||||
<resource>
|
||||
|
||||
<directory>src/main/resources</directory>
|
||||
|
||||
<filtering>true</filtering>
|
||||
|
||||
<excludes>
|
||||
<exclude>database.db</exclude>
|
||||
|
||||
<exclude>
|
||||
database.db
|
||||
</exclude>
|
||||
|
||||
<exclude>
|
||||
db-files-templates/*.db
|
||||
</exclude>
|
||||
|
||||
</excludes>
|
||||
|
||||
</resource>
|
||||
|
||||
<!-- Main database copied as binary -->
|
||||
<resource>
|
||||
|
||||
<directory>src/main/resources</directory>
|
||||
|
||||
<filtering>false</filtering>
|
||||
|
||||
<includes>
|
||||
<include>database.db</include>
|
||||
|
||||
<include>
|
||||
database.db
|
||||
</include>
|
||||
|
||||
</includes>
|
||||
|
||||
</resource>
|
||||
|
||||
<!-- Database template files copied as binary -->
|
||||
<resource>
|
||||
|
||||
<directory>
|
||||
src/main/resources/db-files-templates
|
||||
</directory>
|
||||
|
||||
<targetPath>
|
||||
db-files-templates
|
||||
</targetPath>
|
||||
|
||||
<filtering>false</filtering>
|
||||
|
||||
<includes>
|
||||
|
||||
<include>
|
||||
*.db
|
||||
</include>
|
||||
|
||||
</includes>
|
||||
|
||||
</resource>
|
||||
|
||||
</resources>
|
||||
@@ -56,7 +99,7 @@
|
||||
<dependency>
|
||||
<groupId>io.papermc.paper</groupId>
|
||||
<artifactId>paper-api</artifactId>
|
||||
<version>1.21.6-R0.1-SNAPSHOT</version>
|
||||
<version>26.3.build.32-alpha</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package com.rsscripting.rswarehouse;
|
||||
|
||||
import com.rsscripting.rswarehouse.admin.admindao.PurgeVariantsDAO;
|
||||
import com.rsscripting.rswarehouse.dao.admin.PurgeVariantsDAO;
|
||||
import com.rsscripting.rswarehouse.chestautoprocess.ChestAutoProcessingTask;
|
||||
import com.rsscripting.rswarehouse.commands.RSPluginCommand;
|
||||
import com.rsscripting.rswarehouse.commands.RSTabCompleter;
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
package com.rsscripting.rswarehouse.admin.adminsessions;
|
||||
|
||||
public class CategoryOptionsMenuListener {
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
package com.rsscripting.rswarehouse.admin;
|
||||
package com.rsscripting.rswarehouse.adminmenu;
|
||||
|
||||
|
||||
import com.rsscripting.rswarehouse.admin.admindao.WarehouseStatisticsDAO;
|
||||
import com.rsscripting.rswarehouse.dao.admin.WarehouseStatisticsDAO;
|
||||
import com.rsscripting.rswarehouse.menuholder.RSMenuHolder;
|
||||
import com.rsscripting.rswarehouse.utils.RSMenuUtils;
|
||||
import com.rsscripting.rswarehouse.utils.VersionUtils;
|
||||
@@ -29,7 +29,7 @@ public class AdminMenu {
|
||||
new RSMenuHolder(
|
||||
"ADMIN"
|
||||
),
|
||||
54,
|
||||
18,
|
||||
Component.text(
|
||||
MENU_TITLE
|
||||
).color(
|
||||
@@ -77,7 +77,7 @@ public class AdminMenu {
|
||||
*/
|
||||
|
||||
menu.setItem(
|
||||
1,
|
||||
6,
|
||||
RSMenuUtils.createMenuItem(
|
||||
|
||||
Material.ENCHANTED_BOOK,
|
||||
@@ -94,7 +94,7 @@ public class AdminMenu {
|
||||
*/
|
||||
|
||||
menu.setItem(
|
||||
7,
|
||||
8,
|
||||
RSMenuUtils.createMenuItemWithLore(
|
||||
|
||||
Material.BOOK,
|
||||
@@ -127,7 +127,7 @@ public class AdminMenu {
|
||||
);
|
||||
|
||||
menu.setItem(
|
||||
10,
|
||||
0,
|
||||
RSMenuUtils.createMenuItemWithLore(
|
||||
Material.BOOKSHELF,
|
||||
"§aCreate Category",
|
||||
@@ -138,7 +138,7 @@ public class AdminMenu {
|
||||
);
|
||||
|
||||
menu.setItem(
|
||||
16,
|
||||
2,
|
||||
RSMenuUtils.createMenuItemWithLore(
|
||||
|
||||
Material.WRITABLE_BOOK,
|
||||
@@ -184,6 +184,27 @@ public class AdminMenu {
|
||||
)
|
||||
);
|
||||
|
||||
menu.setItem(
|
||||
12,
|
||||
RSMenuUtils.createMenuItemWithLore(
|
||||
Material.COMMAND_BLOCK,
|
||||
"§aCreate Server Command",
|
||||
List.of(
|
||||
"§7Create a server command entry."
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
menu.setItem(
|
||||
14,
|
||||
RSMenuUtils.createMenuItemWithLore(
|
||||
Material.COMMAND_BLOCK,
|
||||
"§aCreate Server Rule",
|
||||
List.of(
|
||||
"§7Create a server rule entry."
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
player.openInventory(menu);
|
||||
|
||||
@@ -1,13 +1,16 @@
|
||||
package com.rsscripting.rswarehouse.admin;
|
||||
package com.rsscripting.rswarehouse.adminmenu;
|
||||
|
||||
import com.rsscripting.rswarehouse.serverrule.ServerRuleInternalNameMenu;
|
||||
import com.rsscripting.rswarehouse.session.admin.ServerCommandCreationSessionManager;
|
||||
import com.rsscripting.rswarehouse.config.ConfigManager;
|
||||
import com.rsscripting.rswarehouse.conversion.ConvertMenuListener;
|
||||
import com.rsscripting.rswarehouse.chestconvert.ConvertMenuListener;
|
||||
import com.rsscripting.rswarehouse.category.categorycreation.CategoryNameMenu;
|
||||
import com.rsscripting.rswarehouse.menuholder.RSMenuHolder;
|
||||
import com.rsscripting.rswarehouse.constants.RSConstants;
|
||||
import com.rsscripting.rswarehouse.main.MainMenu;
|
||||
import com.rsscripting.rswarehouse.navigation.NavigationManager;
|
||||
import com.rsscripting.rswarehouse.servercommands.ServerCommandInternalNameMenu;
|
||||
import com.rsscripting.rswarehouse.session.GuiSessionManager;
|
||||
import com.rsscripting.rswarehouse.session.admin.ServerRuleCreationSessionManager;
|
||||
import org.bukkit.block.Block;
|
||||
import com.rsscripting.rswarehouse.utils.RSMessageUtils;
|
||||
import org.bukkit.entity.Player;
|
||||
@@ -110,7 +113,7 @@ public class AdminMenuListener
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
if (event.getRawSlot() == 1) {
|
||||
if (event.getRawSlot() == 6) {
|
||||
|
||||
ConfigManager.reload();
|
||||
|
||||
@@ -125,7 +128,7 @@ public class AdminMenuListener
|
||||
|
||||
}
|
||||
|
||||
if (event.getRawSlot() == 10) {
|
||||
if (event.getRawSlot() == 0) {
|
||||
|
||||
CategoryNameMenu.open(
|
||||
player
|
||||
@@ -133,6 +136,32 @@ public class AdminMenuListener
|
||||
|
||||
}
|
||||
|
||||
if (event.getRawSlot() == 12) {
|
||||
|
||||
ServerCommandCreationSessionManager.createSession(
|
||||
player.getUniqueId()
|
||||
);
|
||||
|
||||
ServerCommandInternalNameMenu.open(
|
||||
player
|
||||
);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if (event.getRawSlot() == 14) {
|
||||
|
||||
ServerRuleCreationSessionManager.createSession(
|
||||
player.getUniqueId()
|
||||
);
|
||||
|
||||
ServerRuleInternalNameMenu.open(
|
||||
player
|
||||
);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
package com.rsscripting.rswarehouse.admin.assignpageslot;
|
||||
package com.rsscripting.rswarehouse.assignpageslot;
|
||||
|
||||
import com.rsscripting.rswarehouse.admin.adminsessions.CategoryPageSlotSession;
|
||||
import com.rsscripting.rswarehouse.admin.adminsessions.CategoryPageSlotSessionManager;
|
||||
import com.rsscripting.rswarehouse.session.admin.CategoryPageSlotSession;
|
||||
import com.rsscripting.rswarehouse.session.admin.CategoryPageSlotSessionManager;
|
||||
import net.kyori.adventure.text.Component;
|
||||
import net.kyori.adventure.text.format.NamedTextColor;
|
||||
import org.bukkit.Material;
|
||||
@@ -9,7 +9,7 @@ import org.bukkit.entity.Player;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.inventory.MenuType;
|
||||
import org.bukkit.inventory.meta.ItemMeta;
|
||||
import com.rsscripting.rswarehouse.category.categorymenu.CategoryDAO;
|
||||
import com.rsscripting.rswarehouse.dao.CategoryDAO;
|
||||
import com.rsscripting.rswarehouse.model.WarehouseCategory;
|
||||
import org.bukkit.inventory.view.AnvilView;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package com.rsscripting.rswarehouse.admin.assignpageslot;
|
||||
package com.rsscripting.rswarehouse.assignpageslot;
|
||||
|
||||
import com.rsscripting.rswarehouse.admin.adminsessions.CategoryPageSlotSession;
|
||||
import com.rsscripting.rswarehouse.admin.adminsessions.CategoryPageSlotSessionManager;
|
||||
import com.rsscripting.rswarehouse.session.admin.CategoryPageSlotSession;
|
||||
import com.rsscripting.rswarehouse.session.admin.CategoryPageSlotSessionManager;
|
||||
import com.rsscripting.rswarehouse.utils.RSMessageUtils;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
@@ -1,7 +1,7 @@
|
||||
package com.rsscripting.rswarehouse.admin.assignpageslot;
|
||||
package com.rsscripting.rswarehouse.assignpageslot;
|
||||
|
||||
import com.rsscripting.rswarehouse.admin.adminsessions.CategoryPageSlotSession;
|
||||
import com.rsscripting.rswarehouse.admin.adminsessions.CategoryPageSlotSessionManager;
|
||||
import com.rsscripting.rswarehouse.session.admin.CategoryPageSlotSession;
|
||||
import com.rsscripting.rswarehouse.session.admin.CategoryPageSlotSessionManager;
|
||||
import net.kyori.adventure.text.Component;
|
||||
import net.kyori.adventure.text.format.NamedTextColor;
|
||||
import org.bukkit.Material;
|
||||
@@ -10,7 +10,7 @@ import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.inventory.MenuType;
|
||||
import org.bukkit.inventory.meta.ItemMeta;
|
||||
import org.bukkit.inventory.view.AnvilView;
|
||||
import com.rsscripting.rswarehouse.category.categorymenu.CategoryDAO;
|
||||
import com.rsscripting.rswarehouse.dao.CategoryDAO;
|
||||
import com.rsscripting.rswarehouse.model.WarehouseCategory;
|
||||
|
||||
import java.util.List;
|
||||
@@ -1,8 +1,8 @@
|
||||
package com.rsscripting.rswarehouse.admin.assignpageslot;
|
||||
package com.rsscripting.rswarehouse.assignpageslot;
|
||||
|
||||
import com.rsscripting.rswarehouse.admin.admindao.CategoryPlacementDAO;
|
||||
import com.rsscripting.rswarehouse.admin.adminsessions.CategoryPageSlotSession;
|
||||
import com.rsscripting.rswarehouse.admin.adminsessions.CategoryPageSlotSessionManager;
|
||||
import com.rsscripting.rswarehouse.dao.admin.CategoryPlacementDAO;
|
||||
import com.rsscripting.rswarehouse.session.admin.CategoryPageSlotSession;
|
||||
import com.rsscripting.rswarehouse.session.admin.CategoryPageSlotSessionManager;
|
||||
import com.rsscripting.rswarehouse.category.categorymenu.CategoryMenu;
|
||||
import com.rsscripting.rswarehouse.utils.RSMessageUtils;
|
||||
import org.bukkit.entity.Player;
|
||||
@@ -1,8 +1,8 @@
|
||||
package com.rsscripting.rswarehouse.admin.assignpageslot;
|
||||
package com.rsscripting.rswarehouse.assignpageslot;
|
||||
|
||||
import com.rsscripting.rswarehouse.admin.adminsessions.PageSlotAssignmentSession;
|
||||
import com.rsscripting.rswarehouse.admin.adminsessions.PageSlotAssignmentSessionManager;
|
||||
import com.rsscripting.rswarehouse.item.itemdao.ItemDAO;
|
||||
import com.rsscripting.rswarehouse.session.admin.PageSlotAssignmentSession;
|
||||
import com.rsscripting.rswarehouse.session.admin.PageSlotAssignmentSessionManager;
|
||||
import com.rsscripting.rswarehouse.dao.ItemDAO;
|
||||
import com.rsscripting.rswarehouse.model.WarehouseItem;
|
||||
import net.kyori.adventure.text.Component;
|
||||
import net.kyori.adventure.text.format.NamedTextColor;
|
||||
@@ -1,7 +1,7 @@
|
||||
package com.rsscripting.rswarehouse.admin.assignpageslot;
|
||||
package com.rsscripting.rswarehouse.assignpageslot;
|
||||
|
||||
import com.rsscripting.rswarehouse.admin.adminsessions.PageSlotAssignmentSession;
|
||||
import com.rsscripting.rswarehouse.admin.adminsessions.PageSlotAssignmentSessionManager;
|
||||
import com.rsscripting.rswarehouse.session.admin.PageSlotAssignmentSession;
|
||||
import com.rsscripting.rswarehouse.session.admin.PageSlotAssignmentSessionManager;
|
||||
import com.rsscripting.rswarehouse.utils.RSMessageUtils;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
@@ -1,8 +1,8 @@
|
||||
package com.rsscripting.rswarehouse.admin.assignpageslot;
|
||||
package com.rsscripting.rswarehouse.assignpageslot;
|
||||
|
||||
import com.rsscripting.rswarehouse.admin.adminsessions.PageSlotAssignmentSession;
|
||||
import com.rsscripting.rswarehouse.admin.adminsessions.PageSlotAssignmentSessionManager;
|
||||
import com.rsscripting.rswarehouse.item.itemdao.ItemDAO;
|
||||
import com.rsscripting.rswarehouse.session.admin.PageSlotAssignmentSession;
|
||||
import com.rsscripting.rswarehouse.session.admin.PageSlotAssignmentSessionManager;
|
||||
import com.rsscripting.rswarehouse.dao.ItemDAO;
|
||||
import com.rsscripting.rswarehouse.model.WarehouseItem;
|
||||
import net.kyori.adventure.text.Component;
|
||||
import net.kyori.adventure.text.format.NamedTextColor;
|
||||
@@ -1,8 +1,8 @@
|
||||
package com.rsscripting.rswarehouse.admin.assignpageslot;
|
||||
package com.rsscripting.rswarehouse.assignpageslot;
|
||||
|
||||
import com.rsscripting.rswarehouse.admin.adminsessions.PageSlotAssignmentSession;
|
||||
import com.rsscripting.rswarehouse.admin.adminsessions.PageSlotAssignmentSessionManager;
|
||||
import com.rsscripting.rswarehouse.placement.placementdao.ItemPlacementDAO;
|
||||
import com.rsscripting.rswarehouse.session.admin.PageSlotAssignmentSession;
|
||||
import com.rsscripting.rswarehouse.session.admin.PageSlotAssignmentSessionManager;
|
||||
import com.rsscripting.rswarehouse.dao.ItemPlacementDAO;
|
||||
import com.rsscripting.rswarehouse.item.ItemsMenu;
|
||||
import com.rsscripting.rswarehouse.utils.RSMessageUtils;
|
||||
import org.bukkit.entity.Player;
|
||||
@@ -1,6 +1,6 @@
|
||||
package com.rsscripting.rswarehouse.autodeposit;
|
||||
|
||||
import com.rsscripting.rswarehouse.autodeposit.autodepositdao.AutoDepositDAO;
|
||||
import com.rsscripting.rswarehouse.dao.AutoDepositDAO;
|
||||
import com.rsscripting.rswarehouse.session.GuiSession;
|
||||
import com.rsscripting.rswarehouse.session.GuiSessionManager;
|
||||
import com.rsscripting.rswarehouse.menuholder.RSMenuHolder;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package com.rsscripting.rswarehouse.autodeposit;
|
||||
|
||||
import com.rsscripting.rswarehouse.autodeposit.autodepositdao.AutoDepositDAO;
|
||||
import com.rsscripting.rswarehouse.dao.AutoDepositDAO;
|
||||
import com.rsscripting.rswarehouse.category.categorymenu.CategoryMenu;
|
||||
import com.rsscripting.rswarehouse.session.GuiSession;
|
||||
import com.rsscripting.rswarehouse.session.GuiSessionManager;
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package com.rsscripting.rswarehouse.autodeposit;
|
||||
|
||||
import com.rsscripting.rswarehouse.autodeposit.autodepositdao.AutoDepositDAO;
|
||||
import com.rsscripting.rswarehouse.inventory.inventorydao.InventoryLookupDAO;
|
||||
import com.rsscripting.rswarehouse.item.itemdao.ItemDAO;
|
||||
import com.rsscripting.rswarehouse.dao.AutoDepositDAO;
|
||||
import com.rsscripting.rswarehouse.dao.InventoryLookupDAO;
|
||||
import com.rsscripting.rswarehouse.dao.ItemDAO;
|
||||
import org.bukkit.entity.Item;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package com.rsscripting.rswarehouse.category.categorycreation;
|
||||
|
||||
import com.rsscripting.rswarehouse.category.categorymenu.CategoryDAO;
|
||||
import com.rsscripting.rswarehouse.admin.AdminMenu;
|
||||
import com.rsscripting.rswarehouse.dao.CategoryDAO;
|
||||
import com.rsscripting.rswarehouse.adminmenu.AdminMenu;
|
||||
import com.rsscripting.rswarehouse.session.GuiSession;
|
||||
import com.rsscripting.rswarehouse.session.GuiSessionManager;
|
||||
import com.rsscripting.rswarehouse.utils.RSMessageUtils;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package com.rsscripting.rswarehouse.category.categorycreation;
|
||||
|
||||
import com.rsscripting.rswarehouse.admin.admindao.CreateCategoryDAO;
|
||||
import com.rsscripting.rswarehouse.dao.admin.CreateCategoryDAO;
|
||||
import com.rsscripting.rswarehouse.category.categorymenu.CategoryMenu;
|
||||
import com.rsscripting.rswarehouse.menuholder.RSMenuHolder;
|
||||
import com.rsscripting.rswarehouse.session.GuiSession;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package com.rsscripting.rswarehouse.category.categorycreation;
|
||||
|
||||
import com.rsscripting.rswarehouse.admin.AdminMenu;
|
||||
import com.rsscripting.rswarehouse.adminmenu.AdminMenu;
|
||||
import com.rsscripting.rswarehouse.session.GuiSession;
|
||||
import com.rsscripting.rswarehouse.session.GuiSessionManager;
|
||||
import com.rsscripting.rswarehouse.utils.RSMessageUtils;
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package com.rsscripting.rswarehouse.category.categoryedit;
|
||||
|
||||
import com.rsscripting.rswarehouse.admin.admindao.UpdateCategoryDAO;
|
||||
import com.rsscripting.rswarehouse.admin.adminsessions.CategoryEditSession;
|
||||
import com.rsscripting.rswarehouse.admin.adminsessions.CategoryEditSessionManager;
|
||||
import com.rsscripting.rswarehouse.dao.admin.UpdateCategoryDAO;
|
||||
import com.rsscripting.rswarehouse.session.admin.CategoryEditSession;
|
||||
import com.rsscripting.rswarehouse.session.admin.CategoryEditSessionManager;
|
||||
import com.rsscripting.rswarehouse.category.categoryoptions.CategoryOptionsMenu;
|
||||
import com.rsscripting.rswarehouse.utils.RSMessageUtils;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package com.rsscripting.rswarehouse.category.categoryedit;
|
||||
|
||||
import com.rsscripting.rswarehouse.admin.adminsessions.CategoryEditSession;
|
||||
import com.rsscripting.rswarehouse.admin.adminsessions.CategoryEditSessionManager;
|
||||
import com.rsscripting.rswarehouse.category.categorymenu.CategoryDAO;
|
||||
import com.rsscripting.rswarehouse.session.admin.CategoryEditSession;
|
||||
import com.rsscripting.rswarehouse.session.admin.CategoryEditSessionManager;
|
||||
import com.rsscripting.rswarehouse.dao.CategoryDAO;
|
||||
import com.rsscripting.rswarehouse.model.WarehouseCategory;
|
||||
import com.rsscripting.rswarehouse.menuholder.RSMenuHolder;
|
||||
import com.rsscripting.rswarehouse.utils.RSMenuUtils;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package com.rsscripting.rswarehouse.category.categoryedit;
|
||||
|
||||
import com.rsscripting.rswarehouse.admin.adminsessions.CategoryEditSession;
|
||||
import com.rsscripting.rswarehouse.admin.adminsessions.CategoryEditSessionManager;
|
||||
import com.rsscripting.rswarehouse.session.admin.CategoryEditSession;
|
||||
import com.rsscripting.rswarehouse.session.admin.CategoryEditSessionManager;
|
||||
import com.rsscripting.rswarehouse.utils.RSMessageUtils;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package com.rsscripting.rswarehouse.category.categoryedit;
|
||||
|
||||
import com.rsscripting.rswarehouse.admin.admindao.UpdateCategoryDAO;
|
||||
import com.rsscripting.rswarehouse.admin.adminsessions.CategoryEditSession;
|
||||
import com.rsscripting.rswarehouse.admin.adminsessions.CategoryEditSessionManager;
|
||||
import com.rsscripting.rswarehouse.dao.admin.UpdateCategoryDAO;
|
||||
import com.rsscripting.rswarehouse.session.admin.CategoryEditSession;
|
||||
import com.rsscripting.rswarehouse.session.admin.CategoryEditSessionManager;
|
||||
import com.rsscripting.rswarehouse.category.categoryoptions.CategoryOptionsMenu;
|
||||
import com.rsscripting.rswarehouse.menuholder.RSMenuHolder;
|
||||
import com.rsscripting.rswarehouse.utils.RSMessageUtils;
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package com.rsscripting.rswarehouse.category.categoryedit;
|
||||
|
||||
import com.rsscripting.rswarehouse.admin.admindao.UpdateCategoryDAO;
|
||||
import com.rsscripting.rswarehouse.admin.adminsessions.CategoryEditSession;
|
||||
import com.rsscripting.rswarehouse.admin.adminsessions.CategoryEditSessionManager;
|
||||
import com.rsscripting.rswarehouse.dao.admin.UpdateCategoryDAO;
|
||||
import com.rsscripting.rswarehouse.session.admin.CategoryEditSession;
|
||||
import com.rsscripting.rswarehouse.session.admin.CategoryEditSessionManager;
|
||||
import com.rsscripting.rswarehouse.category.categoryoptions.CategoryOptionsMenu;
|
||||
import com.rsscripting.rswarehouse.menuholder.RSMenuHolder;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
package com.rsscripting.rswarehouse.category.categorymenu;
|
||||
|
||||
import com.rsscripting.rswarehouse.dao.CategoryDAO;
|
||||
import com.rsscripting.rswarehouse.config.ConfigManager;
|
||||
import com.rsscripting.rswarehouse.dao.ItemDAO;
|
||||
import com.rsscripting.rswarehouse.menuholder.RSMenuHolder;
|
||||
import com.rsscripting.rswarehouse.model.WarehouseCategory;
|
||||
import com.rsscripting.rswarehouse.constants.RSKeys;
|
||||
@@ -97,6 +100,12 @@ public class CategoryMenu {
|
||||
WarehouseCategory uncategorized =
|
||||
null;
|
||||
|
||||
WarehouseCategory serverCommands =
|
||||
null;
|
||||
|
||||
WarehouseCategory serverRules =
|
||||
null;
|
||||
|
||||
List<WarehouseCategory> displayCategories =
|
||||
new ArrayList<>();
|
||||
|
||||
@@ -104,7 +113,6 @@ public class CategoryMenu {
|
||||
WarehouseCategory category
|
||||
: categories
|
||||
) {
|
||||
|
||||
if (
|
||||
category.displayName()
|
||||
.equalsIgnoreCase(
|
||||
@@ -115,6 +123,24 @@ public class CategoryMenu {
|
||||
uncategorized =
|
||||
category;
|
||||
|
||||
}
|
||||
else if (category.id() == 1001) {
|
||||
|
||||
if (ConfigManager.isServerCommandsEnabled()) {
|
||||
|
||||
serverCommands = category;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
else if (category.id() == 1000) {
|
||||
|
||||
if (ConfigManager.isServerRulesEnabled()) {
|
||||
|
||||
serverRules = category;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -233,7 +259,7 @@ public class CategoryMenu {
|
||||
|
||||
}
|
||||
|
||||
int highestAssignedPage = 1;
|
||||
int highestAssignedPage = 0;
|
||||
|
||||
List<WarehouseCategory> unassigned =
|
||||
new ArrayList<>();
|
||||
@@ -379,7 +405,15 @@ public class CategoryMenu {
|
||||
|
||||
}
|
||||
|
||||
if (uncategorized != null) {
|
||||
if (
|
||||
uncategorized != null
|
||||
&& (
|
||||
ConfigManager.isAlwaysShowUncategorized()
|
||||
|| ItemDAO.categoryHasItems(
|
||||
uncategorized.id()
|
||||
)
|
||||
)
|
||||
) {
|
||||
|
||||
ItemStack icon =
|
||||
RSMenuUtils.createMenuItem(
|
||||
@@ -420,6 +454,102 @@ public class CategoryMenu {
|
||||
|
||||
}
|
||||
|
||||
if (serverCommands != null) {
|
||||
|
||||
ItemStack icon =
|
||||
RSMenuUtils.createMenuItemWithLore(
|
||||
Material.valueOf(
|
||||
serverCommands.material()
|
||||
),
|
||||
"§a"
|
||||
+ serverCommands.displayName(),
|
||||
serverCommands.lore() == null
|
||||
|| serverCommands.lore().isBlank()
|
||||
? List.of()
|
||||
: Arrays.asList(
|
||||
serverCommands.lore()
|
||||
.split("\n")
|
||||
)
|
||||
);
|
||||
|
||||
ItemMeta meta =
|
||||
icon.getItemMeta();
|
||||
|
||||
if (meta != null) {
|
||||
|
||||
meta.addItemFlags(
|
||||
ItemFlag.HIDE_ATTRIBUTES,
|
||||
ItemFlag.HIDE_ADDITIONAL_TOOLTIP
|
||||
);
|
||||
|
||||
meta.getPersistentDataContainer()
|
||||
.set(
|
||||
RSKeys.CATEGORY_ID,
|
||||
PersistentDataType.INTEGER,
|
||||
serverCommands.id()
|
||||
);
|
||||
|
||||
icon.setItemMeta(
|
||||
meta
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
menu.setItem(
|
||||
6,
|
||||
icon
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
if (serverRules != null) {
|
||||
|
||||
ItemStack icon =
|
||||
RSMenuUtils.createMenuItemWithLore(
|
||||
Material.valueOf(
|
||||
serverRules.material()
|
||||
),
|
||||
"§a"
|
||||
+ serverRules.displayName(),
|
||||
serverRules.lore() == null
|
||||
|| serverRules.lore().isBlank()
|
||||
? List.of()
|
||||
: Arrays.asList(
|
||||
serverRules.lore()
|
||||
.split("\n")
|
||||
)
|
||||
);
|
||||
|
||||
ItemMeta meta =
|
||||
icon.getItemMeta();
|
||||
|
||||
if (meta != null) {
|
||||
|
||||
meta.addItemFlags(
|
||||
ItemFlag.HIDE_ATTRIBUTES,
|
||||
ItemFlag.HIDE_ADDITIONAL_TOOLTIP
|
||||
);
|
||||
|
||||
meta.getPersistentDataContainer()
|
||||
.set(
|
||||
RSKeys.CATEGORY_ID,
|
||||
PersistentDataType.INTEGER,
|
||||
serverRules.id()
|
||||
);
|
||||
|
||||
icon.setItemMeta(
|
||||
meta
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
menu.setItem(
|
||||
7,
|
||||
icon
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
player.openInventory(
|
||||
menu
|
||||
);
|
||||
|
||||
@@ -3,7 +3,6 @@ package com.rsscripting.rswarehouse.category.categorymenu;
|
||||
|
||||
import com.rsscripting.rswarehouse.category.categoryoptions.CategoryOptionsMenu;
|
||||
import com.rsscripting.rswarehouse.autodeposit.AutoDepositMenu;
|
||||
import com.rsscripting.rswarehouse.item.ItemsMenu;
|
||||
import com.rsscripting.rswarehouse.navigation.NavigationManager;
|
||||
import com.rsscripting.rswarehouse.session.GuiSession;
|
||||
import com.rsscripting.rswarehouse.session.GuiSessionManager;
|
||||
@@ -126,8 +125,10 @@ public class CategoryMenuListener
|
||||
|
||||
if (
|
||||
player.isOp()
|
||||
&& event.getClick()
|
||||
== ClickType.SHIFT_RIGHT
|
||||
&& event.getClick() == ClickType.SHIFT_RIGHT
|
||||
&& categoryId != 1
|
||||
&& categoryId != 1000
|
||||
&& categoryId != 1001
|
||||
) {
|
||||
|
||||
CategoryOptionsMenu.open(
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
package com.rsscripting.rswarehouse.category.categoryoptions;
|
||||
|
||||
import com.rsscripting.rswarehouse.admin.adminsessions.CategoryEditSession;
|
||||
import com.rsscripting.rswarehouse.admin.adminsessions.CategoryEditSessionManager;
|
||||
import com.rsscripting.rswarehouse.admin.assignpageslot.CategoryPageNumberMenu;
|
||||
import com.rsscripting.rswarehouse.admin.adminsessions.CategoryPageSlotSessionManager;
|
||||
import com.rsscripting.rswarehouse.session.admin.CategoryEditSession;
|
||||
import com.rsscripting.rswarehouse.session.admin.CategoryEditSessionManager;
|
||||
import com.rsscripting.rswarehouse.assignpageslot.CategoryPageNumberMenu;
|
||||
import com.rsscripting.rswarehouse.session.admin.CategoryPageSlotSessionManager;
|
||||
import com.rsscripting.rswarehouse.category.categoryedit.CategoryEditDisplayNameMenu;
|
||||
import com.rsscripting.rswarehouse.category.categoryedit.CategoryEditLoreMenu;
|
||||
import com.rsscripting.rswarehouse.category.categoryedit.CategoryEditMaterialMenu;
|
||||
import com.rsscripting.rswarehouse.category.categorymenu.CategoryMenu;
|
||||
import com.rsscripting.rswarehouse.category.categorymenu.CategoryDAO;
|
||||
import com.rsscripting.rswarehouse.item.itemdao.ItemDAO;
|
||||
import com.rsscripting.rswarehouse.dao.CategoryDAO;
|
||||
import com.rsscripting.rswarehouse.dao.ItemDAO;
|
||||
import com.rsscripting.rswarehouse.model.WarehouseCategory;
|
||||
import net.kyori.adventure.text.Component;
|
||||
import net.kyori.adventure.text.format.NamedTextColor;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package com.rsscripting.rswarehouse.category.copytocategory;
|
||||
|
||||
import com.rsscripting.rswarehouse.category.categorymenu.CategoryDAO;
|
||||
import com.rsscripting.rswarehouse.dao.CategoryDAO;
|
||||
import com.rsscripting.rswarehouse.model.WarehouseCategory;
|
||||
import com.rsscripting.rswarehouse.constants.RSKeys;
|
||||
import com.rsscripting.rswarehouse.utils.RSMenuUtils;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package com.rsscripting.rswarehouse.category.copytocategory;
|
||||
|
||||
import com.rsscripting.rswarehouse.category.categorymenu.CategoryDAO;
|
||||
import com.rsscripting.rswarehouse.placement.placementdao.ItemPlacementDAO;
|
||||
import com.rsscripting.rswarehouse.dao.CategoryDAO;
|
||||
import com.rsscripting.rswarehouse.dao.ItemPlacementDAO;
|
||||
import com.rsscripting.rswarehouse.model.WarehouseCategory;
|
||||
import com.rsscripting.rswarehouse.constants.RSKeys;
|
||||
import com.rsscripting.rswarehouse.item.ItemsMenu;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package com.rsscripting.rswarehouse.category.movetocategory;
|
||||
|
||||
import com.rsscripting.rswarehouse.category.categorymenu.CategoryDAO;
|
||||
import com.rsscripting.rswarehouse.dao.CategoryDAO;
|
||||
import com.rsscripting.rswarehouse.utils.RSMenuUtils;
|
||||
import net.kyori.adventure.text.Component;
|
||||
import net.kyori.adventure.text.format.NamedTextColor;
|
||||
@@ -76,6 +76,13 @@ public class MoveToCategoryMenu {
|
||||
|
||||
for (WarehouseCategory category : categories) {
|
||||
|
||||
if (
|
||||
category.id() == 1000
|
||||
|| category.id() == 1001
|
||||
) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (category.displayName().equalsIgnoreCase(
|
||||
"Uncategorized"
|
||||
)) {
|
||||
@@ -83,7 +90,6 @@ public class MoveToCategoryMenu {
|
||||
uncategorized = category;
|
||||
|
||||
}
|
||||
|
||||
else {
|
||||
|
||||
displayCategories.add(
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package com.rsscripting.rswarehouse.category.movetocategory;
|
||||
|
||||
import com.rsscripting.rswarehouse.category.categorymenu.CategoryDAO;
|
||||
import com.rsscripting.rswarehouse.placement.placementdao.ItemPlacementDAO;
|
||||
import com.rsscripting.rswarehouse.dao.CategoryDAO;
|
||||
import com.rsscripting.rswarehouse.dao.ItemPlacementDAO;
|
||||
import com.rsscripting.rswarehouse.item.ItemsMenu;
|
||||
import com.rsscripting.rswarehouse.model.WarehouseCategory;
|
||||
import com.rsscripting.rswarehouse.constants.RSKeys;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package com.rsscripting.rswarehouse.chestautoprocess;
|
||||
|
||||
import com.rsscripting.rswarehouse.deposit.dao.ChestDAO;
|
||||
import com.rsscripting.rswarehouse.deposit.dao.WarehouseChestDAO;
|
||||
import com.rsscripting.rswarehouse.dao.ChestDAO;
|
||||
import com.rsscripting.rswarehouse.dao.WarehouseChestDAO;
|
||||
import org.bukkit.block.Chest;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.scheduler.BukkitRunnable;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.rsscripting.rswarehouse.conversion;
|
||||
package com.rsscripting.rswarehouse.chestconvert;
|
||||
|
||||
import com.rsscripting.rswarehouse.menuholder.RSMenuHolder;
|
||||
import com.rsscripting.rswarehouse.utils.RSMenuUtils;
|
||||
@@ -1,10 +1,9 @@
|
||||
package com.rsscripting.rswarehouse.conversion;
|
||||
package com.rsscripting.rswarehouse.chestconvert;
|
||||
|
||||
import com.rsscripting.rswarehouse.deposit.dao.ChestDAO;
|
||||
import com.rsscripting.rswarehouse.deposit.dao.WarehouseChestDAO;
|
||||
import com.rsscripting.rswarehouse.deposit.dao.VerifyIsChestDAO;
|
||||
import com.rsscripting.rswarehouse.dao.ChestDAO;
|
||||
import com.rsscripting.rswarehouse.dao.WarehouseChestDAO;
|
||||
import com.rsscripting.rswarehouse.dao.VerifyIsChestDAO;
|
||||
import com.rsscripting.rswarehouse.category.categorymenu.CategoryMenu;
|
||||
import com.rsscripting.rswarehouse.main.MainMenu;
|
||||
import com.rsscripting.rswarehouse.constants.RSConstants;
|
||||
import com.rsscripting.rswarehouse.navigation.NavigationManager;
|
||||
import com.rsscripting.rswarehouse.session.GuiSession;
|
||||
@@ -1,7 +1,6 @@
|
||||
package com.rsscripting.rswarehouse.commands;
|
||||
|
||||
import com.rsscripting.rswarehouse.config.ConfigManager;
|
||||
import com.rsscripting.rswarehouse.category.categorymenu.CategoryMenu;
|
||||
import com.rsscripting.rswarehouse.constants.RSConstants;
|
||||
import com.rsscripting.rswarehouse.navigation.NavigationManager;
|
||||
import com.rsscripting.rswarehouse.utils.VersionUtils;
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package com.rsscripting.rswarehouse.commands;
|
||||
|
||||
import com.rsscripting.rswarehouse.category.categorymenu.CategoryMenu;
|
||||
import com.rsscripting.rswarehouse.deposit.DepositInventory;
|
||||
import com.rsscripting.rswarehouse.navigation.NavigationManager;
|
||||
import org.bukkit.command.Command;
|
||||
|
||||
@@ -3,6 +3,12 @@ package com.rsscripting.rswarehouse.config;
|
||||
import com.rsscripting.rswarehouse.RSWarehouse;
|
||||
import org.bukkit.configuration.file.FileConfiguration;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.nio.file.Files;
|
||||
import java.util.logging.Level;
|
||||
import java.io.InputStream;
|
||||
|
||||
public class ConfigManager {
|
||||
|
||||
private static FileConfiguration config;
|
||||
@@ -22,6 +28,10 @@ public class ConfigManager {
|
||||
RSWarehouse.getInstance()
|
||||
.getConfig();
|
||||
|
||||
setupDefaultDatabase();
|
||||
|
||||
setupDatabaseTemplates();
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -54,43 +64,150 @@ public class ConfigManager {
|
||||
}
|
||||
|
||||
/*
|
||||
| Warehouse Chest name
|
||||
|--------------------------------------------------------------------------
|
||||
| Server Commands Enabled
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
public String getWarehouseChestName() {
|
||||
public static boolean isServerCommandsEnabled() {
|
||||
|
||||
return config.getString(
|
||||
"warehouse-chest-name",
|
||||
"Community Warehouse"
|
||||
return config.getBoolean(
|
||||
"display.show-server-commands",
|
||||
true
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
| Uncateforized enabled
|
||||
*/
|
||||
|
||||
public boolean isUncategorizedEnabled() {
|
||||
public static boolean isServerRulesEnabled() {
|
||||
|
||||
return config.getBoolean(
|
||||
"allow-uncategorized-item-creation",
|
||||
"display.show-server-rules",
|
||||
true
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
| Chest Protection Enabled
|
||||
|--------------------------------------------------------------------------
|
||||
| UnCategorized Enabled
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
public boolean isWarehouseChestProtectionEnabled() {
|
||||
public static boolean isAlwaysShowUncategorized() {
|
||||
|
||||
return config.getBoolean(
|
||||
"protect-warehouse-chests",
|
||||
true
|
||||
"always-show-uncategorized",
|
||||
false
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
private static void setupDatabaseTemplates() {
|
||||
|
||||
RSWarehouse plugin =
|
||||
RSWarehouse.getInstance();
|
||||
|
||||
File templatesFolder =
|
||||
new File(
|
||||
plugin.getDataFolder(),
|
||||
"db-files-templates"
|
||||
);
|
||||
|
||||
if (!templatesFolder.exists()) {
|
||||
|
||||
templatesFolder.mkdirs();
|
||||
|
||||
}
|
||||
|
||||
File emptyDatabase =
|
||||
new File(
|
||||
templatesFolder,
|
||||
"empty_database.db"
|
||||
);
|
||||
|
||||
if (!emptyDatabase.exists()) {
|
||||
|
||||
plugin.saveResource(
|
||||
"db-files-templates/empty_database.db",
|
||||
false
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
File populatedDatabase =
|
||||
new File(
|
||||
templatesFolder,
|
||||
"populated_database.db"
|
||||
);
|
||||
|
||||
if (!populatedDatabase.exists()) {
|
||||
|
||||
plugin.saveResource(
|
||||
"db-files-templates/populated_database.db",
|
||||
false
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private static void setupDefaultDatabase() {
|
||||
|
||||
RSWarehouse plugin =
|
||||
RSWarehouse.getInstance();
|
||||
|
||||
File databaseFile =
|
||||
new File(
|
||||
plugin.getDataFolder(),
|
||||
"database.db"
|
||||
);
|
||||
|
||||
if (databaseFile.exists()) {
|
||||
|
||||
return;
|
||||
|
||||
}
|
||||
|
||||
if (!plugin.getDataFolder().exists()) {
|
||||
|
||||
plugin.getDataFolder().mkdirs();
|
||||
|
||||
}
|
||||
|
||||
try (
|
||||
InputStream input =
|
||||
plugin.getResource(
|
||||
"db-files-templates/populated_database.db"
|
||||
)
|
||||
) {
|
||||
|
||||
if (input == null) {
|
||||
|
||||
plugin.getLogger().severe(
|
||||
"Could not find populated_database.db in plugin resources."
|
||||
);
|
||||
|
||||
return;
|
||||
|
||||
}
|
||||
|
||||
Files.copy(
|
||||
input,
|
||||
databaseFile.toPath()
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
catch (IOException exception) {
|
||||
|
||||
plugin.getLogger().log(
|
||||
Level.SEVERE,
|
||||
"Failed to create default database.",
|
||||
exception
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.rsscripting.rswarehouse.autodeposit.autodepositdao;
|
||||
package com.rsscripting.rswarehouse.dao;
|
||||
|
||||
import com.rsscripting.rswarehouse.database.DatabaseManager;
|
||||
import com.rsscripting.rswarehouse.utils.ItemStackUtils;
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.rsscripting.rswarehouse.category.categorymenu;
|
||||
package com.rsscripting.rswarehouse.dao;
|
||||
|
||||
import com.rsscripting.rswarehouse.database.DatabaseManager;
|
||||
import com.rsscripting.rswarehouse.model.WarehouseCategory;
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.rsscripting.rswarehouse.deposit.dao;
|
||||
package com.rsscripting.rswarehouse.dao;
|
||||
|
||||
import com.rsscripting.rswarehouse.RSWarehouse;
|
||||
import com.rsscripting.rswarehouse.database.DatabaseManager;
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.rsscripting.rswarehouse.variants.dao;
|
||||
package com.rsscripting.rswarehouse.dao;
|
||||
|
||||
import com.rsscripting.rswarehouse.database.DatabaseManager;
|
||||
import com.rsscripting.rswarehouse.model.DamagedVariant;
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.rsscripting.rswarehouse.discovery.discoverydao;
|
||||
package com.rsscripting.rswarehouse.dao;
|
||||
|
||||
import com.rsscripting.rswarehouse.database.DatabaseManager;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.rsscripting.rswarehouse.variants.dao;
|
||||
package com.rsscripting.rswarehouse.dao;
|
||||
|
||||
import com.rsscripting.rswarehouse.database.DatabaseManager;
|
||||
import com.rsscripting.rswarehouse.model.EnchantedVariant;
|
||||
@@ -1,6 +1,5 @@
|
||||
package com.rsscripting.rswarehouse.inventory.inventorydao;
|
||||
package com.rsscripting.rswarehouse.dao;
|
||||
|
||||
import com.rsscripting.rswarehouse.references.referencesdao.WarehouseReferenceDAO;
|
||||
import com.rsscripting.rswarehouse.database.DatabaseManager;
|
||||
import com.rsscripting.rswarehouse.utils.ItemStackUtils;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.rsscripting.rswarehouse.inventory.inventorydao;
|
||||
package com.rsscripting.rswarehouse.dao;
|
||||
|
||||
import com.rsscripting.rswarehouse.database.DatabaseManager;
|
||||
import com.rsscripting.rswarehouse.utils.ItemStackUtils;
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.rsscripting.rswarehouse.inventory;
|
||||
package com.rsscripting.rswarehouse.dao;
|
||||
|
||||
import com.rsscripting.rswarehouse.database.DatabaseManager;
|
||||
|
||||
@@ -1,11 +1,6 @@
|
||||
package com.rsscripting.rswarehouse.item.itemdao;
|
||||
package com.rsscripting.rswarehouse.dao;
|
||||
|
||||
import com.rsscripting.rswarehouse.RSWarehouse;
|
||||
import com.rsscripting.rswarehouse.discovery.discoverydao.DiscoveryDAO;
|
||||
import com.rsscripting.rswarehouse.inventory.inventorydao.InventoryCreationDAO;
|
||||
import com.rsscripting.rswarehouse.inventory.inventorydao.InventoryLookupDAO;
|
||||
import com.rsscripting.rswarehouse.inventory.InventoryQuantityDAO;
|
||||
import com.rsscripting.rswarehouse.references.referencesdao.WarehouseReferenceDAO;
|
||||
import com.rsscripting.rswarehouse.database.DatabaseManager;
|
||||
import com.rsscripting.rswarehouse.model.WarehouseItem;
|
||||
import com.rsscripting.rswarehouse.utils.ItemStackUtils;
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.rsscripting.rswarehouse.placement.placementdao;
|
||||
package com.rsscripting.rswarehouse.dao;
|
||||
|
||||
import com.rsscripting.rswarehouse.database.DatabaseManager;
|
||||
import com.rsscripting.rswarehouse.model.WarehouseItem;
|
||||
@@ -7,7 +7,7 @@ import java.sql.Connection;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.SQLException;
|
||||
|
||||
import static com.rsscripting.rswarehouse.item.itemdao.ItemDAO.getItemById;
|
||||
import static com.rsscripting.rswarehouse.dao.ItemDAO.getItemById;
|
||||
|
||||
public class ItemPlacementDAO {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.rsscripting.rswarehouse.variants.dao;
|
||||
package com.rsscripting.rswarehouse.dao;
|
||||
|
||||
import com.rsscripting.rswarehouse.database.DatabaseManager;
|
||||
import com.rsscripting.rswarehouse.model.PartiallyFilledVariant;
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.rsscripting.rswarehouse.subcategory.subcategorydao;
|
||||
package com.rsscripting.rswarehouse.dao;
|
||||
|
||||
import com.rsscripting.rswarehouse.database.DatabaseManager;
|
||||
import com.rsscripting.rswarehouse.model.WarehouseCategory;
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.rsscripting.rswarehouse.deposit.dao;
|
||||
package com.rsscripting.rswarehouse.dao;
|
||||
|
||||
import com.rsscripting.rswarehouse.RSWarehouse;
|
||||
import com.rsscripting.rswarehouse.database.DatabaseManager;
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.rsscripting.rswarehouse.deposit.dao;
|
||||
package com.rsscripting.rswarehouse.dao;
|
||||
|
||||
import com.rsscripting.rswarehouse.RSWarehouse;
|
||||
import com.rsscripting.rswarehouse.config.ConfigManager;
|
||||
@@ -18,7 +18,7 @@ import java.sql.ResultSet;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import static com.rsscripting.rswarehouse.deposit.dao.VerifyIsChestDAO.isWarehouseChest;
|
||||
import static com.rsscripting.rswarehouse.dao.VerifyIsChestDAO.isWarehouseChest;
|
||||
|
||||
public class WarehouseChestDAO {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.rsscripting.rswarehouse.references.referencesdao;
|
||||
package com.rsscripting.rswarehouse.dao;
|
||||
|
||||
import com.rsscripting.rswarehouse.database.DatabaseManager;
|
||||
import com.rsscripting.rswarehouse.model.WarehouseItem;
|
||||
@@ -11,7 +11,7 @@ import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
|
||||
import static com.rsscripting.rswarehouse.item.itemdao.ItemDAO.getItemById;
|
||||
import static com.rsscripting.rswarehouse.dao.ItemDAO.getItemById;
|
||||
|
||||
public class WarehouseReferenceDAO {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.rsscripting.rswarehouse.admin.admindao;
|
||||
package com.rsscripting.rswarehouse.dao.admin;
|
||||
|
||||
import com.rsscripting.rswarehouse.database.DatabaseManager;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.rsscripting.rswarehouse.admin.admindao;
|
||||
package com.rsscripting.rswarehouse.dao.admin;
|
||||
|
||||
import com.rsscripting.rswarehouse.database.DatabaseManager;
|
||||
|
||||
@@ -0,0 +1,257 @@
|
||||
package com.rsscripting.rswarehouse.dao.admin;
|
||||
|
||||
import com.rsscripting.rswarehouse.database.DatabaseManager;
|
||||
import com.rsscripting.rswarehouse.utils.ItemStackUtils;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
import java.sql.Connection;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.Statement;
|
||||
import java.sql.SQLException;
|
||||
|
||||
public class CreateServerCommandDAO {
|
||||
|
||||
public static int createServerCommand(
|
||||
String internalName,
|
||||
String displayName,
|
||||
String material,
|
||||
String lore
|
||||
) {
|
||||
|
||||
try (
|
||||
Connection connection =
|
||||
DatabaseManager.getConnection()
|
||||
) {
|
||||
|
||||
connection.setAutoCommit(false);
|
||||
|
||||
try {
|
||||
|
||||
/*
|
||||
* Create the Server Command category.
|
||||
*/
|
||||
|
||||
int nextDisplayOrder = 1;
|
||||
|
||||
try (
|
||||
PreparedStatement maxStatement =
|
||||
connection.prepareStatement(
|
||||
"""
|
||||
SELECT COALESCE(
|
||||
MAX(display_order),
|
||||
0
|
||||
)
|
||||
FROM warehouse_categories
|
||||
"""
|
||||
)
|
||||
) {
|
||||
|
||||
ResultSet resultSet =
|
||||
maxStatement.executeQuery();
|
||||
|
||||
if (resultSet.next()) {
|
||||
|
||||
nextDisplayOrder =
|
||||
resultSet.getInt(1) + 1;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
int commandCategoryId;
|
||||
|
||||
try (
|
||||
PreparedStatement statement =
|
||||
connection.prepareStatement(
|
||||
"""
|
||||
INSERT INTO warehouse_categories (
|
||||
parent_category_id,
|
||||
internal_name,
|
||||
display_name,
|
||||
material,
|
||||
lore,
|
||||
display_order,
|
||||
page,
|
||||
slot
|
||||
)
|
||||
VALUES (?, ?, ?, ?, ?, ?, ?, ?)
|
||||
""",
|
||||
Statement.RETURN_GENERATED_KEYS
|
||||
)
|
||||
) {
|
||||
|
||||
statement.setInt(
|
||||
1,
|
||||
1001
|
||||
);
|
||||
|
||||
statement.setString(
|
||||
2,
|
||||
internalName
|
||||
);
|
||||
|
||||
statement.setString(
|
||||
3,
|
||||
displayName
|
||||
);
|
||||
|
||||
statement.setString(
|
||||
4,
|
||||
material
|
||||
);
|
||||
|
||||
statement.setString(
|
||||
5,
|
||||
lore
|
||||
);
|
||||
|
||||
statement.setInt(
|
||||
6,
|
||||
nextDisplayOrder
|
||||
);
|
||||
|
||||
statement.setInt(
|
||||
7,
|
||||
0
|
||||
);
|
||||
|
||||
statement.setInt(
|
||||
8,
|
||||
0
|
||||
);
|
||||
|
||||
statement.executeUpdate();
|
||||
|
||||
ResultSet keys =
|
||||
statement.getGeneratedKeys();
|
||||
|
||||
if (!keys.next()) {
|
||||
|
||||
connection.rollback();
|
||||
|
||||
return -1;
|
||||
|
||||
}
|
||||
|
||||
commandCategoryId =
|
||||
keys.getInt(1);
|
||||
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Create the display-only navigation item.
|
||||
*/
|
||||
|
||||
ItemStack item =
|
||||
new ItemStack(
|
||||
Material.valueOf(
|
||||
material
|
||||
)
|
||||
);
|
||||
|
||||
String serializedItem =
|
||||
ItemStackUtils.serialize(
|
||||
item
|
||||
);
|
||||
|
||||
try (
|
||||
PreparedStatement statement =
|
||||
connection.prepareStatement(
|
||||
"""
|
||||
INSERT INTO warehouse_items (
|
||||
category_id,
|
||||
serialized_item,
|
||||
default_lore,
|
||||
inventory_id,
|
||||
subcategory_id,
|
||||
created_at,
|
||||
page,
|
||||
slot
|
||||
)
|
||||
VALUES (?, ?, ?, ?, ?, ?, ?, ?)
|
||||
"""
|
||||
)
|
||||
) {
|
||||
|
||||
statement.setInt(
|
||||
1,
|
||||
1001
|
||||
);
|
||||
|
||||
statement.setString(
|
||||
2,
|
||||
serializedItem
|
||||
);
|
||||
|
||||
statement.setString(
|
||||
3,
|
||||
null
|
||||
);
|
||||
|
||||
statement.setObject(
|
||||
4,
|
||||
null
|
||||
);
|
||||
|
||||
statement.setInt(
|
||||
5,
|
||||
commandCategoryId
|
||||
);
|
||||
|
||||
statement.setString(
|
||||
6,
|
||||
String.valueOf(
|
||||
System.currentTimeMillis()
|
||||
)
|
||||
);
|
||||
|
||||
statement.setObject(
|
||||
7,
|
||||
null
|
||||
);
|
||||
|
||||
statement.setObject(
|
||||
8,
|
||||
null
|
||||
);
|
||||
|
||||
statement.executeUpdate();
|
||||
|
||||
}
|
||||
|
||||
connection.commit();
|
||||
|
||||
return commandCategoryId;
|
||||
|
||||
}
|
||||
|
||||
catch (SQLException exception) {
|
||||
|
||||
connection.rollback();
|
||||
|
||||
exception.printStackTrace();
|
||||
|
||||
}
|
||||
|
||||
finally {
|
||||
|
||||
connection.setAutoCommit(true);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
catch (SQLException exception) {
|
||||
|
||||
exception.printStackTrace();
|
||||
|
||||
}
|
||||
|
||||
return -1;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||