├── DropHeads_v3.10.2.jar
├── LICENSE
├── README.md
├── configs
├── config.yml
├── entity-settings.yml
├── head-drop-rates.txt
├── head-textures.txt
├── noteblock-sounds.txt
├── spawn-cause-multipliers.txt
└── translations.yml
├── dh-localization
├── CREDITS.txt
├── assets
│ └── minecraft
│ │ └── lang
│ │ ├── en_us.json
│ │ ├── fr_fr.json
│ │ └── zh_tw.json
├── pack.mcmeta
└── pack.png
├── docs
├── allclasses-index.html
├── allpackages-index.html
├── copy.svg
├── element-list
├── help-doc.html
├── index-files
│ ├── index-1.html
│ ├── index-10.html
│ ├── index-11.html
│ ├── index-2.html
│ ├── index-3.html
│ ├── index-4.html
│ ├── index-5.html
│ ├── index-6.html
│ ├── index-7.html
│ ├── index-8.html
│ └── index-9.html
├── index.html
├── jquery-ui.overrides.css
├── legal
│ ├── COPYRIGHT
│ ├── LICENSE
│ ├── jquery.md
│ └── jqueryUI.md
├── member-search-index.js
├── module-search-index.js
├── net
│ └── evmodder
│ │ └── DropHeads
│ │ ├── DropChanceAPI.html
│ │ ├── HeadAPI.html
│ │ ├── InternalAPI.html
│ │ ├── TextureKeyLookup.html
│ │ ├── class-use
│ │ ├── DropChanceAPI.html
│ │ ├── HeadAPI.html
│ │ ├── InternalAPI.html
│ │ └── TextureKeyLookup.html
│ │ ├── events
│ │ ├── BeheadMessageEvent.html
│ │ ├── EntityBeheadEvent.html
│ │ ├── HeadRollEvent.html
│ │ ├── class-use
│ │ │ ├── BeheadMessageEvent.html
│ │ │ ├── EntityBeheadEvent.html
│ │ │ └── HeadRollEvent.html
│ │ ├── package-summary.html
│ │ ├── package-tree.html
│ │ └── package-use.html
│ │ ├── package-summary.html
│ │ ├── package-tree.html
│ │ └── package-use.html
├── overview-summary.html
├── overview-tree.html
├── package-search-index.js
├── resources
│ ├── glass.png
│ └── x.png
├── script-dir
│ ├── images
│ │ ├── ui-bg_glass_55_fbf9ee_1x400.png
│ │ ├── ui-bg_glass_65_dadada_1x400.png
│ │ ├── ui-bg_glass_75_dadada_1x400.png
│ │ ├── ui-bg_glass_75_e6e6e6_1x400.png
│ │ ├── ui-bg_glass_95_fef1ec_1x400.png
│ │ ├── ui-bg_highlight-soft_75_cccccc_1x100.png
│ │ ├── ui-icons_222222_256x240.png
│ │ ├── ui-icons_2e83ff_256x240.png
│ │ ├── ui-icons_454545_256x240.png
│ │ ├── ui-icons_888888_256x240.png
│ │ └── ui-icons_cd0a0a_256x240.png
│ ├── jquery-3.5.1.min.js
│ ├── jquery-ui.min.css
│ ├── jquery-ui.min.js
│ └── jquery-ui.structure.min.css
├── script.js
├── search.js
├── stylesheet.css
├── tag-search-index.js
└── type-search-index.js
├── extra-textures
├── colored-collar-head-textures.txt
├── grumm-colored-collar-head-textures.txt
├── grumm-head-textures.txt
├── head-textures-base64s.txt
├── misc-textures.txt
├── pre-jappa-head-textures.txt
└── sideways-shulker-head-textures.txt
├── localization-rss-pack.zip
├── plugin.yml
└── src
└── net
└── evmodder
└── DropHeads
├── DropChanceAPI.java
├── DropHeads.java
├── HeadAPI.java
├── InternalAPI.java
├── JunkUtils.java
├── LRUCache.java
├── MetricsLite.java
├── NoteblockMode.java
├── TextureKeyLookup.java
├── commands
├── CommandDropRate.java
├── CommandSpawnHead.java
└── Commanddebug_all_heads.java
├── datatypes
├── AnnounceMode.java
├── DropMode.java
├── EntitySetting.java
└── NoteblockMode.java
├── events
├── BeheadMessageEvent.java
├── EntityBeheadEvent.java
└── HeadRollEvent.java
└── listeners
├── BlockClickListener.java
├── CreativeMiddleClickListener.java
├── DeathMessagePacketIntercepter.java
├── EndermanProvokeListener.java
├── EntityDamageListener.java
├── EntityDeathListener.java
├── EntitySpawnListener.java
├── GiveCommandPreprocessListener.txt
├── ItemDropListener.java
├── LoreStoreBlockBreakListener.java
├── LoreStoreBlockPlaceListener.java
├── NoteblockPlayListener.java
└── ProjectileFireListener.java
/DropHeads_v3.10.2.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EvModder/DropHeads/3fa5648aa849f2b72be33f08769e9b6ac81fe755/DropHeads_v3.10.2.jar
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # DropHeads
2 | A light-weight, highly configurable head collecting plugin for Minecraft
3 |
4 |
5 | **Main configuration file:**
6 | [config.yml](./config.yml)
7 |
8 |
9 | **Default drop chances:**
10 | [head-drop-rates.txt](./head-drop-rates.txt)
11 |
12 |
13 | **Drop chance adjustments due to SpawnReason** (chunk_gen, breeding, spawners, etc.)**:**
14 | [spawn-cause-modifiers.txt](./spawn-cause-modifiers.txt)
15 |
16 |
17 | **Mob head textures** (from [minecraft-heads](https://minecraft-heads.com/))**:**
18 | [head-textures.txt](./head-textures.txt)
19 |
20 | **Javadocs** ([available here](https://evmodder.github.io/DropHeads/net/evmodder/DropHeads/events/package-summary.html))**:**
21 | For plugin developers interested in hooking into the DropHeads API
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/configs/entity-settings.yml:
--------------------------------------------------------------------------------
1 | # All settings in this file can be applied per-EntityType (or subtype)
2 | # Use 'default' or 'unknown' to modify a setting for all entities which
3 | # do not have it specifically overriden
4 |
5 | # How to announce beheadings, options are GLOBAL, LOCAL, DIRECT, or OFF
6 | behead-announcement:
7 | default: 'LOCAL'
8 | player: 'GLOBAL'
9 | # wither_skeleton: 'OFF'
10 |
11 | # Whether to drop heads if not killed by a player
12 | drop-for-nonplayer-kills:
13 | default: false
14 | creaking: true
15 |
16 | # Only applies for entities that must be killed by a player
17 | # Any entity damaged by a player within the threshold can drop a head
18 | drop-for-indirect-player-kills: false
19 | indirect-kill-threshold: '30s'
20 |
21 | # Whether to drop heads if killed by a projectile weapon
22 | drop-for-ranged-kills: false
23 |
24 | # Drop chances are multiplied by this number for each level of looting
25 | looting-multiplier: 1.1
26 |
27 | # This number is added to the drop chance for each level of looting
28 | looting-addition: 0.0
29 |
30 | # Require specific hand-held items in order to get head drops
31 | # If this list is empty, any weapon can be used to get heads
32 | require-weapon: []
33 |
34 | # How the head item from a beheading should be handled, options are:
35 | # EVENT - add the head to normally dropped loot,
36 | # SPAWN - spawn the head separately from the event,
37 | # SPAWN_RANDOM - same as SPAWN, but with random velocity on the item entity
38 | # PLACE - place the head on the ground if spot is available (within 3 blocks)
39 | # PLACE_BY_KILLER - same as PLACE but checks if killer has build permissions
40 | # PLACE_BY_VICTIM - same as PLACE but checks if victim has build permissions
41 | # GIVE - try to put the head directly into the killer's inventory
42 | # You can do multiple of these in a list; i.e., ['GIVE', 'SPAWN'] will try to
43 | # give a head to the killer, but will drop the item if their inventory is full
44 | head-item-drop-mode: ['EVENT', 'SPAWN_RANDOM']
45 |
46 | # Give specific hand-held items a modified chance of beheading
47 | # The number seen is a multiplier for the drop chance when using that weapon
48 | # Eg: 2 = twice as likely, 1.5 = 50% more likely, 0.1 = 10% as likely
49 | weapon-multipliers:
50 | default:
51 | AIR: 2
52 | SHEARS: 2
53 | GOLDEN_AXE: 2
54 | NETHERITE_AXE: 1.6
55 | DIAMOND_AXE: 1.5
56 | IRON_AXE: 1.4
57 | STONE_AXE: 1.3
58 | WOODEN_AXE: 1.2
59 | DIAMOND_SWORD: 1.2
60 | IRON_SWORD: 1.1
61 |
62 | # Modify behead chance based on how long a mob has been alive
63 | # Format is `X: V`, where if the mob has been alive for X or more time, then
64 | # the drop rate is multiplied by V (similar to weapon-multipliers)
65 | # Default unit is ticks, other units: s[ec], m[in], h[r], d[ay], w[eek], y[r]
66 | time-alive-multipliers:
67 | # Example: this will prevent player beheads if they have been alive < 1min
68 | player:
69 | 0s: 0.0
70 | 1m: 1.0
71 | # Example: for all other mobs, this will make heads more common as they age
72 | default:
73 | 3h: 1.1
74 | 2d: 2.0
75 | 1w: 3.0
76 | 30w6d11h55m33s: 10.0
77 |
78 |
79 | # Modify drop chance with custom permissions
80 | # Any player(s) with these permission will have the modified droprate
81 | permission-multipliers:
82 | default: ~
83 | # player:
84 | # dropheads.unlucky_pvper: 0.1
85 | # 'sheep|pink':
86 | # dropheads.double_pink_sheep_dropchance: 2.0
87 |
88 |
--------------------------------------------------------------------------------
/configs/head-drop-rates.txt:
--------------------------------------------------------------------------------
1 | # Droprates are from [0, 1]
2 | # So for example, 0.5 means "50% chance"
3 | # and similarly 0.06 would be a 6% chance
4 |
5 | PLAYER: 0.250
6 | UNKNOWN: 0.000 // the default chance
7 | ALLAY: 0.006
8 | ARMADILLO: 0.009
9 | AXOLOTL: 0.007
10 | BAT: 0.010
11 | BEE: 0.006
12 | BOGGED: 0.005
13 | BREEZE: 0.030
14 | BLAZE: 0.005
15 | CAMEL: 0.006
16 | CAT: 0.004
17 | CAVE_SPIDER: 0.001
18 | CHICKEN: 0.001
19 | COD: 0.002
20 | COW: 0.004
21 | CREAKING: 0.005
22 | CREEPER: 0.006
23 | DOLPHIN: 0.005
24 | DONKEY: 0.007
25 | DROWNED: 0.003
26 | ELDER_GUARDIAN: 0.050
27 | ENDERMAN: 0.004
28 | ENDER_DRAGON: 0.050
29 | ENDERMITE: 0.011
30 | EVOKER: 0.005
31 | FOX: 0.005
32 | FROG: 0.006
33 | GHAST: 0.007
34 | GIANT: 0.050
35 | GLOW_SQUID: 0.004
36 | GOAT: 0.004
37 | GUARDIAN: 0.004
38 | HOGLIN: 0.004
39 | HORSE: 0.006
40 | HUSK: 0.005
41 | ILLUSIONER: 0.050
42 | IRON_GOLEM: 0.007
43 | LLAMA: 0.007
44 | MAGMA_CUBE: 0.007
45 | MOOSHROOM: 0.004
46 | MULE: 0.008
47 | OCELOT: 0.007
48 | PANDA: 0.004
49 | PARROT: 0.008
50 | PHANTOM: 0.006
51 | PIG: 0.004
52 | PIG_ZOMBIE: 0.002
53 | PIGLIN: 0.004
54 | PIGLIN_BRUTE: 0.009
55 | PILLAGER: 0.005
56 | POLAR_BEAR: 0.008
57 | PUFFERFISH: 0.004
58 | RABBIT: 0.003
59 | RAVAGER: 0.006
60 | SALMON: 0.004
61 | SHEEP: 0.005
62 | SHULKER: 0.015
63 | SHULKER|RED: 0.014
64 | SILVERFISH: 0.005
65 | SKELETON: 0.003
66 | SKELETON_HORSE: 0.009
67 | SLIME: 0.004
68 | SNIFFER: 0.009
69 | SNOW_GOLEM: 0.008
70 | SPIDER: 0.004
71 | SQUID: 0.005
72 | STRAY: 0.004
73 | STRIDER: 0.003
74 | TADPOLE: 0.004
75 | TRADER_LLAMA: 0.007
76 | TROPICAL_FISH: 0.004
77 | TURTLE: 0.003
78 | VEX: 0.006
79 | VILLAGER: 0.029
80 | VINDICATOR: 0.003
81 | WANDERING_TRADER: 0.009
82 | WARDEN: 0.009
83 | WITCH: 0.004
84 | WITHER: 0.030
85 | WITHER_SKELETON: 0.025
86 | WOLF: 0.007
87 | ZOGLIN: 0.006
88 | ZOMBIE: 0.004
89 | ZOMBIE_HORSE: 0.070
90 | ZOMBIE_VILLAGER: 0.019
91 | ZOMBIFIED_PIGLIN: 0.002
92 |
93 | # Hanging Entities
94 | ARMOR_STAND: 0
95 | LEASH_KNOT: 0
96 | PAINTING: 0
97 | ITEM_FRAME: 0
98 | GLOW_ITEM_FRAME: 0
99 |
100 | # Vehicles
101 | MINECART: 0
102 | CHEST_MINECART: 0
103 | COMMAND_BLOCK_MINECART: 0
104 | FURNACE_MINECART: 0
105 | HOPPER_MINECART: 0
106 | SPAWNER_MINECART: 0
107 | TNT_MINECART: 0
108 | BOAT: 0
109 | CHEST_BOAT: 0
110 |
111 | # You can add custom mobs to this list, but it will only work if an EntityType is defined
--------------------------------------------------------------------------------
/configs/noteblock-sounds.txt:
--------------------------------------------------------------------------------
1 | # This file lets you define the noteblock sounds for different mob heads
2 | #
3 | # Default sound will be "ENTITY_{entity-type}_AMBIENT",
4 | # unless overridden below
5 |
6 | UNKNOWN: AMBIENT_CAVE
7 |
8 | ALLAY: ENTITY_ALLAY_AMBIENT_WITHOUT_ITEM
9 | ARMOR_STAND: ENTITY_ARMOR_STAND_PLACE
10 | AXOLOTL: ENTITY_AXOLOTL_IDLE_AIR
11 | BEE: ENTITY_BEE_LOOP
12 | BEE|ANGRY: ENTITY_BEE_LOOP_AGGRESSIVE
13 | BEE|POLLINATED|ANGRY: ENTITY_BEE_LOOP_AGGRESSIVE
14 | BEE|ANGRY|STUNG: ENTITY_BEE_LOOP_AGGRESSIVE
15 | BEE|POLLINATED|ANGRY|STUNG: ENTITY_BEE_LOOP_AGGRESSIVE
16 | BOAT: ENTITY_BOAT_PADDLE_WATER
17 | CAVE_SPIDER: ENTITY_SPIDER_AMBIENT
18 | CHEST_BOAT: ENTITY_BOAT_PADDLE_WATER
19 | COD: ENTITY_COD_FLOP
20 | CREEPER: ENTITY_CREEPER_PRIMED
21 | GHAST|SCREAMING: ENTITY_GHAST_WARN
22 | GIANT: ENTITY_ZOMBIE_AMBIENT
23 | GOAT|SCREAMING: ENTITY_GOAT_SCREAMING_AMBIENT
24 | IRON_GOLEM: ENTITY_IRON_GOLEM_HURT
25 | LEASH_HITCH: ENTITY_LEASH_KNOT_PLACE
26 | MAGMA_CUBE: ENTITY_MAGMA_CUBE_HURT
27 | MINECART: ENTITY_MINECART_RIDING
28 | MINECART_CHEST: ENTITY_MINECART_RIDING
29 | MINECART_COMMAND: ENTITY_MINECART_RIDING
30 | MINECART_FURNACE: ENTITY_MINECART_RIDING
31 | MINECART_HOPPER: ENTITY_MINECART_RIDING
32 | MINECART_MOB_SPAWNER: ENTITY_MINECART_RIDING
33 | MINECART_TNT: ENTITY_MINECART_RIDING
34 | MUSHROOM_COW: ENTITY_COW_AMBIENT
35 | PANDA|AGGRESSIVE: ENTITY_PANDA_AGGRESSIVE_AMBIENT
36 | PANDA|WEAK: ENTITY_PANDA_SNEEZE
37 | PANDA|WORRIED: ENTITY_PANDA_WORRIED_AMBIENT
38 | PUFFERFISH: ENTITY_PUFFER_FISH_BLOW_UP
39 | SALMON: ENTITY_SALMON_FLOP
40 | SLIME: ENTITY_SLIME_HURT
41 | SNIFFER: ENTITY_SNIFFER_IDLE
42 | SNOWMAN: ENTITY_SNOW_GOLEM_AMBIENT
43 | TADPOLE: ENTITY_TADPOLE_FLOP
44 | TRADER_LLAMA: ENTITY_LLAMA_AMBIENT
45 | TROPICAL_FISH: ENTITY_TROPICAL_FISH_FLOP
46 | TURTLE: ENTITY_TURTLE_AMBIENT_LAND
47 | VEX|CHARGING: ENTITY_VEX_CHARGE
48 | WOLF|ANGRY: ENTITY_WOLF_GROWL
--------------------------------------------------------------------------------
/configs/spawn-cause-multipliers.txt:
--------------------------------------------------------------------------------
1 | # Drop-chance modifiers based on how an entity was spawned
2 | # If the value is 0, heads of mobs spawned this way will never drop.
3 | # If the value is 1, heads will drop at the same chance as normal
4 | # The new drop-chance is [modifier] * [the old drop-chance]
5 |
6 | BEEHIVE: 1 # When a bee is released from a beehive/bee nest
7 | BREEDING: 0.05 # When an animal breeds to create a baby (includes shulker and allay duplication)
8 | BUILD_IRONGOLEM: 1 # When an iron golem is spawned by being built
9 | BUILD_SNOWMAN: 1 # When a snowman is spawned by being built
10 | BUILD_WITHER: 1 # When a wither boss is spawned by being built
11 | CHUNK_GEN: 1.5 # When a creature spawns due to chunk generation
12 | COMMAND: 1.0 # When a creature is spawned by the "/summon" command
13 | CURED: 4 # When a villager is cured from infection
14 | CUSTOM: 0 # When a creature is spawned by plugins
15 | DEFAULT: 1 # When an entity is missing a SpawnReason
16 | DISPENSE_EGG: 0.05 # When a creature is spawned by a dispenser dispensing an egg
17 | DROWNED: 0.5 # When an entity is spawned by another entity drowning
18 | DUPLICATION: 0.05 # When an Allay duplicates itself
19 | EGG: 0.05 # When a creature spawns from an egg
20 | ENCHANTMENT: 0.05 # When a creature is spawned by an enchantment
21 | ENDER_PEARL: 1 # When a endermite is spawned as a result of enderpearl usage
22 | EXPLOSION: 1 # When an effect cloud is spawned as a result of a creeper exploding
23 | FROZEN: 1 # When an entity is spawned by another entity freezing in powder snow
24 | INFECTION: 1 # When a zombie infects a villager
25 | JOCKEY: 1 # When an entity spawns as a jockey of another entity (spider jockeys)
26 | LIGHTNING: 1 # When a creature spawns because of a lightning strike
27 | METAMORPHOSIS: 1 # When a tadpole converts to a frog
28 | MOUNT: 1 # When an entity spawns as a mount of another entity (chicken jockeys)
29 | NATURAL: 1 # When something spawns from natural means
30 | NETHER_PORTAL: 0.05 # When a creature is spawned by nether portal
31 | OCELOT_BABY: 1 # When an ocelot has a baby spawned along with them
32 | PATROL: 1 # When an entity is spawned as part of a patrol
33 | PIGLIN_ZOMBIFIED: 1 # When a piglin is converted to a zombified piglin
34 | POTION_EFFECT: 0.05 # When a creature is spawned by a potion effect
35 | RAID: 1 # When an entity is spawned as part of a raid
36 | REINFORCEMENTS: 0.5 # When an entity calls for reinforcements
37 | SHEARED: 1 # When a cow is spawned by shearing a mushroom cow
38 | SHOULDER_ENTITY: 1 # When a parrot disconnects from the shoulder of another entity
39 | SILVERFISH_BLOCK: 1 # When a silverfish spawns from a block
40 | SLIME_SPLIT: 0.5 # When a slime splits
41 | SPAWNER: 0.05 # When a creature spawns from a spawner
42 | SPAWNER_EGG: 1.0 # When a creature spawns from a spawn egg
43 | SPELL: 1 # When an entity is created by a cast spell.
44 | TRAP: 2 # When an entity spawns as a trap for players approaching
45 | TRIAL_SPAWNER: 1 # When a creature spawns from a trial spawner
46 | VILLAGE_DEFENSE: 1 # When an iron golem is spawned to defend a village
47 | VILLAGE_INVASION: 1 # When a zombie is spawned to invade a village
--------------------------------------------------------------------------------
/dh-localization/CREDITS.txt:
--------------------------------------------------------------------------------
1 | en_us - EvDoc
2 | zh_tw - Siu-Lung
--------------------------------------------------------------------------------
/dh-localization/assets/minecraft/lang/en_us.json:
--------------------------------------------------------------------------------
1 | {
2 | "death.beheaded": "%s was decapitated",
3 | "death.beheaded.entity": "%1$s was decapitated by %2$s",
4 | "death.beheaded.entity.item": "%1$s was decapitated by %2$s",
5 | "death.beheaded.entity.item.named": "%1$s decapitated %2$s using %3$s",
6 |
7 | "mob_subtype_in_head_name": "%s ",
8 | "__comment.head_name": "1$=mob subtype list, 2$=mob type, 3$=head type, 4$=mob name",
9 | "head_name.default": "%1$s%2$s %3$s",
10 | "head_name.player": "%4$s Head",
11 | "head_name.giant": "%1$s%2$s's Toe",
12 |
13 | "head_type.head": "Head",
14 | "head_type.skull": "Skull",
15 | "head_type.toe": "Toe",
16 |
17 | "entity_subtype.angry": "Angry",
18 | "entity_subtype.pollinated": "Pollinated",
19 | "entity_subtype.stung": "Stingless",
20 |
21 | "entity_subtype.charged": "Charged",
22 |
23 | "entity_subtype.sleeping": "Sleeping",
24 | "entity_subtype.snow": "block.minecraft.snow",
25 |
26 | "entity_subtype.screaming": "Screaming",
27 |
28 | "entity_subtype.chestnut": "Chestnut",
29 | "entity_subtype.creamy": "Creamy",
30 | "entity_subtype.dark_brown": "Dark Brown",
31 |
32 | "entity_subtype.low_crackiness": "Slightly Damaged",
33 | "entity_subtype.medium_crackiness": "Damaged",
34 | "entity_subtype.high_crackiness": "Very Damaged",
35 |
36 | "entity_subtype.british_shorthair": "British Shorthair",
37 | "entity_subtype.calico": "Calico",
38 | "entity_subtype.ginger": "Ginger",
39 | "entity_subtype.jellie": "Jellie",
40 | "entity_subtype.persian": "Persian",
41 | "entity_subtype.ragdoll": "Ragdoll",
42 | "entity_subtype.siamese": "Siamese",
43 | "entity_subtype.tabby": "Tabby",
44 | "entity_subtype.tuxedo": "Tuxedo",
45 |
46 | "entity_subtype.aggressive": "Aggressive",
47 | "entity_subtype.lazy": "Lazy",
48 | "entity_subtype.playful": "Playful",
49 | "entity_subtype.weak": "Weak",
50 | "entity_subtype.worried": "Worried",
51 |
52 | "entity_subtype.black_and_white": "Black and White",
53 | "entity_subtype.salt_and_pepper": "Salt and Pepper",
54 | "entity_subtype.the_killer_bunny": "entity.minecraft.killer_bunny",
55 | "entity_subtype.toast": "Toast",
56 |
57 | "entity_subtype.warm": "Warm",
58 | "entity_subtype.cold": "Cold",
59 |
60 | "entity_subtype.saddled": "Saddled",
61 |
62 | "entity_subtype.charging": "Charging",
63 |
64 | "entity_subtype.armored": "Armored",
65 | "entity_subtype.invulnerable": "Invulnerable",
66 |
67 | "entity_subtype.baby": "Baby",
68 |
69 | "entity_subtype.armorer": "entity.minecraft.villager.armorer",
70 | "entity_subtype.butcher": "entity.minecraft.villager.butcher",
71 | "entity_subtype.cartographer": "entity.minecraft.villager.cartographer",
72 | "entity_subtype.cleric": "entity.minecraft.villager.cleric",
73 | "entity_subtype.farmer": "entity.minecraft.villager.farmer",
74 | "entity_subtype.fisherman": "entity.minecraft.villager.fisherman",
75 | "entity_subtype.fletcher": "entity.minecraft.villager.fletcher",
76 | "entity_subtype.leatherworker": "entity.minecraft.villager.leatherworker",
77 | "entity_subtype.librarian": "entity.minecraft.villager.librarian",
78 | "entity_subtype.mason": "entity.minecraft.villager.mason",
79 | "entity_subtype.nitwit": "entity.minecraft.villager.nitwit",
80 | "entity_subtype.none": "entity.minecraft.villager.none",
81 | "entity_subtype.shepherd": "entity.minecraft.villager.shepherd",
82 | "entity_subtype.toolsmith": "entity.minecraft.villager.toolsmith",
83 | "entity_subtype.weaponsmith": "entity.minecraft.villager.weaponsmith",
84 |
85 | "entity_subtype.blue": "color.minecraft.blue",
86 | "entity_subtype.cyan": "color.minecraft.cyan",
87 | "entity_subtype.gold": "color.minecraft.yellow",
88 | "entity_subtype.lucy": "color.minecraft.pink",
89 | "entity_subtype.wild": "color.minecraft.brown",
90 | "entity_subtype.peeking": "Peeking",
91 | "entity_subtype.closed": "Closed",
92 | "entity_subtype.sideways": "Sideways",
93 | "entity_subtype.upside_down": "Upside Down",
94 | "entity_subtype.black": "color.minecraft.black",
95 | "entity_subtype.brown": "color.minecraft.brown",
96 | "entity_subtype.gray": "color.minecraft.gray",
97 | "entity_subtype.green": "color.minecraft.green",
98 | "entity_subtype.light_blue": "color.minecraft.light_blue",
99 | "entity_subtype.light_gray": "color.minecraft.light_gray",
100 | "entity_subtype.lime": "color.minecraft.lime",
101 | "entity_subtype.magenta": "color.minecraft.magenta",
102 | "entity_subtype.orange": "color.minecraft.orange",
103 | "entity_subtype.pink": "color.minecraft.pink",
104 | "entity_subtype.purple": "color.minecraft.purple",
105 | "entity_subtype.red": "color.minecraft.red",
106 | "entity_subtype.yellow": "color.minecraft.yellow",
107 | "entity_subtype.white": "color.minecraft.white",
108 |
109 | "entity_subtype.black_collared": "Black-Collared",
110 | "entity_subtype.blue_collared": "Blue-Collared",
111 | "entity_subtype.brown_collared": "Brown-Collared",
112 | "entity_subtype.cyan_collared": "Cyan-Collared",
113 | "entity_subtype.gray_collared": "Gray-Collared",
114 | "entity_subtype.green_collared": "Green-Collared",
115 | "entity_subtype.light_blue_collared": "Light-Blue-Collared",
116 | "entity_subtype.lime_collared": "Lime-Collared",
117 | "entity_subtype.magenta_collared": "Magenta-Collared",
118 | "entity_subtype.orange_collared": "Orange-Collared",
119 | "entity_subtype.pink_collared": "Pink-Collared",
120 | "entity_subtype.purple_collared": "Purple-Collared",
121 | "entity_subtype.red_collared": "Red-Collared",
122 | "entity_subtype.light_gray_collared": "Light-Gray-Collared",
123 | "entity_subtype.white_collared": "White-Collared",
124 | "entity_subtype.yellow_collared": "Yellow-Collared",
125 |
126 | "entity_subtype.custom": "item.minecraft.firework_star.custom_color"
127 | }
--------------------------------------------------------------------------------
/dh-localization/assets/minecraft/lang/fr_fr.json:
--------------------------------------------------------------------------------
1 | {
2 | "death.beheaded": "%s a été décapité",
3 | "death.beheaded.entity": "%1$s a été décapité par %2$s",
4 | "death.beheaded.entity.item": "%1$s a été décapité par %2$s",
5 | "death.beheaded.entity.item.named": "%1$s a décapité %2$s en utilisant %3$s",
6 |
7 | "mob_subtype_in_head_name": "%s ",
8 | "__comment.head_name": "1$=mob subtype list, 2$=mob type, 3$=head type, 4$=mob name",
9 | "head_name.default": "%1$s%2$s %3$s",
10 | "head_name.player": "%4$s Tête",
11 | "head_name.giant": "%1$s%2$s's Doigt de Pied",
12 |
13 | "head_type.head": "Tête",
14 | "head_type.skull": "Crâne",
15 | "head_type.toe": "Doigt de Pied",
16 |
17 | "entity_subtype.angry": "En Colère",
18 | "entity_subtype.pollinated": "Pollinisé",
19 | "entity_subtype.stung": "Stingless",
20 |
21 | "entity_subtype.charged": "Accusé",
22 |
23 | "entity_subtype.sleeping": "Dormir",
24 | "entity_subtype.snow": "block.minecraft.snow",
25 |
26 | "entity_subtype.screaming": "En Hurlant",
27 |
28 | "entity_subtype.chestnut": "Châtaigne",
29 | "entity_subtype.creamy": "Crémeux",
30 | "entity_subtype.dark_brown": "Marron Foncé",
31 |
32 | "entity_subtype.low_crackiness": "Légèrement Endommagé",
33 | "entity_subtype.medium_crackiness": "Endommagé",
34 | "entity_subtype.high_crackiness": "Très Endommagé",
35 |
36 | "entity_subtype.british_shorthair": "British Shorthair",
37 | "entity_subtype.calico": "Calicot",
38 | "entity_subtype.ginger": "Gingembre",
39 | "entity_subtype.jellie": "Gelée",
40 | "entity_subtype.persian": "Persan",
41 | "entity_subtype.ragdoll": "Poupée de Chiffon",
42 | "entity_subtype.siamese": "Siamois",
43 | "entity_subtype.tabby": "Tigré",
44 | "entity_subtype.tuxedo": "Fumeur",
45 |
46 | "entity_subtype.aggressive": "Agressif",
47 | "entity_subtype.lazy": "Paresseux",
48 | "entity_subtype.playful": "Espiègle",
49 | "entity_subtype.weak": "Faible",
50 | "entity_subtype.worried": "Inquiet",
51 |
52 | "entity_subtype.black_and_white": "Noir et Blanc",
53 | "entity_subtype.salt_and_pepper": "Sel et Poivre",
54 | "entity_subtype.the_killer_bunny": "entity.minecraft.killer_bunny",
55 | "entity_subtype.toast": "Toast",
56 |
57 | "entity_subtype.warm": "Chaud",
58 | "entity_subtype.cold": "Froid",
59 |
60 | "entity_subtype.saddled": "Sellé",
61 |
62 | "entity_subtype.charging": "Mise en Charge",
63 |
64 | "entity_subtype.armored": "Blindé",
65 | "entity_subtype.invulnerable": "Invulnérable",
66 |
67 | "entity_subtype.baby": "Bébé",
68 |
69 | "entity_subtype.armorer": "entity.minecraft.villager.armorer",
70 | "entity_subtype.butcher": "entity.minecraft.villager.butcher",
71 | "entity_subtype.cartographer": "entity.minecraft.villager.cartographer",
72 | "entity_subtype.cleric": "entity.minecraft.villager.cleric",
73 | "entity_subtype.farmer": "entity.minecraft.villager.farmer",
74 | "entity_subtype.fisherman": "entity.minecraft.villager.fisherman",
75 | "entity_subtype.fletcher": "entity.minecraft.villager.fletcher",
76 | "entity_subtype.leatherworker": "entity.minecraft.villager.leatherworker",
77 | "entity_subtype.librarian": "entity.minecraft.villager.librarian",
78 | "entity_subtype.mason": "entity.minecraft.villager.mason",
79 | "entity_subtype.nitwit": "entity.minecraft.villager.nitwit",
80 | "entity_subtype.none": "entity.minecraft.villager.none",
81 | "entity_subtype.shepherd": "entity.minecraft.villager.shepherd",
82 | "entity_subtype.toolsmith": "entity.minecraft.villager.toolsmith",
83 | "entity_subtype.weaponsmith": "entity.minecraft.villager.weaponsmith",
84 |
85 | "entity_subtype.blue": "color.minecraft.blue",
86 | "entity_subtype.cyan": "color.minecraft.cyan",
87 | "entity_subtype.gold": "color.minecraft.yellow",
88 | "entity_subtype.lucy": "color.minecraft.pink",
89 | "entity_subtype.wild": "color.minecraft.brown",
90 | "entity_subtype.peeking": "Jeter un Coup D'oeil",
91 | "entity_subtype.closed": "Fermé",
92 | "entity_subtype.sideways": "De coté",
93 | "entity_subtype.upside_down": "à l'envers",
94 | "entity_subtype.black": "color.minecraft.black",
95 | "entity_subtype.brown": "color.minecraft.brown",
96 | "entity_subtype.gray": "color.minecraft.gray",
97 | "entity_subtype.green": "color.minecraft.green",
98 | "entity_subtype.light_blue": "color.minecraft.light_blue",
99 | "entity_subtype.light_gray": "color.minecraft.light_gray",
100 | "entity_subtype.lime": "color.minecraft.lime",
101 | "entity_subtype.magenta": "color.minecraft.magenta",
102 | "entity_subtype.orange": "color.minecraft.orange",
103 | "entity_subtype.pink": "color.minecraft.pink",
104 | "entity_subtype.purple": "color.minecraft.purple",
105 | "entity_subtype.red": "color.minecraft.red",
106 | "entity_subtype.yellow": "color.minecraft.yellow",
107 | "entity_subtype.white": "color.minecraft.white",
108 |
109 | "entity_subtype.black_collared": "Collier noir",
110 | "entity_subtype.blue_collared": "Collier bleu",
111 | "entity_subtype.brown_collared": "Collier marron",
112 | "entity_subtype.cyan_collared": "Collier cyan",
113 | "entity_subtype.gray_collared": "Collier gris",
114 | "entity_subtype.green_collared": "Collier vert",
115 | "entity_subtype.light_blue_collared": "Collier bleu clair",
116 | "entity_subtype.lime_collared": "Collier vert clair",
117 | "entity_subtype.magenta_collared": "Collier magenta",
118 | "entity_subtype.orange_collared": "Collier orange",
119 | "entity_subtype.pink_collared": "Collier rose",
120 | "entity_subtype.purple_collared": "Collier violet",
121 | "entity_subtype.red_collared": "Collier rouge",
122 | "entity_subtype.light_gray_collared": "Collier gris clair",
123 | "entity_subtype.white_collared": "Collier blanc",
124 | "entity_subtype.yellow_collared": "Collier jaune",
125 |
126 | "entity_subtype.custom": "Personnalisé"
127 | }
--------------------------------------------------------------------------------
/dh-localization/assets/minecraft/lang/zh_tw.json:
--------------------------------------------------------------------------------
1 | {
2 | "death.beheaded": "%s 被斬首",
3 | "death.beheaded.entity": "%1$s 被 %2$s 斬首",
4 | "death.beheaded.entity.item": "%1$s 被 %2$s 斬首",
5 | "death.beheaded.entity.item.named": "%1$s 被斬首 %2$s 使用 %3$s",
6 |
7 | "mob_subtype_in_head_name": "%s",
8 | "__comment.head_name": "1$=mob subtype list, 2$=mob type, 3$=head type, 4$=mob name",
9 | "head_name.default": "%1$s%2$s%3$s",
10 | "head_name.player": "%4$s頭顱",
11 | "head_name.giant": "%1$s%2$s腳趾",
12 |
13 | "head_type.head": "頭顱",
14 | "head_type.skull": "頭顱",
15 | "head_type.toe": "腳趾",
16 |
17 | "entity_subtype.angry": "憤怒",
18 | "entity_subtype.pollinated": "授粉",
19 | "entity_subtype.stung": "",
20 |
21 | "entity_subtype.charged": "閃電",
22 |
23 | "entity_subtype.sleeping": "睡覺",
24 | "entity_subtype.snow": "block.minecraft.snow",
25 |
26 | "entity_subtype.screaming": "尖叫",
27 |
28 | "entity_subtype.chestnut": "深棗紅色",
29 | "entity_subtype.creamy": "淡栗色",
30 | "entity_subtype.dark_brown": "深褐色",
31 |
32 | "entity_subtype.low_crackiness": "輕微破裂",
33 | "entity_subtype.medium_crackiness": "破裂",
34 | "entity_subtype.high_crackiness": "嚴重破裂",
35 |
36 | "entity_subtype.british_shorthair": "英國短毛",
37 | "entity_subtype.calico": "花",
38 | "entity_subtype.ginger": "紅虎斑",
39 | "entity_subtype.jellie": "Jellie",
40 | "entity_subtype.persian": "波斯",
41 | "entity_subtype.ragdoll": "布偶",
42 | "entity_subtype.siamese": "暹羅",
43 | "entity_subtype.tabby": "虎斑",
44 | "entity_subtype.tuxedo": "西服",
45 |
46 | "entity_subtype.aggressive": "好鬥",
47 | "entity_subtype.lazy": "懶惰",
48 | "entity_subtype.playful": "頑皮",
49 | "entity_subtype.weak": "體弱",
50 | "entity_subtype.worried": "發愁",
51 |
52 | "entity_subtype.black_and_white": "黑白斑點",
53 | "entity_subtype.salt_and_pepper": "黑色斑點",
54 | "entity_subtype.the_killer_bunny": "殺手",
55 | "entity_subtype.toast": "Toast",
56 |
57 | "entity_subtype.warm": "溫暖",
58 | "entity_subtype.cold": "怕冷",
59 |
60 | "entity_subtype.saddled": "背著馬鞍",
61 |
62 | "entity_subtype.charging": "尖叫",
63 |
64 | "entity_subtype.armored": "黑色",
65 | "entity_subtype.invulnerable": "藍色",
66 |
67 | "entity_subtype.baby": "",
68 |
69 | "entity_subtype.armorer": "entity.minecraft.villager.armorer",
70 | "entity_subtype.butcher": "entity.minecraft.villager.butcher",
71 | "entity_subtype.cartographer": "entity.minecraft.villager.cartographer",
72 | "entity_subtype.cleric": "entity.minecraft.villager.cleric",
73 | "entity_subtype.farmer": "entity.minecraft.villager.farmer",
74 | "entity_subtype.fisherman": "entity.minecraft.villager.fisherman",
75 | "entity_subtype.fletcher": "entity.minecraft.villager.fletcher",
76 | "entity_subtype.leatherworker": "entity.minecraft.villager.leatherworker",
77 | "entity_subtype.librarian": "entity.minecraft.villager.librarian",
78 | "entity_subtype.mason": "entity.minecraft.villager.mason",
79 | "entity_subtype.nitwit": "entity.minecraft.villager.nitwit",
80 | "entity_subtype.none": "entity.minecraft.villager.none",
81 | "entity_subtype.shepherd": "entity.minecraft.villager.shepherd",
82 | "entity_subtype.toolsmith": "entity.minecraft.villager.toolsmith",
83 | "entity_subtype.weaponsmith": "entity.minecraft.villager.weaponsmith",
84 |
85 | "entity_subtype.blue": "color.minecraft.blue",
86 | "entity_subtype.cyan": "color.minecraft.cyan",
87 | "entity_subtype.gold": "color.minecraft.yellow",
88 | "entity_subtype.lucy": "color.minecraft.pink",
89 | "entity_subtype.wild": "color.minecraft.brown",
90 | "entity_subtype.peeking": "",
91 | "entity_subtype.closed": "閉合",
92 | "entity_subtype.sideways": "",
93 | "entity_subtype.upside_down": "",
94 | "entity_subtype.black": "color.minecraft.black",
95 | "entity_subtype.brown": "color.minecraft.brown",
96 | "entity_subtype.gray": "color.minecraft.gray",
97 | "entity_subtype.green": "color.minecraft.green",
98 | "entity_subtype.light_blue": "color.minecraft.light_blue",
99 | "entity_subtype.light_gray": "color.minecraft.light_gray",
100 | "entity_subtype.lime": "color.minecraft.lime",
101 | "entity_subtype.magenta": "color.minecraft.magenta",
102 | "entity_subtype.orange": "color.minecraft.orange",
103 | "entity_subtype.pink": "color.minecraft.pink",
104 | "entity_subtype.purple": "color.minecraft.purple",
105 | "entity_subtype.red": "color.minecraft.red",
106 | "entity_subtype.yellow": "color.minecraft.yellow",
107 | "entity_subtype.white": "color.minecraft.white",
108 |
109 | "entity_subtype.black_collared": "套上黑色項圈",
110 | "entity_subtype.blue_collared": "套上藍色項圈",
111 | "entity_subtype.brown_collared": "套上棕色項圈",
112 | "entity_subtype.cyan_collared": "套上棕色項圈",
113 | "entity_subtype.gray_collared": "套上灰色項圈",
114 | "entity_subtype.green_collared": "套上綠色項圈",
115 | "entity_subtype.light_blue_collared": "套上淺藍色項圈",
116 | "entity_subtype.lime_collared": "套上淺綠色項圈",
117 | "entity_subtype.magenta_collared": "套上洋紅色項圈",
118 | "entity_subtype.orange_collared": "套上橙色項圈",
119 | "entity_subtype.pink_collared": "套上棕色項圈",
120 | "entity_subtype.purple_collared": "套上紫色項圈",
121 | "entity_subtype.red_collared": "套上紅色項圈",
122 | "entity_subtype.light_gray_collared": "套上淺灰色項圈",
123 | "entity_subtype.white_collared": "套上白色項圈",
124 | "entity_subtype.yellow_collared": "套上黃色項圈",
125 |
126 | "entity_subtype.custom": "item.minecraft.firework_star.custom_color"
127 | }
--------------------------------------------------------------------------------
/dh-localization/pack.mcmeta:
--------------------------------------------------------------------------------
1 | {
2 | "pack": {
3 | "pack_format": 34,
4 | "description": {"text":"DropHeads Localization","color":"gray"}
5 | }
6 | }
--------------------------------------------------------------------------------
/dh-localization/pack.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EvModder/DropHeads/3fa5648aa849f2b72be33f08769e9b6ac81fe755/dh-localization/pack.png
--------------------------------------------------------------------------------
/docs/allclasses-index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | All Classes and Interfaces
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
21 |
22 | JavaScript is disabled on your browser.
23 |
24 |
25 |
49 |
50 |
51 |
54 |
55 |
Classes
56 |
57 |
58 |
59 |
60 |
61 |
Cancellable event created by the DropHeads plugin when a behead message is sent.
62 |
63 |
64 |
65 |
Public API for head drop chance logic loaded from DropHeads configs.
66 |
67 |
68 |
69 |
Cancellable event created by the DropHeads plugin when an entity is beheaded.
70 |
71 |
72 |
73 |
Public API for general DropHeads features.
74 |
75 |
76 |
77 |
Event which indicates a head drop roll has occurred and the success/failure has been determined.
78 |
79 |
80 |
81 |
Internal-only API for DropHeads.
82 |
83 |
84 |
85 |
Utility for getting a TextureKey from an Entity based on its sub-type, attributes, state, etc.
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
--------------------------------------------------------------------------------
/docs/allpackages-index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | All Packages
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
21 |
22 | JavaScript is disabled on your browser.
23 |
24 |
25 |
49 |
50 |
51 |
54 | Package Summary
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
--------------------------------------------------------------------------------
/docs/copy.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
27 |
28 |
29 |
31 |
33 |
34 |
--------------------------------------------------------------------------------
/docs/element-list:
--------------------------------------------------------------------------------
1 | net.evmodder.DropHeads
2 | net.evmodder.DropHeads.events
3 |
--------------------------------------------------------------------------------
/docs/index-files/index-1.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | A-Index
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
21 |
22 | JavaScript is disabled on your browser.
23 |
24 |
69 |
70 |
71 |
--------------------------------------------------------------------------------
/docs/index-files/index-10.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | S-Index
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
21 |
22 | JavaScript is disabled on your browser.
23 |
24 |
85 |
86 |
87 |
--------------------------------------------------------------------------------
/docs/index-files/index-11.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | T-Index
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
21 |
22 | JavaScript is disabled on your browser.
23 |
24 |
25 |
49 |
50 |
51 |
54 | A B D E G H I L N S T All Classes and Interfaces | All Packages
55 | T
56 |
57 | textureExists(String) - Method in class net.evmodder.DropHeads.HeadAPI
58 |
59 | Check if a texture exists for the given key.
60 |
61 | TextureKeyLookup - Class in net.evmodder.DropHeads
62 |
63 | Utility for getting a TextureKey from an Entity based on its sub-type, attributes, state, etc.
64 |
65 | triggerHeadDropEvent(Entity, Entity, Event, ItemStack) - Method in class net.evmodder.DropHeads.DropChanceAPI
66 |
67 | Attempt to drop a head item for an Entity with the regular behead message.
68 |
69 | triggerHeadDropEvent(Entity, Entity, Event, ItemStack, Component) - Method in class net.evmodder.DropHeads.DropChanceAPI
70 |
71 | Attempt to drop a head item for an Entity with a custom behead message.
72 |
73 |
74 | A B D E G H I L N S T All Classes and Interfaces | All Packages
75 |
76 |
77 |
78 |
79 |
--------------------------------------------------------------------------------
/docs/index-files/index-2.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | B-Index
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
21 |
22 | JavaScript is disabled on your browser.
23 |
24 |
69 |
70 |
71 |
--------------------------------------------------------------------------------
/docs/index-files/index-3.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | D-Index
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
21 |
22 | JavaScript is disabled on your browser.
23 |
24 |
69 |
70 |
71 |
--------------------------------------------------------------------------------
/docs/index-files/index-4.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | E-Index
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
21 |
22 | JavaScript is disabled on your browser.
23 |
24 |
69 |
70 |
71 |
--------------------------------------------------------------------------------
/docs/index-files/index-6.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | H-Index
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
21 |
22 | JavaScript is disabled on your browser.
23 |
24 |
73 |
74 |
75 |
--------------------------------------------------------------------------------
/docs/index-files/index-7.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | I-Index
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
21 |
22 | JavaScript is disabled on your browser.
23 |
24 |
85 |
86 |
87 |
--------------------------------------------------------------------------------
/docs/index-files/index-8.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | L-Index
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
21 |
22 | JavaScript is disabled on your browser.
23 |
24 |
81 |
82 |
83 |
--------------------------------------------------------------------------------
/docs/index-files/index-9.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | N-Index
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
21 |
22 | JavaScript is disabled on your browser.
23 |
24 |
63 |
64 |
65 |
--------------------------------------------------------------------------------
/docs/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Overview
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
21 |
22 | JavaScript is disabled on your browser.
23 |
24 |
25 |
49 |
50 |
51 |
52 |
Packages
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
--------------------------------------------------------------------------------
/docs/jquery-ui.overrides.css:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved.
3 | * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
4 | *
5 | *
6 | *
7 | *
8 | *
9 | *
10 | *
11 | *
12 | *
13 | *
14 | *
15 | *
16 | *
17 | *
18 | *
19 | *
20 | *
21 | *
22 | *
23 | *
24 | */
25 |
26 | .ui-state-active,
27 | .ui-widget-content .ui-state-active,
28 | .ui-widget-header .ui-state-active,
29 | a.ui-button:active,
30 | .ui-button:active,
31 | .ui-button.ui-state-active:hover {
32 | /* Overrides the color of selection used in jQuery UI */
33 | background: #F8981D;
34 | }
35 |
--------------------------------------------------------------------------------
/docs/legal/COPYRIGHT:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EvModder/DropHeads/3fa5648aa849f2b72be33f08769e9b6ac81fe755/docs/legal/COPYRIGHT
--------------------------------------------------------------------------------
/docs/legal/jquery.md:
--------------------------------------------------------------------------------
1 | ## jQuery v3.5.1
2 |
3 | ### jQuery License
4 | ```
5 | jQuery v 3.5.1
6 | Copyright JS Foundation and other contributors, https://js.foundation/
7 |
8 | Permission is hereby granted, free of charge, to any person obtaining
9 | a copy of this software and associated documentation files (the
10 | "Software"), to deal in the Software without restriction, including
11 | without limitation the rights to use, copy, modify, merge, publish,
12 | distribute, sublicense, and/or sell copies of the Software, and to
13 | permit persons to whom the Software is furnished to do so, subject to
14 | the following conditions:
15 |
16 | The above copyright notice and this permission notice shall be
17 | included in all copies or substantial portions of the Software.
18 |
19 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
20 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
21 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
22 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
23 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
24 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
25 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
26 |
27 | ******************************************
28 |
29 | The jQuery JavaScript Library v3.5.1 also includes Sizzle.js
30 |
31 | Sizzle.js includes the following license:
32 |
33 | Copyright JS Foundation and other contributors, https://js.foundation/
34 |
35 | This software consists of voluntary contributions made by many
36 | individuals. For exact contribution history, see the revision history
37 | available at https://github.com/jquery/sizzle
38 |
39 | The following license applies to all parts of this software except as
40 | documented below:
41 |
42 | ====
43 |
44 | Permission is hereby granted, free of charge, to any person obtaining
45 | a copy of this software and associated documentation files (the
46 | "Software"), to deal in the Software without restriction, including
47 | without limitation the rights to use, copy, modify, merge, publish,
48 | distribute, sublicense, and/or sell copies of the Software, and to
49 | permit persons to whom the Software is furnished to do so, subject to
50 | the following conditions:
51 |
52 | The above copyright notice and this permission notice shall be
53 | included in all copies or substantial portions of the Software.
54 |
55 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
56 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
57 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
58 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
59 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
60 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
61 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
62 |
63 | ====
64 |
65 | All files located in the node_modules and external directories are
66 | externally maintained libraries used by this software which have their
67 | own licenses; we recommend you read them, as their terms may differ from
68 | the terms above.
69 |
70 | *********************
71 |
72 | ```
73 |
--------------------------------------------------------------------------------
/docs/legal/jqueryUI.md:
--------------------------------------------------------------------------------
1 | ## jQuery UI v1.12.1
2 |
3 | ### jQuery UI License
4 | ```
5 | Copyright jQuery Foundation and other contributors, https://jquery.org/
6 |
7 | This software consists of voluntary contributions made by many
8 | individuals. For exact contribution history, see the revision history
9 | available at https://github.com/jquery/jquery-ui
10 |
11 | The following license applies to all parts of this software except as
12 | documented below:
13 |
14 | ====
15 |
16 | Permission is hereby granted, free of charge, to any person obtaining
17 | a copy of this software and associated documentation files (the
18 | "Software"), to deal in the Software without restriction, including
19 | without limitation the rights to use, copy, modify, merge, publish,
20 | distribute, sublicense, and/or sell copies of the Software, and to
21 | permit persons to whom the Software is furnished to do so, subject to
22 | the following conditions:
23 |
24 | The above copyright notice and this permission notice shall be
25 | included in all copies or substantial portions of the Software.
26 |
27 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
28 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
29 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
30 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
31 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
32 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
33 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
34 |
35 | ====
36 |
37 | Copyright and related rights for sample code are waived via CC0. Sample
38 | code is defined as all source code contained within the demos directory.
39 |
40 | CC0: http://creativecommons.org/publicdomain/zero/1.0/
41 |
42 | ====
43 |
44 | All files located in the node_modules and external directories are
45 | externally maintained libraries used by this software which have their
46 | own licenses; we recommend you read them, as their terms may differ from
47 | the terms above.
48 |
49 | ```
50 |
--------------------------------------------------------------------------------
/docs/module-search-index.js:
--------------------------------------------------------------------------------
1 | moduleSearchIndex = [];updateSearchResults();
--------------------------------------------------------------------------------
/docs/net/evmodder/DropHeads/class-use/DropChanceAPI.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Uses of Class net.evmodder.DropHeads.DropChanceAPI
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
21 |
22 | JavaScript is disabled on your browser.
23 |
24 |
25 |
49 |
50 |
51 |
54 | No usage of net.evmodder.DropHeads.DropChanceAPI
55 |
56 |
57 |
58 |
59 |
--------------------------------------------------------------------------------
/docs/net/evmodder/DropHeads/class-use/HeadAPI.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Uses of Class net.evmodder.DropHeads.HeadAPI
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
21 |
22 | JavaScript is disabled on your browser.
23 |
24 |
25 |
49 |
50 |
51 |
54 |
55 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
final class
72 |
73 |
74 |
Internal-only API for DropHeads.
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
--------------------------------------------------------------------------------
/docs/net/evmodder/DropHeads/class-use/InternalAPI.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Uses of Class net.evmodder.DropHeads.InternalAPI
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
21 |
22 | JavaScript is disabled on your browser.
23 |
24 |
25 |
49 |
50 |
51 |
54 | No usage of net.evmodder.DropHeads.InternalAPI
55 |
56 |
57 |
58 |
59 |
--------------------------------------------------------------------------------
/docs/net/evmodder/DropHeads/class-use/TextureKeyLookup.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Uses of Class net.evmodder.DropHeads.TextureKeyLookup
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
21 |
22 | JavaScript is disabled on your browser.
23 |
24 |
25 |
49 |
50 |
51 |
54 | No usage of net.evmodder.DropHeads.TextureKeyLookup
55 |
56 |
57 |
58 |
59 |
--------------------------------------------------------------------------------
/docs/net/evmodder/DropHeads/events/class-use/BeheadMessageEvent.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Uses of Class net.evmodder.DropHeads.events.BeheadMessageEvent
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
21 |
22 | JavaScript is disabled on your browser.
23 |
24 |
25 |
49 |
50 |
51 |
54 | No usage of net.evmodder.DropHeads.events.BeheadMessageEvent
55 |
56 |
57 |
58 |
59 |
--------------------------------------------------------------------------------
/docs/net/evmodder/DropHeads/events/class-use/EntityBeheadEvent.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Uses of Class net.evmodder.DropHeads.events.EntityBeheadEvent
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
21 |
22 | JavaScript is disabled on your browser.
23 |
24 |
25 |
49 |
50 |
51 |
54 | No usage of net.evmodder.DropHeads.events.EntityBeheadEvent
55 |
56 |
57 |
58 |
59 |
--------------------------------------------------------------------------------
/docs/net/evmodder/DropHeads/events/class-use/HeadRollEvent.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Uses of Class net.evmodder.DropHeads.events.HeadRollEvent
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
21 |
22 | JavaScript is disabled on your browser.
23 |
24 |
25 |
49 |
50 |
51 |
54 | No usage of net.evmodder.DropHeads.events.HeadRollEvent
55 |
56 |
57 |
58 |
59 |
--------------------------------------------------------------------------------
/docs/net/evmodder/DropHeads/events/package-summary.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | net.evmodder.DropHeads.events
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
21 |
22 | JavaScript is disabled on your browser.
23 |
24 |
25 |
67 |
68 |
69 |
72 |
73 | package net.evmodder.DropHeads.events
74 |
75 |
76 |
77 |
86 |
87 |
88 |
89 |
Classes
90 |
91 |
92 |
93 |
94 |
95 |
Cancellable event created by the DropHeads plugin when a behead message is sent.
96 |
97 |
98 |
99 |
Cancellable event created by the DropHeads plugin when an entity is beheaded.
100 |
101 |
102 |
103 |
Event which indicates a head drop roll has occurred and the success/failure has been determined.
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
--------------------------------------------------------------------------------
/docs/net/evmodder/DropHeads/events/package-tree.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | net.evmodder.DropHeads.events Class Hierarchy
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
21 |
22 | JavaScript is disabled on your browser.
23 |
24 |
25 |
49 |
50 |
51 |
58 |
59 | Class Hierarchy
60 |
61 | java.lang.Object
62 |
63 | org.bukkit.event.Event
64 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
--------------------------------------------------------------------------------
/docs/net/evmodder/DropHeads/events/package-use.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Uses of Package net.evmodder.DropHeads.events
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
21 |
22 | JavaScript is disabled on your browser.
23 |
24 |
25 |
49 |
50 |
51 |
54 | No usage of net.evmodder.DropHeads.events
55 |
56 |
57 |
58 |
59 |
--------------------------------------------------------------------------------
/docs/net/evmodder/DropHeads/package-summary.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | net.evmodder.DropHeads
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
21 |
22 | JavaScript is disabled on your browser.
23 |
24 |
25 |
67 |
68 |
69 |
72 |
73 | package net.evmodder.DropHeads
74 |
75 |
76 |
77 |
86 |
87 |
88 |
89 |
Classes
90 |
91 |
92 |
93 |
94 |
95 |
Public API for head drop chance logic loaded from DropHeads configs.
96 |
97 |
98 |
99 |
Public API for general DropHeads features.
100 |
101 |
102 |
103 |
Internal-only API for DropHeads.
104 |
105 |
106 |
107 |
Utility for getting a TextureKey from an Entity based on its sub-type, attributes, state, etc.
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
--------------------------------------------------------------------------------
/docs/net/evmodder/DropHeads/package-tree.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | net.evmodder.DropHeads Class Hierarchy
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
21 |
22 | JavaScript is disabled on your browser.
23 |
24 |
25 |
49 |
50 |
51 |
58 |
59 | Class Hierarchy
60 |
61 | java.lang.Object
62 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
--------------------------------------------------------------------------------
/docs/net/evmodder/DropHeads/package-use.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Uses of Package net.evmodder.DropHeads
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
21 |
22 | JavaScript is disabled on your browser.
23 |
24 |
25 |
49 |
50 |
51 |
54 |
55 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
Public API for general DropHeads features.
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
--------------------------------------------------------------------------------
/docs/overview-summary.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Generated Documentation (Untitled)
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 | JavaScript is disabled on your browser.
22 |
23 | index.html
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/docs/overview-tree.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Class Hierarchy
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
21 |
22 | JavaScript is disabled on your browser.
23 |
24 |
25 |
49 |
50 |
51 |
59 |
60 | Class Hierarchy
61 |
62 | java.lang.Object
63 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
--------------------------------------------------------------------------------
/docs/package-search-index.js:
--------------------------------------------------------------------------------
1 | packageSearchIndex = [{"l":"All Packages","u":"allpackages-index.html"},{"l":"net.evmodder.DropHeads.events"}];updateSearchResults();
--------------------------------------------------------------------------------
/docs/resources/glass.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EvModder/DropHeads/3fa5648aa849f2b72be33f08769e9b6ac81fe755/docs/resources/glass.png
--------------------------------------------------------------------------------
/docs/resources/x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EvModder/DropHeads/3fa5648aa849f2b72be33f08769e9b6ac81fe755/docs/resources/x.png
--------------------------------------------------------------------------------
/docs/script-dir/images/ui-bg_glass_55_fbf9ee_1x400.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EvModder/DropHeads/3fa5648aa849f2b72be33f08769e9b6ac81fe755/docs/script-dir/images/ui-bg_glass_55_fbf9ee_1x400.png
--------------------------------------------------------------------------------
/docs/script-dir/images/ui-bg_glass_65_dadada_1x400.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EvModder/DropHeads/3fa5648aa849f2b72be33f08769e9b6ac81fe755/docs/script-dir/images/ui-bg_glass_65_dadada_1x400.png
--------------------------------------------------------------------------------
/docs/script-dir/images/ui-bg_glass_75_dadada_1x400.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EvModder/DropHeads/3fa5648aa849f2b72be33f08769e9b6ac81fe755/docs/script-dir/images/ui-bg_glass_75_dadada_1x400.png
--------------------------------------------------------------------------------
/docs/script-dir/images/ui-bg_glass_75_e6e6e6_1x400.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EvModder/DropHeads/3fa5648aa849f2b72be33f08769e9b6ac81fe755/docs/script-dir/images/ui-bg_glass_75_e6e6e6_1x400.png
--------------------------------------------------------------------------------
/docs/script-dir/images/ui-bg_glass_95_fef1ec_1x400.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EvModder/DropHeads/3fa5648aa849f2b72be33f08769e9b6ac81fe755/docs/script-dir/images/ui-bg_glass_95_fef1ec_1x400.png
--------------------------------------------------------------------------------
/docs/script-dir/images/ui-bg_highlight-soft_75_cccccc_1x100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EvModder/DropHeads/3fa5648aa849f2b72be33f08769e9b6ac81fe755/docs/script-dir/images/ui-bg_highlight-soft_75_cccccc_1x100.png
--------------------------------------------------------------------------------
/docs/script-dir/images/ui-icons_222222_256x240.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EvModder/DropHeads/3fa5648aa849f2b72be33f08769e9b6ac81fe755/docs/script-dir/images/ui-icons_222222_256x240.png
--------------------------------------------------------------------------------
/docs/script-dir/images/ui-icons_2e83ff_256x240.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EvModder/DropHeads/3fa5648aa849f2b72be33f08769e9b6ac81fe755/docs/script-dir/images/ui-icons_2e83ff_256x240.png
--------------------------------------------------------------------------------
/docs/script-dir/images/ui-icons_454545_256x240.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EvModder/DropHeads/3fa5648aa849f2b72be33f08769e9b6ac81fe755/docs/script-dir/images/ui-icons_454545_256x240.png
--------------------------------------------------------------------------------
/docs/script-dir/images/ui-icons_888888_256x240.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EvModder/DropHeads/3fa5648aa849f2b72be33f08769e9b6ac81fe755/docs/script-dir/images/ui-icons_888888_256x240.png
--------------------------------------------------------------------------------
/docs/script-dir/images/ui-icons_cd0a0a_256x240.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EvModder/DropHeads/3fa5648aa849f2b72be33f08769e9b6ac81fe755/docs/script-dir/images/ui-icons_cd0a0a_256x240.png
--------------------------------------------------------------------------------
/docs/script-dir/jquery-ui.structure.min.css:
--------------------------------------------------------------------------------
1 | /*! jQuery UI - v1.12.1 - 2018-12-06
2 | * http://jqueryui.com
3 | * Copyright jQuery Foundation and other contributors; Licensed MIT */
4 |
5 | .ui-helper-hidden{display:none}.ui-helper-hidden-accessible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.ui-helper-reset{margin:0;padding:0;border:0;outline:0;line-height:1.3;text-decoration:none;font-size:100%;list-style:none}.ui-helper-clearfix:before,.ui-helper-clearfix:after{content:"";display:table;border-collapse:collapse}.ui-helper-clearfix:after{clear:both}.ui-helper-zfix{width:100%;height:100%;top:0;left:0;position:absolute;opacity:0;filter:Alpha(Opacity=0)}.ui-front{z-index:100}.ui-state-disabled{cursor:default!important;pointer-events:none}.ui-icon{display:inline-block;vertical-align:middle;margin-top:-.25em;position:relative;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat}.ui-widget-icon-block{left:50%;margin-left:-8px;display:block}.ui-widget-overlay{position:fixed;top:0;left:0;width:100%;height:100%}.ui-autocomplete{position:absolute;top:0;left:0;cursor:default}.ui-menu{list-style:none;padding:0;margin:0;display:block;outline:0}.ui-menu .ui-menu{position:absolute}.ui-menu .ui-menu-item{margin:0;cursor:pointer;list-style-image:url("data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7")}.ui-menu .ui-menu-item-wrapper{position:relative;padding:3px 1em 3px .4em}.ui-menu .ui-menu-divider{margin:5px 0;height:0;font-size:0;line-height:0;border-width:1px 0 0 0}.ui-menu .ui-state-focus,.ui-menu .ui-state-active{margin:-1px}.ui-menu-icons{position:relative}.ui-menu-icons .ui-menu-item-wrapper{padding-left:2em}.ui-menu .ui-icon{position:absolute;top:0;bottom:0;left:.2em;margin:auto 0}.ui-menu .ui-menu-icon{left:auto;right:0}
--------------------------------------------------------------------------------
/docs/script.js:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2013, 2021, Oracle and/or its affiliates. All rights reserved.
3 | * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
4 | *
5 | *
6 | *
7 | *
8 | *
9 | *
10 | *
11 | *
12 | *
13 | *
14 | *
15 | *
16 | *
17 | *
18 | *
19 | *
20 | *
21 | *
22 | *
23 | *
24 | */
25 |
26 | var moduleSearchIndex;
27 | var packageSearchIndex;
28 | var typeSearchIndex;
29 | var memberSearchIndex;
30 | var tagSearchIndex;
31 | function loadScripts(doc, tag) {
32 | createElem(doc, tag, 'search.js');
33 |
34 | createElem(doc, tag, 'module-search-index.js');
35 | createElem(doc, tag, 'package-search-index.js');
36 | createElem(doc, tag, 'type-search-index.js');
37 | createElem(doc, tag, 'member-search-index.js');
38 | createElem(doc, tag, 'tag-search-index.js');
39 | }
40 |
41 | function createElem(doc, tag, path) {
42 | var script = doc.createElement(tag);
43 | var scriptElement = doc.getElementsByTagName(tag)[0];
44 | script.src = pathtoroot + path;
45 | scriptElement.parentNode.insertBefore(script, scriptElement);
46 | }
47 |
48 | function show(tableId, selected, columns) {
49 | if (tableId !== selected) {
50 | document.querySelectorAll('div.' + tableId + ':not(.' + selected + ')')
51 | .forEach(function(elem) {
52 | elem.style.display = 'none';
53 | });
54 | }
55 | document.querySelectorAll('div.' + selected)
56 | .forEach(function(elem, index) {
57 | elem.style.display = '';
58 | var isEvenRow = index % (columns * 2) < columns;
59 | elem.classList.remove(isEvenRow ? oddRowColor : evenRowColor);
60 | elem.classList.add(isEvenRow ? evenRowColor : oddRowColor);
61 | });
62 | updateTabs(tableId, selected);
63 | }
64 |
65 | function updateTabs(tableId, selected) {
66 | document.querySelector('div#' + tableId +' .summary-table')
67 | .setAttribute('aria-labelledby', selected);
68 | document.querySelectorAll('button[id^="' + tableId + '"]')
69 | .forEach(function(tab, index) {
70 | if (selected === tab.id || (tableId === selected && index === 0)) {
71 | tab.className = activeTableTab;
72 | tab.setAttribute('aria-selected', true);
73 | tab.setAttribute('tabindex',0);
74 | } else {
75 | tab.className = tableTab;
76 | tab.setAttribute('aria-selected', false);
77 | tab.setAttribute('tabindex',-1);
78 | }
79 | });
80 | }
81 |
82 | function switchTab(e) {
83 | var selected = document.querySelector('[aria-selected=true]');
84 | if (selected) {
85 | if ((e.keyCode === 37 || e.keyCode === 38) && selected.previousSibling) {
86 | // left or up arrow key pressed: move focus to previous tab
87 | selected.previousSibling.click();
88 | selected.previousSibling.focus();
89 | e.preventDefault();
90 | } else if ((e.keyCode === 39 || e.keyCode === 40) && selected.nextSibling) {
91 | // right or down arrow key pressed: move focus to next tab
92 | selected.nextSibling.click();
93 | selected.nextSibling.focus();
94 | e.preventDefault();
95 | }
96 | }
97 | }
98 |
99 | var updateSearchResults = function() {};
100 |
101 | function indexFilesLoaded() {
102 | return moduleSearchIndex
103 | && packageSearchIndex
104 | && typeSearchIndex
105 | && memberSearchIndex
106 | && tagSearchIndex;
107 | }
108 |
109 | function copySnippet(button) {
110 | var textarea = document.createElement("textarea");
111 | textarea.style.height = 0;
112 | document.body.appendChild(textarea);
113 | textarea.value = button.nextElementSibling.innerText;
114 | textarea.select();
115 | document.execCommand("copy");
116 | document.body.removeChild(textarea);
117 | var span = button.firstElementChild;
118 | var copied = span.getAttribute("data-copied");
119 | if (span.innerHTML !== copied) {
120 | var initialLabel = span.innerHTML;
121 | span.innerHTML = copied;
122 | var parent = button.parentElement;
123 | parent.onmouseleave = parent.ontouchend = function() {
124 | span.innerHTML = initialLabel;
125 | };
126 | }
127 | }
128 |
129 | // Workaround for scroll position not being included in browser history (8249133)
130 | document.addEventListener("DOMContentLoaded", function(e) {
131 | var contentDiv = document.querySelector("div.flex-content");
132 | window.addEventListener("popstate", function(e) {
133 | if (e.state !== null) {
134 | contentDiv.scrollTop = e.state;
135 | }
136 | });
137 | window.addEventListener("hashchange", function(e) {
138 | history.replaceState(contentDiv.scrollTop, document.title);
139 | });
140 | contentDiv.addEventListener("scroll", function(e) {
141 | var timeoutID;
142 | if (!timeoutID) {
143 | timeoutID = setTimeout(function() {
144 | history.replaceState(contentDiv.scrollTop, document.title);
145 | timeoutID = null;
146 | }, 100);
147 | }
148 | });
149 | if (!location.hash) {
150 | history.replaceState(contentDiv.scrollTop, document.title);
151 | }
152 | });
153 |
--------------------------------------------------------------------------------
/docs/tag-search-index.js:
--------------------------------------------------------------------------------
1 | tagSearchIndex = [];updateSearchResults();
--------------------------------------------------------------------------------
/docs/type-search-index.js:
--------------------------------------------------------------------------------
1 | typeSearchIndex = [{"l":"All Classes and Interfaces","u":"allclasses-index.html"},{"p":"net.evmodder.DropHeads.events","l":"BeheadMessageEvent"},{"p":"net.evmodder.DropHeads","l":"DropChanceAPI"},{"p":"net.evmodder.DropHeads.events","l":"EntityBeheadEvent"},{"p":"net.evmodder.DropHeads","l":"HeadAPI"},{"p":"net.evmodder.DropHeads.events","l":"HeadRollEvent"},{"p":"net.evmodder.DropHeads","l":"InternalAPI"},{"p":"net.evmodder.DropHeads","l":"TextureKeyLookup"}];updateSearchResults();
--------------------------------------------------------------------------------
/extra-textures/misc-textures.txt:
--------------------------------------------------------------------------------
1 | # Pre-1.14 (preJAPPA) VILLAGER and ZOMBIE_VILLAGER heads
2 | VILLAGER|BLACKSMITH: 87d1c345eb4099440f714ccf6f78364ee85bd0b01c1c186d848151ba01f7dc86
3 | VILLAGER|BUTCHER: 961f19ffd8ae425792c4b181756adff8d48174aeef58a0f327a28c742c72442
4 | VILLAGER|FARMER: cff0482fd32fab2ce9f5fa2e2d9b4dc7561da422152c99fc804b9139caf256b
5 | VILLAGER|LIBRARIAN: 44f08ebd4e25cda3ade45b863378ad377f18c510db4d28e82bb24451439b3734
6 | VILLAGER|NITWIT: xxx
7 | VILLAGER|NORMAL: xxx
8 | VILLAGER|PRIEST: xxx
9 |
10 | ZOMBIE_VILLAGER|BLACKSMITH: a16155fcf366cf4e06ce5dffc48ca54e8ea48dfe525358b612dc44fd432
11 | ZOMBIE_VILLAGER|BUTCHER: 961f19ffd8ae425792c4b181756adff8d48174aeef58a0f327a28c742c72442
12 | ZOMBIE_VILLAGER|FARMER: cff0482fd32fab2ce9f5fa2e2d9b4dc7561da422152c99fc804b9139caf256b
13 | ZOMBIE_VILLAGER|HUSK: HUSK
14 | ZOMBIE_VILLAGER|LIBRARIAN: 44f08ebd4e25cda3ade45b863378ad377f18c510db4d28e82bb24451439b3734
15 | ZOMBIE_VILLAGER|NITWIT: ZOMBIE_VILLAGER
16 | ZOMBIE_VILLAGER|NORMAL: e5e08a8776c1764c3fe6a6ddd412dfcb87f41331dad479ac96c21df4bf3ac89c
17 | ZOMBIE_VILLAGER|PRIEST: 528c2bad5389cb3592b565b3c47ecc189e0542a87835028d6148bbe3345645
--------------------------------------------------------------------------------
/extra-textures/pre-jappa-head-textures.txt:
--------------------------------------------------------------------------------
1 | #
2 | # Pre-JAPPA textures (before 1.14 - The Texture Update)
3 | #
4 | # TODO: check for completeness against https://minecraft.wiki/w/Texture_Update#Entities
5 |
6 | BAT|PRE_JAPPA: 9e99deef919db66ac2bd28d6302756ccd57c7f8b12b9dca8f41c3e0a04ac1cc
7 | BLAZE|PRE_JAPPA: b78ef2e4cf2c41a2d14bfde9caff10219f5b1bf5b35a49eb51c6467882cb5f0
8 | # NOTE/TODO: Currently boat head is just oak_planks
9 | BOAT|PRE_JAPPA: f9ab61a927d65506c0bfd00848aa9f210ba16d74bc356a63838ee9507056e22
10 | # NOTE: Cat textures are at the end
11 | CAVE_SPIDER|PRE_JAPPA: 41645dfd77d09923107b3496e94eeb5c30329f97efc96ed76e226e98224
12 | CHICKEN|PRE_JAPPA: 1638469a599ceef7207537603248a9ab11ff591fd378bea4735b346a7fae893
13 | COW|PRE_JAPPA: 7dfa0ac37baba2aa290e4faee419a613cd6117fa568e709d90374753c032dcb0
14 | DONKEY|PRE_JAPPA: 63a976c047f412ebc5cb197131ebef30c004c0faf49d8dd4105fca1207edaff3
15 | ELDER_GUARDIAN|PRE_JAPPA: 8df4fec3aa34ceddb025a42c9fc435a8029b062598b325322ba3cb5e5f351c1f
16 | EVOKER|PRE_JAPPA: xxx
17 | GHAST|PRE_JAPPA: xxx
18 | GHAST|SCREAMING|PRE_JAPPA: xxx
19 | GUARDIAN|PRE_JAPPA: xxx
20 | HORSE|PRE_JAPPA: HORSE|BROWN|PRE_JAPPA
21 | HORSE|BLACK|PRE_JAPPA: 26872e47a583f9cb1af290394b6fc73f75107fe0abfffe2dfe1de23bdaed22a
22 | HORSE|BROWN|PRE_JAPPA: bedf73ea12ce6bd90a4ae9a8d15096749cfe918230dc829b2581d223b1a2a8
23 | HORSE|CHESTNUT|PRE_JAPPA: 9717d71025f7a62c90a333c51663ffeb385a9a0d92af68083c5b045c0524b23f
24 | HORSE|CREAMY|PRE_JAPPA: 1c9011fb5239ec293ffa869edfd74930019d344765e3a7811fd0cc31649982a6
25 | HORSE|DARK_BROWN|PRE_JAPPA: 2661f23fb76624ffbabbda31ca4a38b404fe63ef37d4ba4e4c5441a21e3a6
26 | HORSE|GRAY|PRE_JAPPA: d6676c4d6f0f5ed606a356f3cc5a29d14aafe65721ba1a1a95c5ac4c5e239e5
27 | HORSE|WHITE|PRE_JAPPA: 26872e47a583f9cb1af290394b6fc73f75107fe0abfffe2dfe1de23bdaed22a
28 | HUSK|PRE_JAPPA: d674c63c8db5f4ca628d69a3b1f8a36e29d8fd775e1a6bdb6cabb4be4db121
29 | ILLUSIONER|PRE_JAPPA: 2f2882dd09723e47c0ab9663eab083d6a5969273706110c82910e61bf8a8f07e
30 | IRON_GOLEM|PRE_JAPPA: a561b290be2d3857f5e35ad66810638963383457c32144ef6a379d26db8357b9
31 | LLAMA|PRE_JAPPA: LLAMA|BROWN|PRE_JAPPA
32 | LLAMA|BROWN|PRE_JAPPA: 818cd457fbaf327fa39f10b5b36166fd018264036865164c02d9e5ff53f45
33 | LLAMA|CREAMY|PRE_JAPPA: 2a5f10e6e6232f182fe966f501f1c3799d45ae19031a1e4941b5dee0feff059b
34 | LLAMA|GRAY|PRE_JAPPA: cf24e56fd9ffd7133da6d1f3e2f455952b1da462686f753c597ee82299a
35 | LLAMA|WHITE|PRE_JAPPA: 83d9b5915912ffc2b85761d6adcb428a812f9b83ff634e331162ce46c99e9
36 | MAGMA_CUBE|PRE_JAPPA: c66c34fb6e67362054ac14c480a796bf3717ef531e9982782dc1a3c788d9496b
37 | MINECART|PRE_JAPPA: xxx #
38 | MULE|PRE_JAPPA: xxx
39 | MUSHROOM_COW|PRE_JAPPA: xxx
40 | PIG: 7cdc454eeaa457cef34a89e8b98c28667f81321ee478411773613476236afbe2
41 | PIG|PRE_JAPPA: 621668ef7cb79dd9c22ce3d1f3f4cb6e2559893b6df4a469514e667c16aa4
42 | PIG_ZOMBIE|PRE_JAPPA: 95fb2df754c98b742d35e7b81a1eeac9d37c69fc8cfecd3e91c67983516f
43 | POLAR_BEAR|PRE_JAPPA: cd5d60a4d70ec136a658507ce82e3443cdaa3958d7fca3d9376517c7db4e695d
44 | RABBIT|PRE_JAPPA: xxx #
45 | SHEEP|PRE_JAPPA: xxx #
46 | SKELETON|PRE_JAPPA: 301268e9c492da1f0d88271cb492a4b302395f515a7bbf77f4a20b95fc02eb2
47 | SKELETON_HORSE|PRE_JAPPA: xxx
48 | SLIME|PRE_JAPPA: 895aeec6b842ada8669f846d65bc49762597824ab944f22f45bf3bbb941abe6c
49 | SNOWMAN|PRE_JAPPA: 773bcb94d381fc64eef1d7109ced54742b5358327a78fa9a54c443f696fc08bc
50 | SPIDER|PRE_JAPPA: cd541541daaff50896cd258bdbdd4cf80c3ba816735726078bfe393927e57f1
51 | SQUID|PRE_JAPPA: xxx
52 | STRAY|PRE_JAPPA: 78ddf76e555dd5c4aa8a0a5fc584520cd63d489c253de969f7f22f85a9a2d56
53 | VEX|PRE_JAPPA: 5e7330c7d5cd8a0a55ab9e95321535ac7ae30fe837c37ea9e53bea7ba2de86b
54 | VEX|CHARGING|PRE_JAPPA: 96886cb94f3b382cbc321ab4653581f282ca0841728a478ee9d41a8a3224743
55 | VINDICATOR|PRE_JAPPA: xxx
56 | WITCH|PRE_JAPPA: xxx
57 | WITHER|PRE_JAPPA: cdf74e323ed41436965f5c57ddf2815d5332fe999e68fbb9d6cf5c8bd4139f
58 | WITHER|ARMORED|PRE_JAPPA: 964e1c3e315c8d8fffc37985b6681c5bd16a6f97ffd07199e8a05efbef103793
59 | WITHER|INVULNERABLE|PRE_JAPPA: 3e4f49535a276aacc4dc84133bfe81be5f2a4799a4c04d9a4ddb72d819ec2b2b
60 | WITHER|ARMORED|INVULNERABLE|PRE_JAPPA: ddafb23efc57f251878e5328d11cb0eef87b79c87b254a7ec72296f9363ef7c
61 | WITHER_SKELETON|PRE_JAPPA: 7953b6c68448e7e6b6bf8fb273d7203acd8e1be19e81481ead51f45de59a8
62 | WOLF|PRE_JAPPA: xxx #
63 | WOLF|ANGRY|PRE_JAPPA: xxx
64 | ZOMBIE|PRE_JAPPA: 56fc854bb84cf4b7697297973e02b79bc10698460b51a639c60e5e417734e11
65 | ZOMBIE_HORSE|PRE_JAPPA: xxx
66 | CAT|PRE_JAPPA: xxx #
--------------------------------------------------------------------------------
/localization-rss-pack.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/EvModder/DropHeads/3fa5648aa849f2b72be33f08769e9b6ac81fe755/localization-rss-pack.zip
--------------------------------------------------------------------------------
/plugin.yml:
--------------------------------------------------------------------------------
1 | name: DropHeads
2 | main: net.evmodder.DropHeads.DropHeads
3 | author: EvModder
4 | description: Heads for every mob and player.
5 | website: https://dev.bukkit.org/projects/dropheads
6 | #3=major rewrite
7 | #10=Java8->Java21, entity-settings grouping, config file reorg
8 | #2=uuid instead of name fix, pig/cow/chicken variants
9 | version: 3.10.2
10 | api-version: 1.13
11 | softdepend: [HeadDatabase, Essentials, VanishNoPacket]
12 |
13 | # Hidden config.yml settings:
14 | # use-legacy-head-textures,use-1.19.2-vex-head-textures,use-1.20.2-bat-head-textures
15 |
16 | commands:
17 | spawnhead:
18 | description: Get a player or mob head
19 | usage: /gethead [giveto] [target] [amount]
20 | aliases: [gethead,givehead,getskull,giveskull,dhspawn,phspawn,head,skull]
21 | permission: dropheads.spawn
22 | permission-message: You do not have permission to do this.
23 |
24 | droprate:
25 | description: Check the drop rate for a head
26 | usage: /droprate [new value] [update file]
27 | aliases: [headrate,headdropchance,dhrate,headchance]
28 | permission: dropheads.droprate
29 | permission-message: You do not have permission to do this.
30 |
31 | debug_all_heads:
32 | description: Place all heads into the world around the player
33 | usage: /debug_all_heads
34 | permission: dropheads.debug
35 | permission-message: You do not have permission to do this.
36 |
37 | permissions:
38 | dropheads.canlosehead:
39 | description: Killing this entity can cause their head to drop
40 | default: true
41 |
42 | dropheads.canbehead:
43 | description: This entity will be able to get heads
44 | default: true
45 | children:
46 | dropheads.canbehead.player: true
47 | # dropheads.canbehead.: true
48 |
49 | dropheads.alwaysbehead:
50 | description: Permission to get heads 100% of the time, unless the victim has canlosehead=false
51 | default: false
52 | children:
53 | dropheads.canbehead: true
54 | # dropheads.alwaysbehead.: true
55 |
56 | dropheads.clickinfo:
57 | description: Permission to see info about a head by clicking it
58 | default: true
59 | children:
60 | dropheads.clickinfo.mobs: true
61 | dropheads.clickinfo.players: true
62 | dropheads.clickinfo.hdb: true
63 | # dropheads.clickinfo.unknown: true
64 |
65 | dropheads.clickinfo.mobs:
66 | description: Permission to see info about a mob head by clicking it
67 | default: false
68 |
69 | dropheads.clickinfo.players:
70 | description: Permission to see info about a player head by clicking it
71 | default: false
72 |
73 | dropheads.clickinfo.hdb:
74 | description: Permission to see info about a HeadDatabase head by clicking it
75 | default: false
76 |
77 | dropheads.clickinfo.unknown:
78 | description: Permission to see info about an unknown type head by clicking it
79 | default: false
80 |
81 | dropheads.spawn:
82 | description: Permission to use /spawnhead
83 | default: op
84 | children:
85 | dropheads.spawn.mobs: true
86 | dropheads.spawn.players: true
87 | dropheads.spawn.self: true
88 | dropheads.spawn.code: true
89 | dropheads.spawn.hdb: true
90 | dropheads.spawn.give: true
91 |
92 | dropheads.spawn.mobs:
93 | description: Permission to spawn in mob heads
94 | default: false
95 |
96 | dropheads.spawn.players:
97 | description: Permission to spawn in other players' heads
98 | default: false
99 |
100 | dropheads.spawn.self:
101 | description: Permission to spawn in your own head
102 | default: false
103 |
104 | dropheads.spawn.code:
105 | description: Permission to spawn in heads with custom texture codes
106 | default: false
107 |
108 | dropheads.spawn.hdb:
109 | description: Permission to spawn in HeadDatabase heads
110 | default: false
111 |
112 | dropheads.spawn.give:
113 | description: Permission to spawn heads in other players' inventories
114 | default: false
115 |
116 | dropheads.droprate:
117 | description: Permission to use /droprate
118 | default: op
119 |
120 | dropheads.droprate.edit:
121 | description: Permission to temporarily edit runtime rates with /droprate
122 | default: op
123 |
124 | dropheads.droprate.edit.file:
125 | description: Permission to reconfigured rates with /droprate
126 | default: op
127 |
128 | dropheads.debug:
129 | description: Permission to spawn all the heads in a big cube
130 | default: false
131 |
132 | dropheads.silentbehead:
133 | description: Permission to hide behead messages that you caused from everyone else
134 | default: false
135 | children:
136 | dropheads.silentbehead.vanished: true
137 | dropheads.silentbehead.invisible: true
138 |
139 | # NOTE: Currently supports Essentials and VanishNoPacket
140 | dropheads.silentbehead.vanished:
141 | description: Permission to hide behead messages while vanished
142 | default: true
143 |
144 | dropheads.silentbehead.invisible:
145 | description: Permission to hide behead messages while invisible
146 | default: true
147 |
--------------------------------------------------------------------------------
/src/net/evmodder/DropHeads/LRUCache.java:
--------------------------------------------------------------------------------
1 | package net.evmodder.DropHeads;
2 |
3 | import java.util.HashMap;
4 | import java.util.LinkedList;
5 | import java.util.Map;
6 | import java.util.Queue;
7 |
8 | public class LRUCache{
9 | private final int MAX_SIZE;
10 | private final Map map;
11 | private final Queue fifo;
12 |
13 | public LRUCache(int max_size) {
14 | MAX_SIZE = max_size;
15 | map = new HashMap<>();
16 | fifo = new LinkedList<>();
17 | }
18 | public final V get(K k){
19 | return map.get(k);
20 | }
21 | public final V put(K k, V v){
22 | V old_v = map.put(k, v);
23 | if(old_v == null){// else, move k to end of fifo?
24 | fifo.add(k);
25 | if(fifo.size() > MAX_SIZE) map.remove(fifo.remove());
26 | }
27 | return old_v;
28 | }
29 | }
--------------------------------------------------------------------------------
/src/net/evmodder/DropHeads/NoteblockMode.java:
--------------------------------------------------------------------------------
1 | package net.evmodder.DropHeads;
2 |
3 | enum NoteblockMode{OFF, FALSE, LISTENER, ITEM_META};
--------------------------------------------------------------------------------
/src/net/evmodder/DropHeads/datatypes/AnnounceMode.java:
--------------------------------------------------------------------------------
1 | package net.evmodder.DropHeads.datatypes;
2 |
3 | public enum AnnounceMode {GLOBAL, LOCAL, DIRECT, OFF};
--------------------------------------------------------------------------------
/src/net/evmodder/DropHeads/datatypes/DropMode.java:
--------------------------------------------------------------------------------
1 | package net.evmodder.DropHeads.datatypes;
2 |
3 | public enum DropMode {EVENT, SPAWN, SPAWN_RANDOM, PLACE, PLACE_BY_KILLER, PLACE_BY_VICTIM, GIVE};
--------------------------------------------------------------------------------
/src/net/evmodder/DropHeads/datatypes/NoteblockMode.java:
--------------------------------------------------------------------------------
1 | package net.evmodder.DropHeads.datatypes;
2 |
3 | public enum NoteblockMode{OFF, FALSE, LISTENER, ITEM_META};
--------------------------------------------------------------------------------
/src/net/evmodder/DropHeads/events/BeheadMessageEvent.java:
--------------------------------------------------------------------------------
1 | package net.evmodder.DropHeads.events;
2 |
3 | import org.bukkit.entity.Entity;
4 | import org.bukkit.entity.Player;
5 | import org.bukkit.event.Cancellable;
6 | import org.bukkit.event.Event;
7 | import org.bukkit.event.HandlerList;
8 | import net.evmodder.EvLib.extras.TellrawUtils.Component;
9 |
10 | /** Cancellable event created by the DropHeads plugin when a behead message is sent.
11 | */
12 | public class BeheadMessageEvent extends Event implements Cancellable{
13 | private static final HandlerList HANDLERS = new HandlerList();
14 | /** Static version of getHandlers().
15 | * @return the list of handlers for this event */
16 | public static HandlerList getHandlerList(){return HANDLERS;} // This is actually required for some dumb reason.
17 |
18 | private final Player recipient;
19 | private final Entity victim;
20 | private final Entity killer;
21 | private final boolean isGlobal;
22 | private final boolean isPetDeath;
23 | private Component beheadMessage;
24 | private boolean cancelled = false;
25 |
26 | /** Create an BeheadMessageEvent for DropHeads.
27 | * @param recipient the Player being sent the behead message
28 | * @param victim the Entity which was beheaded
29 | * @param killer the Entity which caused the death of victim
, or null
if no entity was responsible
30 | * @param beheadMessage the message being sent
31 | * @param isGlobal whether the behead message is globally announced
32 | * @param isPetDeath whether the behead message is for a pet
33 | */
34 | public BeheadMessageEvent(final Player recipient, final Entity victim, final Entity killer,
35 | final Component beheadMessage, final boolean isGlobal, final boolean isPetDeath){
36 | this.recipient = recipient;
37 | this.victim = victim;
38 | this.killer = killer;
39 | this.isGlobal = isGlobal;
40 | this.isPetDeath = isPetDeath;
41 | this.beheadMessage = beheadMessage;
42 | }
43 |
44 | /** Get the player who is being sent the behead message.
45 | * For global behead messages, this can be any online player.
46 | * @return the Player recipient
47 | */
48 | public Player getRecipient(){return recipient;}
49 |
50 | /** Get the entity that was beheaded.
51 | * @return the Entity object representing the victim
52 | */
53 | public Entity getVictim(){return victim;}
54 |
55 | /** Get the entity that did the beheading.
56 | * @return the Entity for the killer, or null
if no entity was responsible
57 | */
58 | public Entity getKiller(){return killer;}
59 |
60 | /** Get whether this message is sent to all online players.
61 | * @return whether the behead message is globally announced
62 | */
63 | public boolean isGlobal(){return isGlobal;}
64 |
65 | /** Get whether this is a pet death message sent to their owner.
66 | * @return whether the behead message is for a pet
67 | */
68 | public boolean isPetDeath(){return isPetDeath;}
69 |
70 | /** Get the behead message.
71 | * @return a Component message
72 | */
73 | public Component getMessage(){return beheadMessage;}
74 |
75 | /** Set the behead message.
76 | * @param message the new behead Component message to use
77 | */
78 | public void setMessage(final Component message){beheadMessage = message;}
79 |
80 | /** Get whether this event has been cancelled.
81 | * @return whether the event has been cancelled
82 | */
83 | @Override public boolean isCancelled(){return cancelled;}
84 |
85 | /** Set whether this event should be cancelled.
86 | * @param cancel whether the event should be cancelled
87 | */
88 | @Override public void setCancelled(boolean cancel){cancelled = cancel;}
89 |
90 | /** Get the list of handlers for this event.
91 | * @return the list of handlers for this event
92 | */
93 | @Override public HandlerList getHandlers(){return HANDLERS;}
94 | }
--------------------------------------------------------------------------------
/src/net/evmodder/DropHeads/events/EntityBeheadEvent.java:
--------------------------------------------------------------------------------
1 | package net.evmodder.DropHeads.events;
2 |
3 | import org.bukkit.entity.Entity;
4 | import org.bukkit.event.Cancellable;
5 | import org.bukkit.event.Event;
6 | import org.bukkit.event.HandlerList;
7 | import org.bukkit.event.entity.EntityEvent;
8 | import org.bukkit.inventory.ItemStack;
9 |
10 | /** Cancellable event created by the DropHeads plugin when an entity is beheaded.
11 | */
12 | public class EntityBeheadEvent extends EntityEvent implements Cancellable{
13 | private static final HandlerList HANDLERS = new HandlerList();
14 | /** Static version of getHandlers().
15 | * @return the list of handlers for this event */
16 | public static HandlerList getHandlerList(){return HANDLERS;} // This is actually required for some dumb reason.
17 |
18 | private final Entity victim;
19 | private final Entity killer;
20 | private final Event sourceEvent;
21 | private ItemStack headDrop;
22 | private boolean cancelled = false;
23 | //TODO: private final boolean isVanilla;
24 | //TODO: private final boolean charged creeper kill
25 |
26 | /** Create an EntityBeheadEvent for DropHeads.
27 | * @param victim the Entity being beheaded
28 | * @param killer the Entity doing the beheading (can be null
)
29 | * @param sourceEvent the Event which triggered this EntityBeheadEvent
30 | * @param headDrop the ItemStack used to represent the victim's head
31 | */
32 | public EntityBeheadEvent(final Entity victim, final Entity killer, final Event sourceEvent, final ItemStack headDrop){
33 | super(victim);
34 | this.victim = victim;
35 | this.killer = killer;
36 | this.sourceEvent = sourceEvent;
37 | this.headDrop = headDrop;
38 | }
39 |
40 | /** Get the entity that was beheaded.
41 | * @return the Entity object representing the victim
42 | */
43 | public Entity getVictim(){return victim;}
44 |
45 | /** Get the entity that did the beheading.
46 | * It is possible that this differs from getSourceEvent().getKiller() because
47 | * it can identify non-player killers, projectile sources, etc., if configured.
48 | * Use getSourceEvent().getKiller() if you want the killer as determined by Minecraft.
49 | * @return the Entity object representing the killer, or null if no entity was responsible
50 | */
51 | public Entity getKiller(){return killer;}
52 |
53 | /** Get the entity that was beheaded.
54 | * Same as getVictim().
55 | * @return the Entity object representing the victim
56 | */
57 | @Override public Entity getEntity(){return entity;}
58 |
59 | /** Get the Event which triggered this EntityBeheadEvent (usually an EntityDeathEvent).
60 | * @return a reference to the source event
61 | */
62 | public Event getSourceEvent(){return sourceEvent;}
63 |
64 | /** Get the ItemStack which will result from the beheading.
65 | * @return mutable ItemStack that will be used as the resulting head item if this event is left uncancelled
66 | */
67 | public ItemStack getHeadItem(){return headDrop;}
68 |
69 | /** Set the ItemStack which will result from the beheading.
70 | * @param headDrop The ItemStack to use as the victim's head
71 | */
72 | public void setHeadItem(final ItemStack headDrop){this.headDrop = headDrop;}
73 |
74 | /** Get whether this event has been cancelled.
75 | * @return whether the event has been cancelled
76 | */
77 | @Override public boolean isCancelled(){return cancelled;}
78 |
79 | /** Set whether this event should be cancelled.
80 | * @param cancel whether the event should be cancelled
81 | */
82 | @Override public void setCancelled(boolean cancel){cancelled = cancel;}
83 |
84 | /** Get the list of handlers for this event.
85 | * @return the list of handlers for this event
86 | */
87 | @Override public HandlerList getHandlers(){return HANDLERS;}
88 | }
--------------------------------------------------------------------------------
/src/net/evmodder/DropHeads/events/HeadRollEvent.java:
--------------------------------------------------------------------------------
1 | package net.evmodder.DropHeads.events;
2 |
3 | import org.bukkit.entity.Entity;
4 | import org.bukkit.event.HandlerList;
5 | import org.bukkit.event.entity.EntityEvent;
6 |
7 | /** Event which indicates a head drop roll has occurred and the success/failure has been determined.
8 | * This event allows you to analyze and modify the drop chance success.
9 | * If the success of this event is set to false, no head will be dropped; if it is set to true, a head will be dropped.
10 | */
11 | public class HeadRollEvent extends EntityEvent{
12 | private static final HandlerList HANDLERS = new HandlerList();
13 | /** Static version of getHandlers().
14 | * @return the list of handlers for this event */
15 | public static HandlerList getHandlerList(){return HANDLERS;} // This is actually required for some dumb reason.
16 |
17 | private final Entity killer;
18 | private final Entity victim;
19 | private final double dropChance, dropRoll;
20 | private boolean dropSuccess;
21 |
22 | /** Create a HeadRollEvent for DropHeads.
23 | * @param killer the Entity doing the beheading
24 | * @param victim the Entity being beheaded
25 | * @param dropChance the configured droprate for the victim's head, between 0 and 1 inclusive
26 | * @param dropRoll the PRNG double drop roll value, between 0 and 1 inclusive
27 | * @param dropSuccess whether the drop roll was determined successful
28 | */
29 | public HeadRollEvent(final Entity killer, final Entity victim, final double dropChance, final double dropRoll, final boolean dropSuccess){
30 | super(victim);
31 | this.killer = killer;
32 | this.victim = victim;
33 | this.dropChance = dropChance;
34 | this.dropRoll = dropRoll;
35 | this.dropSuccess = dropSuccess;
36 | }
37 |
38 | /** Get the entity that may have done the beheading.
39 | * @return the Entity object representing the killer, or null if no entity was responsible
40 | */
41 | public Entity getKiller(){return killer;}
42 |
43 | /** Get the entity that may have been beheaded.
44 | * @return the Entity object representing the victim
45 | */
46 | public Entity getVictim(){return victim;}
47 |
48 | /** Get the entity that may have been beheaded.
49 | * @return the Entity object representing the victim
50 | */
51 | @Override public Entity getEntity(){return entity;}
52 |
53 | /** Get the configured droprate for the victim's head, between 0 and 1 inclusive.
54 | * @return the droprate
55 | */
56 | public double getDropChance(){return dropChance;}
57 |
58 | /** Get the PRNG value of the drop roll, uniform between 0 and 1 inclusive.
59 | * When this value is lower than the droprate, the roll is successful.
60 | * Success of a roll can be later modified by listeners of the event
61 | * @return the drop roll value in the range [0, 1]
62 | */
63 | public double getDropRoll(){return dropRoll;}
64 |
65 | /** Get whether the effective drop roll was determined to be a success.
66 | * @return the success of the drop roll
67 | */
68 | public boolean getDropSuccess(){return dropSuccess;}
69 |
70 | /** Set whether the drop roll should be considered a success.
71 | * @param success whether the head drop will succeed or fail
72 | */
73 | public void setDropSuccess(final boolean success){dropSuccess = success;}
74 |
75 | /** Get the list of handlers for this event.
76 | * @return the list of handlers for this event
77 | */
78 | @Override public HandlerList getHandlers(){return HANDLERS;}
79 | }
80 |
--------------------------------------------------------------------------------
/src/net/evmodder/DropHeads/listeners/CreativeMiddleClickListener.java:
--------------------------------------------------------------------------------
1 | package net.evmodder.DropHeads.listeners;
2 |
3 | import org.bukkit.block.Block;
4 | import org.bukkit.block.Skull;
5 | import org.bukkit.event.EventHandler;
6 | import org.bukkit.event.Listener;
7 | import org.bukkit.event.inventory.ClickType;
8 | import org.bukkit.event.inventory.InventoryAction;
9 | import org.bukkit.event.inventory.InventoryClickEvent;
10 | import org.bukkit.event.inventory.InventoryType.SlotType;
11 | import org.bukkit.inventory.ItemStack;
12 | import com.mojang.authlib.GameProfile;
13 | import net.evmodder.DropHeads.DropHeads;
14 | import net.evmodder.EvLib.extras.HeadUtils;
15 |
16 | public class CreativeMiddleClickListener implements Listener{
17 | // This listener is only registered when 'fix-creative-nbt-copy' = true
18 |
19 | @SuppressWarnings("deprecation")
20 | @EventHandler(ignoreCancelled = true)
21 | public void onInventoryCreativeEvent(InventoryClickEvent evt){
22 | if(evt.getAction() == InventoryAction.PLACE_ALL && evt.getClick() == ClickType.CREATIVE && evt.getSlotType() == SlotType.QUICKBAR
23 | && evt.getCursor() != null && HeadUtils.isPlayerHead(evt.getCursor().getType())){
24 |
25 | final Block headBlock = evt.getWhoClicked().getTargetBlockExact(10);
26 | if(headBlock != null && HeadUtils.isPlayerHead(headBlock.getType())){
27 | final ItemStack itemWithAddedLore = LoreStoreBlockBreakListener.getItemWithLore(headBlock);
28 | if(itemWithAddedLore != null){ // Only used when 'save-custom-lore' = true
29 | evt.setCursor(itemWithAddedLore);
30 | }
31 | else{
32 | final GameProfile profile = HeadUtils.getGameProfile((Skull)headBlock.getState());
33 | final ItemStack headItem = DropHeads.getPlugin().getAPI().getHead(profile);
34 | if(headItem != null) evt.setCursor(headItem);
35 | }
36 | }
37 | }
38 | }
39 | }
--------------------------------------------------------------------------------
/src/net/evmodder/DropHeads/listeners/EndermanProvokeListener.java:
--------------------------------------------------------------------------------
1 | package net.evmodder.DropHeads.listeners;
2 |
3 | import java.util.HashSet;
4 | import org.bukkit.entity.EntityType;
5 | import org.bukkit.event.EventHandler;
6 | import org.bukkit.event.Listener;
7 | import org.bukkit.event.entity.EntityDamageByEntityEvent;
8 | import org.bukkit.event.entity.EntityTargetEvent.TargetReason;
9 | import org.bukkit.event.entity.EntityTargetLivingEntityEvent;
10 | import org.bukkit.inventory.ItemStack;
11 | import org.bukkit.inventory.meta.SkullMeta;
12 | import com.mojang.authlib.GameProfile;
13 | import net.evmodder.DropHeads.DropHeads;
14 | import net.evmodder.EvLib.extras.HeadUtils;
15 |
16 | public class EndermanProvokeListener implements Listener{
17 | private final DropHeads pl;
18 | private final HashSet camouflageHeads;
19 | private final boolean ALL_HEADS_ARE_CAMOFLAGE;
20 |
21 | public EndermanProvokeListener(){
22 | pl = DropHeads.getPlugin();
23 | camouflageHeads = new HashSet();
24 | pl.getConfig().getStringList("endermen-camouflage-heads").forEach(eName -> {
25 | try{
26 | camouflageHeads.add(EntityType.valueOf(eName.toUpperCase().replace("ALL", "UNKNOWN").replace("DEFAULT", "UNKNOWN")
27 | .replace("ENDERMEN", "ENDERMAN")));
28 | }
29 | catch(IllegalArgumentException ex){pl.getLogger().severe("Unknown entity type in 'endermen-camouflage-heads': "+eName);}
30 | });
31 | ALL_HEADS_ARE_CAMOFLAGE = camouflageHeads.contains(EntityType.UNKNOWN);
32 | }
33 |
34 | private EntityType getEntityTypeFromHead(ItemStack head){
35 | if(head == null || !HeadUtils.isHead(head.getType())) return null;
36 | if(!HeadUtils.isPlayerHead(head.getType())) return HeadUtils.getEntityFromHead(head.getType());
37 | final GameProfile profile = HeadUtils.getGameProfile((SkullMeta)head.getItemMeta());
38 | if(profile != null){
39 | final String textureKey = pl.getAPI().getTextureKey(profile);
40 | final int idx = textureKey.indexOf('|');
41 | final String eTypeName = (idx == -1 ? textureKey : textureKey.substring(0, idx)).toUpperCase();
42 | try{return EntityType.valueOf(eTypeName);} catch(IllegalArgumentException ex){}
43 | }
44 | return null;
45 | }
46 |
47 | @EventHandler public void entityTargetEntityEvent(EntityTargetLivingEntityEvent evt){
48 | if(evt.getEntityType() == EntityType.ENDERMAN && evt.getTarget() != null && evt.getTarget().getType() == EntityType.PLAYER
49 | && evt.getReason() == TargetReason.CLOSEST_PLAYER
50 | && (evt.getEntity().getLastDamageCause() == null
51 | || !(evt.getEntity().getLastDamageCause() instanceof EntityDamageByEntityEvent
52 | || !((EntityDamageByEntityEvent)evt.getEntity().getLastDamageCause()).getDamager().getUniqueId().equals(evt.getTarget().getUniqueId()))
53 | ) && (ALL_HEADS_ARE_CAMOFLAGE || camouflageHeads.contains(getEntityTypeFromHead(evt.getTarget().getEquipment().getHelmet())))
54 | ){
55 | evt.setCancelled(true);
56 | }
57 | }
58 | }
--------------------------------------------------------------------------------
/src/net/evmodder/DropHeads/listeners/EntityDamageListener.java:
--------------------------------------------------------------------------------
1 | package net.evmodder.DropHeads.listeners;
2 |
3 | import org.bukkit.entity.Player;
4 | import org.bukkit.entity.Projectile;
5 | import org.bukkit.event.EventHandler;
6 | import org.bukkit.event.EventPriority;
7 | import org.bukkit.event.Listener;
8 | import org.bukkit.event.entity.EntityDamageByEntityEvent;
9 | import org.bukkit.metadata.FixedMetadataValue;
10 | import net.evmodder.DropHeads.DropHeads;
11 | import net.evmodder.DropHeads.datatypes.EntitySetting;
12 |
13 | //Only enabled if drop-for-indirect-kills:TRUE && drop-for-nonplayer-kills:FALSE
14 | public class EntityDamageListener implements Listener{
15 | private final DropHeads pl;
16 | private final EntitySetting allowNonPlayerKills, allowIndirectPlayerKills, allowProjectileKills;
17 |
18 | public EntityDamageListener(
19 | EntitySetting allowNonPlayerKills, EntitySetting allowIndirectPlayerKills, EntitySetting allowProjectileKills){
20 | this.allowNonPlayerKills = allowNonPlayerKills;
21 | this.allowIndirectPlayerKills = allowIndirectPlayerKills;
22 | this.allowProjectileKills = allowProjectileKills;
23 | pl = DropHeads.getPlugin();
24 | }
25 | @EventHandler(priority = EventPriority.HIGH, ignoreCancelled = true)
26 | public void entityDamageEvent(EntityDamageByEntityEvent evt){
27 | if(allowNonPlayerKills.get(evt.getEntity()) || !allowIndirectPlayerKills.get(evt.getEntity())) return;
28 | if(evt.getDamager() instanceof Player == false &&
29 | !(allowProjectileKills.get(evt.getEntity()) && evt.getDamager() instanceof Projectile proj && proj.getShooter() instanceof Player)) return;
30 |
31 | pl.getLogger().warning("entity dmged by player: "+evt.getEntityType());
32 | evt.getEntity().setMetadata("PlayerDamage", new FixedMetadataValue(pl, System.currentTimeMillis()));
33 | }
34 | }
--------------------------------------------------------------------------------
/src/net/evmodder/DropHeads/listeners/EntitySpawnListener.java:
--------------------------------------------------------------------------------
1 | package net.evmodder.DropHeads.listeners;
2 |
3 | import java.io.InputStream;
4 | import java.util.HashMap;
5 | import java.util.Map;
6 | import org.bukkit.event.EventHandler;
7 | import org.bukkit.event.EventPriority;
8 | import org.bukkit.event.HandlerList;
9 | import org.bukkit.event.Listener;
10 | import org.bukkit.event.entity.CreatureSpawnEvent;
11 | import org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason;
12 | import org.bukkit.metadata.FixedMetadataValue;
13 | import net.evmodder.DropHeads.DropHeads;
14 | import net.evmodder.DropHeads.JunkUtils;
15 | import net.evmodder.EvLib.FileIO;
16 |
17 | public class EntitySpawnListener implements Listener{
18 | private final DropHeads pl;
19 | private final Map spawnMultipliers;
20 | private final boolean WARN_FOR_UNKNOWN_SPAWN_REASON = false;
21 |
22 | public EntitySpawnListener(){
23 | pl = DropHeads.getPlugin();
24 | spawnMultipliers = new HashMap<>();
25 |
26 | final InputStream defaultSpawnMults = pl.getClass().getResourceAsStream("/configs/spawn-cause-multipliers.txt");
27 | final String multipliers = FileIO.loadFile("spawn-cause-multipliers.txt", defaultSpawnMults);
28 | for(String line : multipliers.split("\n")){
29 | line = line.replace(" ", "").replace("\t", "").toUpperCase();
30 | final int i = line.indexOf(":");
31 | if(i != -1){
32 | try{
33 | final SpawnReason reason = SpawnReason.valueOf(line.substring(0, i));
34 | final Float mult = Float.parseFloat(line.substring(i+1));
35 | if(Math.abs(1F - mult) > 0.0001) spawnMultipliers.put(reason, mult);
36 | }
37 | catch(IllegalArgumentException ex){
38 | if(WARN_FOR_UNKNOWN_SPAWN_REASON) pl.getLogger().warning("Unknown SpawnReason: '"+line+"' in config file!");
39 | }
40 | }
41 | }
42 | if(spawnMultipliers.isEmpty()) HandlerList.unregisterAll(this);
43 | }
44 |
45 | @EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
46 | public void creatureSpawnEvent(CreatureSpawnEvent evt){
47 | if(evt.getSpawnReason() == null) return;
48 |
49 | final Float mult = spawnMultipliers.get(evt.getSpawnReason());
50 | if(mult == null) return;
51 |
52 | evt.getEntity().setMetadata(JunkUtils.SPAWN_CAUSE_MULTIPLIER_KEY, new FixedMetadataValue(pl, mult));
53 | evt.getEntity().addScoreboardTag(JunkUtils.SPAWN_CAUSE_MULTIPLIER_KEY+'_'+mult);
54 | }
55 | }
--------------------------------------------------------------------------------
/src/net/evmodder/DropHeads/listeners/GiveCommandPreprocessListener.txt:
--------------------------------------------------------------------------------
1 | package net.evmodder.DropHeads.listeners;
2 |
3 | import java.util.UUID;
4 | import org.bukkit.NamespacedKey;
5 | import org.bukkit.event.EventHandler;
6 | import org.bukkit.event.Listener;
7 | import org.bukkit.event.player.PlayerCommandPreprocessEvent;
8 | import org.bukkit.inventory.ItemStack;
9 | import net.evmodder.DropHeads.DropHeads;
10 | import net.evmodder.EvLib.extras.WebUtils;
11 |
12 | public class GiveCommandPreprocessListener implements Listener{
13 | private final DropHeads pl;
14 |
15 | class CustomHeadItemStack extends ItemStack{
16 | CustomHeadItemStack(ItemStack item){
17 | super(item);
18 | }
19 | }
20 |
21 | public GiveCommandPreprocessListener(){
22 | pl = DropHeads.getPlugin();
23 | //registerCustomHeadItemStack();
24 | new NamespacedKey(pl, "vex_head");
25 | }
26 |
27 | @EventHandler
28 | public void onGiveCommandPreprocess(PlayerCommandPreprocessEvent evt){
29 | final String cmd = evt.getMessage().toLowerCase();
30 | if(cmd.startsWith("/give ") || cmd.startsWith("/minecraft:give ")){
31 | UUID uuid = UUID.nameUUIDFromBytes("VEX".getBytes());// Stable UUID for this textureKey
32 | String newCmd = evt.getMessage().replaceAll("(?i) "+pl.getAPI().getDropHeadsNamespacedKey()+"vex_head ", " minecraft:player_head{"
33 | //TODO: proper display name (translated bits) and lore (&8mob:)
34 | + "display:{Name:\"{\\\\\"text\\\\\":\\\\\"Vex Head\\\\\",\\\\\"italic\\\\\":false}\"},"
35 | + "SkullOwner:{Id:"+WebUtils.convertUUIDToIntArray(uuid)+","
36 | //+ "SkullOwner:{Id:[I;-130297919,34818391,-2003905566,-85519869],"
37 | + "Name:\"VEX\","
38 | + "Properties:{textures:[{Value:\""+DropHeads.getPlugin().getAPI().getTextures().get("VEX")+"\"}]}}}"
39 | + " "
40 | );
41 | if(!newCmd.equals(evt.getMessage())){
42 | evt.setMessage(newCmd);
43 | }
44 | }
45 | }
46 | }
--------------------------------------------------------------------------------
/src/net/evmodder/DropHeads/listeners/ItemDropListener.java:
--------------------------------------------------------------------------------
1 | package net.evmodder.DropHeads.listeners;
2 |
3 | import java.util.List;
4 | import org.bukkit.ChatColor;
5 | import org.bukkit.event.EventHandler;
6 | import org.bukkit.event.Listener;
7 | import org.bukkit.event.entity.ItemSpawnEvent;
8 | import org.bukkit.inventory.ItemStack;
9 | import org.bukkit.inventory.meta.ItemMeta;
10 | import org.bukkit.inventory.meta.SkullMeta;
11 | import com.mojang.authlib.GameProfile;
12 | import net.evmodder.DropHeads.DropHeads;
13 | import net.evmodder.DropHeads.JunkUtils;
14 | import net.evmodder.EvLib.extras.HeadUtils;
15 | import net.evmodder.EvLib.extras.TellrawUtils;
16 | import net.evmodder.EvLib.extras.TellrawUtils.Component;
17 |
18 | public class ItemDropListener implements Listener{
19 | private final DropHeads pl;
20 | private final boolean /*TEXTURE_UPDATE, */FORCE_NAME_UPDATE, FORCE_LORE_UPDATE, TYPE_UPDATE;
21 | private final boolean SAVE_TYPE_IN_LORE;
22 |
23 | public ItemDropListener(){
24 | pl = DropHeads.getPlugin();
25 | //FORCE_TEXTURE_UPDATE = pl.getConfig().getBoolean("refresh-textures", false);
26 | FORCE_NAME_UPDATE = pl.getConfig().getBoolean("refresh-item-names", false);
27 | FORCE_LORE_UPDATE = pl.getConfig().getBoolean("refresh-item-lores", false) && !pl.getConfig().getBoolean("save-custom-lore", true);
28 | TYPE_UPDATE = pl.getConfig().getBoolean("update-piglin-heads", true);
29 | SAVE_TYPE_IN_LORE = pl.getConfig().getBoolean("show-head-type-in-lore", false);
30 | }
31 |
32 | private boolean hasCustomLore(ItemMeta meta){
33 | if(!meta.hasLore()) return false;
34 | if(!SAVE_TYPE_IN_LORE) return true;
35 | if(meta.getLore().size() == 1 && ChatColor.stripColor(meta.getLore().get(0)).matches("\\w+:\\w+")) return false;
36 | return true;
37 | }
38 |
39 | private boolean hasCustomName(ItemMeta meta, GameProfile profile){
40 | if(!meta.hasDisplayName()) return false;
41 | if(profile.getName() == null) return true; // why return true?
42 |
43 | String textureKey = pl.getAPI().getTextureKey(profile);
44 | final String customName;
45 | if(textureKey == null){textureKey = "PLAYER"; customName = profile.getName();}
46 | else customName = "";//todo?
47 |
48 | final String expectedName = ChatColor.stripColor(pl.getInternalAPI().getFullHeadNameFromKey(textureKey, customName).toPlainText());
49 | final String actualName = ChatColor.stripColor(meta.getDisplayName());
50 | return !expectedName.equals(actualName);
51 | }
52 |
53 | @EventHandler(ignoreCancelled = true)
54 | public void onBarf(ItemSpawnEvent evt){
55 | if(!HeadUtils.isPlayerHead(evt.getEntity().getItemStack().getType()) || !evt.getEntity().getItemStack().hasItemMeta()
56 | || pl.getInternalAPI().isHeadDatabaseHead(evt.getEntity().getItemStack())) return;
57 |
58 | ItemStack originalItem = evt.getEntity().getItemStack();
59 | final SkullMeta originalMeta = (SkullMeta) originalItem.getItemMeta();
60 | final GameProfile originalProfile = HeadUtils.getGameProfile(originalMeta);
61 | if(originalProfile == null) return;
62 | final ItemStack refreshedItem = pl.getAPI().getHead(originalProfile); // Gets a refreshed texture by textureKey (profile name)
63 | if(refreshedItem == null) return;
64 | //if(FORCE_TEXTURE_UPDATE){
65 | final GameProfile refreshedProfile = HeadUtils.getGameProfile((SkullMeta)refreshedItem.getItemMeta());
66 | HeadUtils.setGameProfile(originalMeta, refreshedProfile); // This refreshes the texture
67 | //}
68 | if(TYPE_UPDATE && originalItem.getType() != refreshedItem.getType()) originalItem.setType(refreshedItem.getType());
69 |
70 | // if(!originalMeta.hasDisplayName() || FORCE_NAME_UPDATE) originalMeta.setDisplayName(refreshedItem.getItemMeta().getDisplayName());
71 | // if(!hasCustomLore(originalMeta) || FORCE_LORE_UPDATE) originalMeta.setLore(refreshedItem.getItemMeta().getLore());
72 | originalItem.setItemMeta(originalMeta);
73 |
74 | if(!hasCustomName(originalMeta, originalProfile) || FORCE_NAME_UPDATE){
75 | if(refreshedItem.getItemMeta().hasDisplayName()){
76 | originalItem = JunkUtils.setDisplayName(originalItem, TellrawUtils.parseComponentFromString(JunkUtils.getDisplayName(refreshedItem)));
77 | }
78 | else{
79 | final ItemMeta meta = originalItem.getItemMeta();
80 | meta.setDisplayName(null);
81 | originalItem.setItemMeta(meta);
82 | }
83 | }
84 | if(!hasCustomLore(originalMeta) || FORCE_LORE_UPDATE){
85 | if(refreshedItem.getItemMeta().hasLore()){
86 | final List lores = JunkUtils.getLore(refreshedItem);
87 | final Component[] loreComps = new Component[lores.size()];
88 | for(int i=0; i lore = null;
36 | GameProfile profileWithoutLore = null;
37 | if(profile.getProperties() != null && profile.getProperties().containsKey(JunkUtils.DH_LORE_KEY)){
38 | final Collection props = profile.getProperties().get(JunkUtils.DH_LORE_KEY);
39 | if(props != null && !props.isEmpty()){
40 | if(props.size() != 1) DropHeads.getPlugin().getLogger().warning("Multiple lore keys on a single head profile in getItemWithLore()");
41 | lore = Arrays.asList(JunkUtils.getPropertyValue(props.iterator().next()).split("\\n"));
42 | profileWithoutLore = new GameProfile(profile.getId(), profile.getName());
43 | profileWithoutLore.getProperties().putAll(profile.getProperties());
44 | profileWithoutLore.getProperties().removeAll(JunkUtils.DH_LORE_KEY);
45 | }
46 | }
47 | if(lore == null){
48 | if(profile.getName() == null) return null;
49 | final int loreStart = profile.getName().indexOf('>');
50 | if(loreStart == -1) return null;
51 | lore = Arrays.asList(profile.getName().substring(loreStart + 1).split("\\n", -1));
52 | profileWithoutLore = new GameProfile(profile.getId(), profile.getName().substring(0, loreStart));
53 | profileWithoutLore.getProperties().putAll(profile.getProperties());
54 | }
55 | ItemStack headItem = DropHeads.getPlugin().getAPI().getHead(profileWithoutLore);
56 | if(lore.size() > 1 || (lore.size() == 1 && !lore.get(0).isEmpty())){
57 | final Component[] loreComps = new Component[lore.size()];
58 | for(int i=0; i customLore = JunkUtils.getLore(headItem);
40 | if(customLore == null) return;
41 | if(HAS_DEFAULT_LORE){
42 | final List defaultLore = JunkUtils.getLore(DropHeads.getPlugin().getAPI().getHead(profile));
43 | if(customLore.equals(defaultLore)) return; // Nothing to save!
44 | }
45 | final String combinedLore = String.join("\n", customLore);
46 |
47 | profile.getProperties().put(JunkUtils.DH_LORE_KEY, new Property(JunkUtils.DH_LORE_KEY, combinedLore));
48 | final Skull skull = (Skull)evt.getBlockPlaced().getState();
49 | HeadUtils.setGameProfile(skull, profile);
50 | skull.update(true);
51 | }
52 | }
--------------------------------------------------------------------------------
/src/net/evmodder/DropHeads/listeners/NoteblockPlayListener.java:
--------------------------------------------------------------------------------
1 | package net.evmodder.DropHeads.listeners;
2 |
3 | import java.util.HashMap;
4 | import org.bukkit.Material;
5 | import org.bukkit.Sound;
6 | import org.bukkit.SoundCategory;
7 | import org.bukkit.block.Block;
8 | import org.bukkit.block.BlockFace;
9 | import org.bukkit.block.Skull;
10 | import org.bukkit.event.EventHandler;
11 | import org.bukkit.event.Listener;
12 | import org.bukkit.event.block.NotePlayEvent;
13 | import com.mojang.authlib.GameProfile;
14 | import net.evmodder.DropHeads.DropHeads;
15 | import net.evmodder.DropHeads.JunkUtils;
16 | import net.evmodder.EvLib.extras.HeadUtils;
17 |
18 | public class NoteblockPlayListener implements Listener{
19 | private final HashMap nbSounds;
20 |
21 | public NoteblockPlayListener(){
22 | nbSounds = JunkUtils.getNoteblockSounds();
23 | }
24 |
25 | /*public Sound getAmbientSound(String eType){
26 | switch(eType){
27 | case "ALLAY":
28 | return Sound.valueOf("ENTITY_ALLAY_AMBIENT_WITHOUT_ITEM");
29 | case "ARMOR_STAND":
30 | return Sound.ENTITY_ARMOR_STAND_PLACE;
31 | case "LEASH_HITCH":
32 | return Sound.ENTITY_LEASH_KNOT_PLACE;
33 | case "GIANT":
34 | return Sound.ENTITY_ZOMBIE_AMBIENT;
35 | case "COD":
36 | return Sound.ENTITY_COD_FLOP;
37 | case "SALMON":
38 | return Sound.ENTITY_SALMON_FLOP;
39 | case "PUFFERFISH":
40 | return Sound.ENTITY_PUFFER_FISH_FLOP;
41 | case "TROPICAL_FISH":
42 | return Sound.ENTITY_TROPICAL_FISH_FLOP;
43 | case "MINECART":
44 | case "MINECART_CHEST":
45 | case "MINECART_COMMAND":
46 | case "MINECART_FURNACE":
47 | case "MINECART_HOPPER":
48 | case "MINECART_MOB_SPAWNER":
49 | case "MINECART_TNT":
50 | return Sound.ENTITY_MINECART_RIDING;
51 | case "SNIFFER":
52 | return Sound.valueOf("ENTITY_SNIFFER_IDLE");
53 | case "TADPOLE":
54 | return Sound.valueOf("ENTITY_TADPOLE_FLOP");
55 | case "TURTLE":
56 | return Sound.ENTITY_TURTLE_AMBIENT_LAND;
57 | case "CAVE_SPIDER":
58 | return Sound.ENTITY_SPIDER_AMBIENT;
59 | case "CREEPER":
60 | return Sound.ENTITY_CREEPER_PRIMED;
61 | case "SLIME":
62 | return Sound.ENTITY_SLIME_HURT;
63 | case "SNOWMAN":
64 | return Sound.ENTITY_SNOW_GOLEM_AMBIENT;
65 | case "MAGMA_CUBE":
66 | return Sound.ENTITY_MAGMA_CUBE_HURT;
67 | case "MUSHROOM_COW":
68 | return Sound.ENTITY_COW_AMBIENT;
69 | case "AXOLOTL":
70 | return Sound.valueOf("ENTITY_AXOLOTL_IDLE_AIR"); //TODO: ENTITY_AXOLOTL_IDLE_WATER?
71 | case "TRADER_LLAMA":
72 | return Sound.ENTITY_LLAMA_AMBIENT;
73 | case "IRON_GOLEM":
74 | return Sound.ENTITY_IRON_GOLEM_HURT;
75 | case "BEE":
76 | return Sound.valueOf("ENTITY_BEE_LOOP");
77 | case "BEE|ANGRY":
78 | return Sound.valueOf("ENTITY_BEE_LOOP_AGGRESSIVE");
79 | case "BOAT":
80 | case "CHEST_BOAT":
81 | return Sound.ENTITY_BOAT_PADDLE_WATER;
82 | case "UNKNOWN":
83 | return Sound.AMBIENT_CAVE;
84 | default:
85 | return Sound.valueOf("ENTITY_"+eType+"_AMBIENT");
86 | }
87 | }*/
88 |
89 | @EventHandler(ignoreCancelled = true)
90 | public void onNoteblockPlay(NotePlayEvent evt){
91 | final Block nb = evt.getBlock();
92 | // if(nb.getY() >= nb.getWorld().getMaxHeight() || nb.getRelative(BlockFace.UP).getType() != Material.PLAYER_HEAD) return;
93 | if(nb.getY() >= nb.getWorld().getMaxHeight() || !HeadUtils.isHead(nb.getRelative(BlockFace.UP).getType())) return;
94 | final Skull skull = (Skull) nb.getRelative(BlockFace.UP).getState();
95 | if(skull.getType().name().endsWith("_WALL_HEAD")) return;
96 |
97 | String textureKey;
98 | if(skull.getType() == Material.PLAYER_HEAD){
99 | final GameProfile profile = HeadUtils.getGameProfile(skull);
100 | textureKey = DropHeads.getPlugin().getAPI().getTextureKey(profile);
101 | if(textureKey == null) return;
102 | }
103 | else textureKey = HeadUtils.getEntityFromHead(skull.getType()).name();
104 | Sound sound;
105 | int endIdx;
106 | while((sound=nbSounds.get(textureKey)) == null && (endIdx=textureKey.lastIndexOf('|')) != -1) textureKey = textureKey.substring(0, endIdx);
107 | if(sound == null){
108 | try{
109 | //sound = getAmbientSound(textureKey);
110 | sound = Sound.valueOf("ENTITY_"+textureKey+"_AMBIENT");
111 | }
112 | catch(IllegalArgumentException ex){
113 | DropHeads.getPlugin().getLogger().warning("Unable to find noteblock sound for entity: "+textureKey);
114 | if((sound=nbSounds.get("UNKNOWN")) == null) return;
115 | }
116 | }
117 | // Got a sound, now play it
118 | final float volume = (textureKey.equals("GIANT") && sound.name().equals("ENTITY_ZOMBIE_AMBIENT")) ? 3f : 1f;
119 | nb.getWorld().playSound(nb.getLocation(), sound, SoundCategory.RECORDS, volume, /*pitch=*/1f);
120 | // Cancel the sound that would have played
121 | evt.setCancelled(true);
122 | }
123 | }
--------------------------------------------------------------------------------
/src/net/evmodder/DropHeads/listeners/ProjectileFireListener.java:
--------------------------------------------------------------------------------
1 | package net.evmodder.DropHeads.listeners;
2 |
3 | import org.bukkit.Material;
4 | import org.bukkit.entity.LivingEntity;
5 | import org.bukkit.entity.Player;
6 | import org.bukkit.event.EventHandler;
7 | import org.bukkit.event.EventPriority;
8 | import org.bukkit.event.Listener;
9 | import org.bukkit.event.entity.EntityShootBowEvent;
10 | import org.bukkit.event.entity.ProjectileLaunchEvent;
11 | import org.bukkit.inventory.ItemStack;
12 | import org.bukkit.metadata.FixedMetadataValue;
13 | import net.evmodder.DropHeads.DropHeads;
14 |
15 | public class ProjectileFireListener implements Listener{
16 | private final DropHeads pl;
17 | private final boolean ALLOW_NON_PLAYER_KILLS;
18 |
19 | public ProjectileFireListener(boolean ALLOW_NON_PLAYER_KILLS){
20 | this.ALLOW_NON_PLAYER_KILLS = ALLOW_NON_PLAYER_KILLS;
21 | pl = DropHeads.getPlugin();
22 | }
23 |
24 | private boolean canShootProjectiles(Material type){
25 | switch(type.name()){
26 | // TODO: This list is incomplete, but should include all projectiles that trigger an EntityDamageEvent
27 | case "BOW":
28 | case "CROSS_BOW":
29 | case "TRIDENT":
30 | case "FIRE_CHARGE":
31 | case "SNOWBALL":
32 | case "SPLASH_POTION":
33 | case "LINGERING_POTION":
34 | case "FISHING_ROD":
35 | case "EGG":
36 | return true;
37 | default:
38 | return false;
39 | }
40 | }
41 |
42 | @EventHandler(priority = EventPriority.HIGH, ignoreCancelled = true)
43 | public void onProjectileLaunch(ProjectileLaunchEvent evt){
44 | if(evt.getEntity().getShooter() instanceof LivingEntity shooter){
45 | // Skip if already has metadata (defers to EntityShootBowEvent)
46 | if(evt.getEntity().hasMetadata("ShotUsing")) return;
47 | if(!ALLOW_NON_PLAYER_KILLS && evt.getEntity().getShooter() instanceof Player == false) return;
48 |
49 | final ItemStack mainHandItem = shooter.getEquipment().getItemInMainHand();
50 | final ItemStack offHandItem = shooter.getEquipment().getItemInOffHand();
51 | if((mainHandItem == null || !canShootProjectiles(mainHandItem.getType())) && offHandItem != null && canShootProjectiles(offHandItem.getType())){
52 | evt.getEntity().setMetadata("ShotUsing", new FixedMetadataValue(pl, offHandItem));
53 | }
54 | else if(mainHandItem != null){
55 | evt.getEntity().setMetadata("ShotUsing", new FixedMetadataValue(pl, mainHandItem));
56 | }
57 | }
58 | }
59 |
60 | @EventHandler(priority = EventPriority.HIGH, ignoreCancelled = true)
61 | public void onEntityShootBow(EntityShootBowEvent evt){
62 | if(!ALLOW_NON_PLAYER_KILLS && evt.getEntity() instanceof Player == false) return;
63 | // This event is more reliable than ProjectileLaunchEvent, so override any existing metadata
64 | evt.getProjectile().removeMetadata("ShotUsing", pl);
65 | evt.getProjectile().setMetadata("ShotUsing", new FixedMetadataValue(pl, evt.getBow()));
66 | }
67 | }
--------------------------------------------------------------------------------