GitXplorerGitXplorer
V

DItems

public
1 stars
1 forks
3 issues

Commits

List of commits on branch master.
Verified
66392892b94604ee8e2888327a0cab50cd125d73

Merge pull request #5 from D-x-Z/dependabot/maven/de.tr7zw-item-nbt-api-2.11.1

VVoChiDanh committed 2 years ago
Verified
4e6c0d6955506de9c1e6ff3d399c994b750905c9

Merge pull request #6 from D-x-Z/dependabot/maven/org.apache.maven.plugins-maven-compiler-plugin-3.11.0

VVoChiDanh committed 2 years ago
Verified
79feee94f938a7743d935e9885f4da4af99d8fba

Bump maven-compiler-plugin from 3.10.1 to 3.11.0

ddependabot[bot] committed 2 years ago
Verified
dc036b38d9346b6aa273c6014423e73459f02cc3

Bump item-nbt-api from 2.10.0 to 2.11.1

ddependabot[bot] committed 2 years ago
Verified
38494859861cf0cf004d6b3d752cc50a1e07a759

Bump maven-shade-plugin from 3.3.0 to 3.4.1

ddependabot[bot] committed 2 years ago
Unverified
48707874419a35ed02e15c39bc1879bfa7bef0f7

fix maven

VVoChiDanh committed 2 years ago

README

The README file for this repository.

DItems [1.8 - 1.20.x]

Simple plugins to make item with custom stats

Commands

/ditems setname [name] - Set name
/ditems reload - Reload file
/ditems show [stats] - Show amount of stats in hand
/ditems stats [stats] [number] - Set stats of item in hand
/ditems addlore [lore] - Add lore
/ditems removelore [line] - Remove lore
/ditems setlore [line] [name] - Set lore
/ditems help - Show help
/ditems addenchant [Enchant] [Level] - Add enchant
/ditems removeenchant [Enchant] - Remove enchant
/ditems save [Key] - Save items
/ditems unbreakable [true/false] - Set item unbreakabl
/ditems custom_model_data [number] - Set Custom Model Data
/ditems load [key] [amount] - Load items from file
/ditems setflag [flag] - Add flag
/ditems removeflag [flag] - Remove flag
/ditems ability_command [action] [command] [delay] - Add ability command
/ditems remove_ability_command [action] - Remove ability command

API

NBTItems

NBTItem nbt = new NBTItem(itemstack);

Make Custom Stats (Example)

stats.yml

STATS:
  CUSTOM_STATS: "&7Stats: &a#amount#"

Code

    @EventHandler
    public void onDamage(EntityDamageByEntityEvent e) {
        Entity target = e.getEntity();
        Entity killer = e.getDamager();
        if (killer instanceof Player) {
            e.setDamage(new NBTItem(killer.getInventory().getItemInMainHand()).getDoubleStats("CUSTOM_STATS"));
        }   
    }