-
Notifications
You must be signed in to change notification settings - Fork 6
/
MaterialInstrument.java
30 lines (23 loc) · 1.14 KB
/
MaterialInstrument.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
package com.denizenscript.clientizen.objects.properties.material;
import com.denizenscript.clientizen.objects.properties.material.internal.MaterialEnumProperty;
import net.minecraft.state.property.EnumProperty;
import net.minecraft.state.property.Properties;
public class MaterialInstrument extends MaterialEnumProperty {
// <--[property]
// @object MaterialTag
// @name instrument
// @input ElementTag
// @description
// The instrument played by a note block, see <@link url https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Instrument.html>
// -->
public static final EnumProperty<?>[] handledProperties = {Properties.INSTRUMENT};
enum BukkitInstruments implements EnumStringIdentifiable {
PIANO, BASS_DRUM, SNARE_DRUM, STICKS, BASS_GUITAR, FLUTE, BELL, GUITAR, CHIME, XYLOPHONE, IRON_XYLOPHONE, COW_BELL, DIDGERIDOO, BIT, BANJO, PLING, ZOMBIE, SKELETON, CREEPER, DRAGON, WITHER_SKELETON, PIGLIN, CUSTOM_HEAD;
}
static {
convertEnum(Properties.INSTRUMENT, BukkitInstruments.class);
}
public static void register() {
autoRegister("instrument", MaterialInstrument.class);
}
}