|
6 | 6 | <h5 align="center">Support/Help Server: https://discord.gg/G8BDgqsuyw</h5> |
7 | 7 | <h5 align="center">WIKI: https://github.com/byteful/LevelTools/wiki</h5> |
8 | 8 |
|
9 | | - |
| 9 | + |
10 | 10 |
|
11 | | -<h3 align="center">A plugin that adds a leveling system to tools, swords, and bows.</h3> |
| 11 | +<h3 align="center">A plugin that adds a leveling system to any item.</h3> |
12 | 12 |
|
13 | 13 | ## Features |
14 | 14 |
|
15 | 15 | - Supports versions 1.8 - 1.21. |
16 | | -- Supports Folia |
| 16 | +- Supports Folia. |
17 | 17 | - No dependencies. |
18 | 18 | - Super efficient, no lag. |
19 | 19 | - Simple developer API. |
| 20 | +- Profile-based configuration system. |
| 21 | +- Any item can level up with custom triggers. |
20 | 22 | - Commands & enchants on level up. |
21 | | -- Supports blacklisting for blocks and items for XP. |
| 23 | +- Supports blacklisting/whitelisting for blocks, entities, and items. |
22 | 24 | - ActionBar notifications. |
23 | 25 | - Item lore modification. |
24 | 26 |
|
25 | | -## Developer API |
| 27 | +## v2.0.0 - Profile System |
| 28 | + |
| 29 | +LevelTools v2.0 introduces a modular profile-based configuration system. Instead of hardcoded tool types, you can now configure any item to level up. |
| 30 | + |
| 31 | +### Profile Types |
| 32 | + |
| 33 | +| Profile Type | Purpose | File | |
| 34 | +|-------------|---------|------| |
| 35 | +| **Trigger Profiles** | Define how XP is gained | `trigger_profiles.yml` | |
| 36 | +| **Reward Profiles** | Define rewards per level | `reward_profiles.yml` | |
| 37 | +| **Display Profiles** | Define name, lore, action bar | `display_profiles.yml` | |
| 38 | +| **Item Profiles** | Tie everything together | `item_profiles.yml` | |
26 | 39 |
|
27 | | -### Gradle: |
| 40 | +### Trigger Types |
28 | 41 |
|
29 | | -```groovy |
30 | | -repositories { |
31 | | - maven { url 'https://jitpack.io' } |
32 | | -} |
| 42 | +- `BLOCK_BREAK` - XP when breaking blocks |
| 43 | +- `ENTITY_KILL` - XP when killing entities |
| 44 | +- `FISHING` - XP when catching items |
| 45 | +- `RIGHT_CLICK` / `LEFT_CLICK` - XP on click |
| 46 | +- `CONSUME` - XP when consuming items |
| 47 | +- `FARMING` - XP when tilling soil and breaking plants |
33 | 48 |
|
34 | | -dependencies { |
35 | | - compileOnly 'com.github.byteful:LevelTools:Tag' // Replace Tag with the version. (Ex: v1.4.0) |
36 | | -} |
37 | | -``` |
| 49 | +### Default Supported Items |
38 | 50 |
|
39 | | -### Maven: |
| 51 | +Out of the box, LevelTools supports: |
| 52 | +- Pickaxes, Axes, Shovels (block mining) |
| 53 | +- Swords, Bows, Crossbows (combat) |
| 54 | +- Fishing Rods (fishing) |
| 55 | +- Hoes (farming) |
40 | 56 |
|
41 | | -```xml |
| 57 | +Add any item by creating custom profiles. See the [Wiki](https://github.com/byteful/LevelTools/wiki) for details. |
42 | 58 |
|
43 | | -<repositories> |
44 | | - <repository> |
45 | | - <id>jitpack.io</id> |
46 | | - <url>https://jitpack.io</url> |
47 | | - </repository> |
48 | | -</repositories> |
| 59 | +### Migration from v1.x |
49 | 60 |
|
50 | | -<dependency> |
51 | | - <groupId>com.github.byteful</groupId> |
52 | | - <artifactId>LevelTools</artifactId> |
53 | | - <version>Tag</version> <!-- Replace Tag with the version. (Ex: v1.4.0) --> |
54 | | -</dependency> |
55 | | -``` |
| 61 | +Your old config will be automatically backed up to `old_config.yml` and migrated to the new profile system. |
| 62 | + |
| 63 | +## Commands |
| 64 | + |
| 65 | +| Command | Description | Permission | |
| 66 | +|---------|-------------|------------| |
| 67 | +| `/leveltools help` | Shows command help | None | |
| 68 | +| `/leveltools reload` | Reloads configuration | `leveltools.admin` | |
| 69 | +| `/leveltools reset <player>` | Reset hand item for player | `leveltools.admin` | |
| 70 | +| `/leveltools reset <player> --all` | Reset all items for player | `leveltools.admin` | |
| 71 | +| `/leveltools xp <amount>` | Set hand item XP | `leveltools.admin` | |
| 72 | +| `/leveltools level <level>` | Set hand item level | `leveltools.admin` | |
| 73 | +| `/leveltools levelup` | Increase hand item level by 1 | `leveltools.admin` | |
| 74 | +| `/leveltools debug` | Show debug information | `leveltools.admin` | |
| 75 | + |
| 76 | +## Developer API |
56 | 77 |
|
57 | | -### Example Usage: |
| 78 | +**View detailed API usage [here](https://github.com/byteful/LevelTools/wiki/Developer-API).** |
58 | 79 |
|
59 | | -```java |
60 | | -// Items |
| 80 | +## PlaceholderAPI |
61 | 81 |
|
62 | | -ItemStack hand = player.getInventory().getItemInMainHand(); |
63 | | -LevelToolsItem tool = LevelToolsUtil.createLevelToolsItem(hand); |
64 | | -tool.setLevel(69); |
65 | | -tool.setXp(420); |
66 | | -player.getInventory().setItemInMainHand(tool.getItemStack()); |
| 82 | +| Placeholder | Description | |
| 83 | +|-------------|-------------| |
| 84 | +| `%leveltools_level%` | Item level (main hand) | |
| 85 | +| `%leveltools_xp%` | Current XP (main hand) | |
| 86 | +| `%leveltools_max_xp%` | XP needed for next level | |
| 87 | +| `%leveltools_progress%` | Progress percentage | |
67 | 88 |
|
68 | | -// Events |
| 89 | +## Wiki |
69 | 90 |
|
70 | | -@EventHandler |
71 | | -public void onLevelEvent(LevelToolsLevelIncreaseEvent event) { |
72 | | - event.setNewLevel(69); |
73 | | -} |
| 91 | +Full documentation available at: https://github.com/byteful/LevelTools/wiki |
74 | 92 |
|
75 | | -@EventHandler |
76 | | -public void onXPEvent(LevelToolsXPIncreaseEvent event) { |
77 | | - event.setNewXp(420); |
78 | | -} |
79 | | -``` |
| 93 | +- [Configuration](https://github.com/byteful/LevelTools/wiki/Configuration) |
| 94 | +- [Trigger Profiles](https://github.com/byteful/LevelTools/wiki/Trigger-Profiles) |
| 95 | +- [Reward Profiles](https://github.com/byteful/LevelTools/wiki/Reward-Profiles) |
| 96 | +- [Display Profiles](https://github.com/byteful/LevelTools/wiki/Display-Profiles) |
| 97 | +- [Item Profiles](https://github.com/byteful/LevelTools/wiki/Item-Profiles) |
0 commit comments