Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 0 additions & 9 deletions .poggit.yml

This file was deleted.

22 changes: 19 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,22 @@
# EnchantedUI
A simple enchant shop ui
A simple enchant shop ui updated by HosseinYT</br>
</br></br></br></br>
<a href="https://github.com/HosseinYT-PM/EnchantedUI"><img src="logo.png" alt="Plugin Icon"/></a>

# Required:
# Depends:
• **EconomyAPI** by **onebone** updated by **mathchat900** [EconomyAPI PM5](https://github.com/mathchat900/EconomyAPI-PM5)

• EconomyAPI by onebone
# How Install ?
1. Download .phar file from [release](https://github.com/HosseinYT-PM/EnchantedUI/releases).
2. Dwonload Depend [EconomyAPI](https://github.com/mathchat900/EconomyAPI-PM5)
3. Put plugins to your server plugin folder
4. Hold the item and execute `/eshop` and select your enchant

# SoftDepends:
• **CustomEnchants** by **DaPigGuy** updated by **zsfell** [CustomEnchants PM5](https://github.com/zsfell/PiggyCustomEnchants-PM5)

# ChangeLogs:
• Update Namespaces</br>
• Update Libs</br>
• Update API Plugin Form 4.0.0 To 5.0.0</br>
• Fix Bugs And Others</br>
9 changes: 7 additions & 2 deletions plugin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,14 @@
name: EnchantedUI
main: ItsRealNise\EnchantedUI\Main
version: "1.0"
api: 4.0.0
api: 5.0.0
load: POSTWORLD
author: ItsRealNise
author: ItsRealNise updated by HosseinYT
depends: FormAPI
commands:
eshop:
description: Enchant Menu
permission: eshop.command
permissions:
eshop.command:
default: true
Expand Down
56 changes: 36 additions & 20 deletions resources/Shop.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
---
#Don't Change this
version: "1.0"

#send EnchantUI to the player when he interacts with the Enchanting-table
version: "0.5"
enchanting-table: true

#EnchantUI version 0.5
piggycustomenchants: false
Title: "§cEnchantment Shop"
Button: "§3{NAME} §a{PRICE}$"
slider-title: "§5Level"
Expand All @@ -16,18 +12,38 @@ messages:
paid-success: "§aYou bought {NAME} level {LEVEL} for {PRICE}$"
hold-item: "§cPlease hold an item that can be enchanted"
no-perm: "§cYou don't have permission to use this command"
incompatible-enchantment:

#WARNING: Use only Enchantment ID at incompatible-enchantments example [1,10,13]
incompatible-enchantment: "§cThis enchantment is incompatible with an existing enchantment on your item"

shop:
- name: "Fire Protection"
enchantment: fire_protection
price: 100
max-level: 2
incompatible-enchantments: []
- name: "Protection"
enchantment: 1
price: 100
max-level: 3
incompatible-enchantments: []
...
# Vanilla enchantments (use numeric IDs)
- name: "Protection"
enchantment: 0
price: 100
max-level: 4
incompatible-enchantments: []

- name: "Fire Protection"
enchantment: 1
price: 150
max-level: 4
incompatible-enchantments: []

- name: "Sharpness"
enchantment: 9
price: 200
max-level: 5
incompatible-enchantments: []

customenchantsshop:
# PiggyCustomEnchants (use exact enchantment names as strings)
- name: "Lightning"
enchantment: "lightning"
price: 500
max-level: 3
incompatible-enchantments: []

- name: "Poison"
enchantment: "poison"
price: 400
max-level: 2
incompatible-enchantments: []
54 changes: 0 additions & 54 deletions src/ItsRealNise/EnchantedUI/Commands/ShopCommand.php

This file was deleted.

2 changes: 1 addition & 1 deletion src/ItsRealNise/EnchantedUI/EventListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public function __construct(Main $plugin){
/**
* @param PlayerInteractEvent $ev
*/
public function onInteract(PlayerInteractEvent $ev){
public function onInteract(PlayerInteractEvent $ev): void {
if($ev->getAction() !== PlayerInteractEvent::RIGHT_CLICK_BLOCK) return;
$table = $this->plugin->shop->getNested('enchanting-table');
if($table and $ev->getBlock() instanceof EnchantingTable){
Expand Down
Loading