GitXplorerGitXplorer
V

DItems

public
1 stars
1 forks
3 issues

Commits

List of commits on branch master.
Unverified
c5bd920c687cdd997c21512fa1645b07b61fec21

Fix /ditem removelore

VVoChiDanh committed a year ago
Verified
60bf5fd70dd9556f7ab371e02b7da1e084fa73e3

Merge pull request #15 from VoChiDanh/dependabot/maven/org.apache.maven.plugins-maven-clean-plugin-3.3.2

VVoChiDanh committed a year ago
Unverified
0d74ca8e62283aa3f1217dfe413e4334e2876863

Fix prefix

VVoChiDanh committed a year ago
Unverified
208d787d219f31cc2da3c1ed27bf67d58d6b6b57

Fix plugin can't run

VVoChiDanh committed a year ago
Verified
bc0f8dec34c424cc71258ea9ce3e50f23e54bc8c

Bump org.apache.maven.plugins:maven-clean-plugin from 3.3.1 to 3.3.2

ddependabot[bot] committed a year ago
Unverified
e2f7a9676d67800c3ce13362c1e5bc2c502070fe

Update README.md

VVoChiDanh committed a year 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"));
        }   
    }