-
-
Notifications
You must be signed in to change notification settings - Fork 104
/
PropertyRegistry.java
146 lines (138 loc) · 10.1 KB
/
PropertyRegistry.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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
package com.denizenscript.denizen.objects.properties;
import com.denizenscript.denizen.objects.*;
import com.denizenscript.denizen.objects.properties.bukkit.BukkitElementProperties;
import com.denizenscript.denizen.objects.properties.bukkit.BukkitListProperties;
import com.denizenscript.denizen.objects.properties.bukkit.BukkitQueueProperties;
import com.denizenscript.denizen.objects.properties.bukkit.BukkitScriptProperties;
import com.denizenscript.denizen.objects.properties.entity.*;
import com.denizenscript.denizen.objects.properties.inventory.InventoryContents;
import com.denizenscript.denizen.objects.properties.inventory.InventoryHolder;
import com.denizenscript.denizen.objects.properties.inventory.InventorySize;
import com.denizenscript.denizen.objects.properties.inventory.InventoryTitle;
import com.denizenscript.denizen.objects.properties.item.*;
import com.denizenscript.denizen.objects.properties.material.*;
import com.denizenscript.denizen.objects.properties.trade.*;
import com.denizenscript.denizen.nms.NMSHandler;
import com.denizenscript.denizen.nms.NMSVersion;
import com.denizenscript.denizencore.objects.core.ElementTag;
import com.denizenscript.denizencore.objects.core.ListTag;
import com.denizenscript.denizencore.objects.core.QueueTag;
import com.denizenscript.denizencore.objects.core.ScriptTag;
import com.denizenscript.denizencore.objects.properties.PropertyParser;
public class PropertyRegistry {
public static void registermainProperties() {
// register properties that add Bukkit code to core objects
PropertyParser.registerProperty(BukkitScriptProperties.class, ScriptTag.class);
PropertyParser.registerProperty(BukkitQueueProperties.class, QueueTag.class);
PropertyParser.registerProperty(BukkitElementProperties.class, ElementTag.class);
PropertyParser.registerProperty(BukkitListProperties.class, ListTag.class);
// register core EntityTag properties
PropertyParser.registerProperty(EntityAge.class, EntityTag.class);
PropertyParser.registerProperty(EntityAI.class, EntityTag.class);
PropertyParser.registerProperty(EntityAnger.class, EntityTag.class);
PropertyParser.registerProperty(EntityAngry.class, EntityTag.class);
PropertyParser.registerProperty(EntityAreaEffectCloud.class, EntityTag.class);
PropertyParser.registerProperty(EntityArmorBonus.class, EntityTag.class);
PropertyParser.registerProperty(EntityArrowDamage.class, EntityTag.class);
PropertyParser.registerProperty(EntityInvulnerable.class, EntityTag.class);
PropertyParser.registerProperty(EntityBoatType.class, EntityTag.class);
PropertyParser.registerProperty(EntityArmorPose.class, EntityTag.class);
PropertyParser.registerProperty(EntityArms.class, EntityTag.class);
PropertyParser.registerProperty(EntityBasePlate.class, EntityTag.class);
PropertyParser.registerProperty(EntityBeamTarget.class, EntityTag.class);
PropertyParser.registerProperty(EntityBodyArrows.class, EntityTag.class);
PropertyParser.registerProperty(EntityBoundingBox.class, EntityTag.class);
PropertyParser.registerProperty(EntityChestCarrier.class, EntityTag.class);
PropertyParser.registerProperty(EntityColor.class, EntityTag.class);
PropertyParser.registerProperty(EntityCritical.class, EntityTag.class);
PropertyParser.registerProperty(EntityCustomName.class, EntityTag.class);
PropertyParser.registerProperty(EntityDisabledSlots.class, EntityTag.class);
PropertyParser.registerProperty(EntityPotionEffects.class, EntityTag.class);
PropertyParser.registerProperty(EntityElder.class, EntityTag.class);
PropertyParser.registerProperty(EntityEquipment.class, EntityTag.class);
PropertyParser.registerProperty(EntityExplosionFire.class, EntityTag.class);
PropertyParser.registerProperty(EntityExplosionRadius.class, EntityTag.class);
PropertyParser.registerProperty(EntityFirework.class, EntityTag.class);
PropertyParser.registerProperty(EntityFramed.class, EntityTag.class);
PropertyParser.registerProperty(EntityGravity.class, EntityTag.class);
PropertyParser.registerProperty(EntityHealth.class, EntityTag.class);
PropertyParser.registerProperty(EntityInfected.class, EntityTag.class);
PropertyParser.registerProperty(EntityInventory.class, EntityTag.class);
PropertyParser.registerProperty(EntityIsShowingBottom.class, EntityTag.class);
PropertyParser.registerProperty(EntityItem.class, EntityTag.class);
PropertyParser.registerProperty(EntityJumpStrength.class, EntityTag.class);
PropertyParser.registerProperty(EntityKnockback.class, EntityTag.class);
PropertyParser.registerProperty(EntityMarker.class, EntityTag.class);
PropertyParser.registerProperty(EntityMaxFuseTicks.class, EntityTag.class);
PropertyParser.registerProperty(EntityPainting.class, EntityTag.class);
PropertyParser.registerProperty(EntityPickupStatus.class, EntityTag.class);
PropertyParser.registerProperty(EntityPotion.class, EntityTag.class);
PropertyParser.registerProperty(EntityPowered.class, EntityTag.class);
PropertyParser.registerProperty(EntityProfession.class, EntityTag.class);
if (NMSHandler.getVersion().isAtLeast(NMSVersion.v1_13_R2)) {
PropertyParser.registerProperty(EntityRiptide.class, EntityTag.class);
}
PropertyParser.registerProperty(EntityRotation.class, EntityTag.class);
PropertyParser.registerProperty(EntitySmall.class, EntityTag.class);
PropertyParser.registerProperty(EntitySilent.class, EntityTag.class);
PropertyParser.registerProperty(EntitySitting.class, EntityTag.class);
PropertyParser.registerProperty(EntitySize.class, EntityTag.class);
PropertyParser.registerProperty(EntitySkeleton.class, EntityTag.class);
PropertyParser.registerProperty(EntitySpeed.class, EntityTag.class);
PropertyParser.registerProperty(EntitySpell.class, EntityTag.class);
PropertyParser.registerProperty(EntityTame.class, EntityTag.class);
PropertyParser.registerProperty(EntityTrades.class, EntityTag.class);
PropertyParser.registerProperty(EntityVisible.class, EntityTag.class);
// register core InventoryTag properties
PropertyParser.registerProperty(InventoryHolder.class, InventoryTag.class); // Holder must be loaded first to initiate correctly
PropertyParser.registerProperty(InventorySize.class, InventoryTag.class); // Same with size... (too small for contents)
PropertyParser.registerProperty(InventoryContents.class, InventoryTag.class);
PropertyParser.registerProperty(InventoryTitle.class, InventoryTag.class);
// register core ItemTag properties
PropertyParser.registerProperty(ItemApple.class, ItemTag.class);
PropertyParser.registerProperty(ItemBaseColor.class, ItemTag.class);
PropertyParser.registerProperty(ItemBook.class, ItemTag.class);
PropertyParser.registerProperty(ItemDisplayname.class, ItemTag.class);
PropertyParser.registerProperty(ItemDurability.class, ItemTag.class);
PropertyParser.registerProperty(ItemCanDestroy.class, ItemTag.class);
PropertyParser.registerProperty(ItemCanPlaceOn.class, ItemTag.class);
PropertyParser.registerProperty(ItemColor.class, ItemTag.class);
if (NMSHandler.getVersion().isAtLeast(NMSVersion.v1_14_R1)) {
PropertyParser.registerProperty(ItemCustomModel.class, ItemTag.class);
PropertyParser.registerProperty(ItemChargedProjectile.class, ItemTag.class);
}
PropertyParser.registerProperty(ItemEnchantments.class, ItemTag.class);
PropertyParser.registerProperty(ItemFirework.class, ItemTag.class);
PropertyParser.registerProperty(ItemFlags.class, ItemTag.class);
PropertyParser.registerProperty(ItemInventory.class, ItemTag.class);
PropertyParser.registerProperty(ItemLock.class, ItemTag.class);
PropertyParser.registerProperty(ItemLore.class, ItemTag.class);
PropertyParser.registerProperty(ItemMap.class, ItemTag.class);
PropertyParser.registerProperty(ItemNBT.class, ItemTag.class);
PropertyParser.registerProperty(ItemAttributeNBT.class, ItemTag.class);
PropertyParser.registerProperty(ItemPatterns.class, ItemTag.class);
PropertyParser.registerProperty(ItemPlantgrowth.class, ItemTag.class);
PropertyParser.registerProperty(ItemPotion.class, ItemTag.class);
PropertyParser.registerProperty(ItemQuantity.class, ItemTag.class);
PropertyParser.registerProperty(ItemRepairCost.class, ItemTag.class);
PropertyParser.registerProperty(ItemScript.class, ItemTag.class);
PropertyParser.registerProperty(ItemSignContents.class, ItemTag.class);
PropertyParser.registerProperty(ItemSkullskin.class, ItemTag.class);
PropertyParser.registerProperty(ItemSpawnEgg.class, ItemTag.class);
PropertyParser.registerProperty(ItemUnbreakable.class, ItemTag.class);
// register core MaterialTag properties
if (NMSHandler.getVersion().isAtLeast(NMSVersion.v1_13_R2)) {
PropertyParser.registerProperty(MaterialAge.class, MaterialTag.class);
PropertyParser.registerProperty(MaterialDirectional.class, MaterialTag.class);
PropertyParser.registerProperty(MaterialHalf.class, MaterialTag.class);
PropertyParser.registerProperty(MaterialLevel.class, MaterialTag.class);
PropertyParser.registerProperty(MaterialSwitchFace.class, MaterialTag.class);
}
// register core TradeTag properties
PropertyParser.registerProperty(TradeHasXp.class, TradeTag.class);
PropertyParser.registerProperty(TradeInputs.class, TradeTag.class);
PropertyParser.registerProperty(TradeMaxUses.class, TradeTag.class);
PropertyParser.registerProperty(TradeResult.class, TradeTag.class);
PropertyParser.registerProperty(TradeUses.class, TradeTag.class);
}
}