-
-
Notifications
You must be signed in to change notification settings - Fork 106
/
ScriptEventRegistry.java
192 lines (185 loc) · 12.5 KB
/
ScriptEventRegistry.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
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
package com.denizenscript.denizen.events;
import com.denizenscript.denizen.Denizen;
import com.denizenscript.denizen.events.block.*;
import com.denizenscript.denizen.events.core.ServerPrestartScriptEvent;
import com.denizenscript.denizen.events.entity.*;
import com.denizenscript.denizen.events.player.*;
import com.denizenscript.denizen.events.world.*;
import com.denizenscript.denizen.utilities.depends.Depends;
import com.denizenscript.denizen.nms.NMSHandler;
import com.denizenscript.denizen.nms.NMSVersion;
import com.denizenscript.denizencore.events.ScriptEvent;
public class ScriptEventRegistry {
public static void registerMainEvents() {
// Block events
ScriptEvent.registerScriptEvent(new BlockBuiltScriptEvent());
ScriptEvent.registerScriptEvent(new BlockBurnsScriptEvent());
ScriptEvent.registerScriptEvent(new BlockDispensesScriptEvent());
ScriptEvent.registerScriptEvent(new BlockFadesScriptEvent());
ScriptEvent.registerScriptEvent(new BlockFallsScriptEvent());
ScriptEvent.registerScriptEvent(new BlockFormsScriptEvent());
ScriptEvent.registerScriptEvent(new BlockGrowsScriptEvent());
ScriptEvent.registerScriptEvent(new BlockIgnitesScriptEvent());
ScriptEvent.registerScriptEvent(new BlockPhysicsScriptEvent());
ScriptEvent.registerScriptEvent(new BlockSpreadsScriptEvent());
ScriptEvent.registerScriptEvent(new BrewsScriptEvent());
ScriptEvent.registerScriptEvent(new CauldronLevelChangeScriptEvent());
ScriptEvent.registerScriptEvent(new FurnaceBurnsItemScriptEvent());
ScriptEvent.registerScriptEvent(new FurnaceSmeltsItemScriptEvent());
ScriptEvent.registerScriptEvent(new LeafDecaysScriptEvent());
ScriptEvent.registerScriptEvent(new LiquidSpreadScriptEvent());
ScriptEvent.registerScriptEvent(new PistonExtendsScriptEvent());
ScriptEvent.registerScriptEvent(new PistonRetractsScriptEvent());
ScriptEvent.registerScriptEvent(new RedstoneScriptEvent());
// Core events
ScriptEvent.registerScriptEvent(new ServerPrestartScriptEvent());
// Entity events
ScriptEvent.registerScriptEvent(new CreeperPoweredScriptEvent());
ScriptEvent.registerScriptEvent(new DragonPhaseChangeScriptEvent());
ScriptEvent.registerScriptEvent(new EntityAirLevelChangeScriptEvent());
ScriptEvent.registerScriptEvent(new EntityBreaksHangingScriptEvent());
ScriptEvent.registerScriptEvent(new EntityBreedScriptEvent());
ScriptEvent.registerScriptEvent(new EntityChangesBlockScriptEvent());
ScriptEvent.registerScriptEvent(new EntityCombustsScriptEvent());
ScriptEvent.registerScriptEvent(new EntityCreatePortalScriptEvent());
ScriptEvent.registerScriptEvent(new EntityDamagedScriptEvent());
ScriptEvent.registerScriptEvent(new EntityDeathScriptEvent());
ScriptEvent.registerScriptEvent(new EntityDespawnScriptEvent());
ScriptEvent.registerScriptEvent(new EntityEntersPortalScriptEvent());
ScriptEvent.registerScriptEvent(new EntityEntersVehicleScriptEvent());
ScriptEvent.registerScriptEvent(new EntityExitsPortalScriptEvent());
ScriptEvent.registerScriptEvent(new EntityExitsVehicleScriptEvent());
ScriptEvent.registerScriptEvent(new EntityExplodesScriptEvent());
ScriptEvent.registerScriptEvent(new EntityExplosionPrimesScriptEvent());
ScriptEvent.registerScriptEvent(new EntityFoodLevelChangeScriptEvent());
ScriptEvent.registerScriptEvent(new EntityFormsBlockScriptEvent());
ScriptEvent.registerScriptEvent(new EntityGlideScriptEvent());
ScriptEvent.registerScriptEvent(new EntityHealsScriptEvent());
ScriptEvent.registerScriptEvent(new EntityInteractScriptEvent());
ScriptEvent.registerScriptEvent(new EntityKilledScriptEvent());
if (NMSHandler.getVersion().isAtLeast(NMSVersion.v1_13)) {
ScriptEvent.registerScriptEvent(new EntityPotionEffectScriptEvent());
}
ScriptEvent.registerScriptEvent(new EntityResurrectScriptEvent());
ScriptEvent.registerScriptEvent(new EntityShootsBowEvent());
ScriptEvent.registerScriptEvent(new EntitySpawnerSpawnScriptEvent());
ScriptEvent.registerScriptEvent(new EntitySpawnScriptEvent());
if (NMSHandler.getVersion().isAtLeast(NMSVersion.v1_13)) {
ScriptEvent.registerScriptEvent(new EntitySwimScriptEvent());
}
ScriptEvent.registerScriptEvent(new EntityTamesScriptEvent());
ScriptEvent.registerScriptEvent(new EntityTargetsScriptEvent());
ScriptEvent.registerScriptEvent(new EntityTeleportScriptEvent());
ScriptEvent.registerScriptEvent(new EntityUnleashedScriptEvent());
ScriptEvent.registerScriptEvent(new FireworkBurstsScriptEvent());
ScriptEvent.registerScriptEvent(new HangingBreaksScriptEvent());
ScriptEvent.registerScriptEvent(new HorseJumpsScriptEvent());
ScriptEvent.registerScriptEvent(new ItemDespawnsScriptEvent());
ScriptEvent.registerScriptEvent(new ItemEnchantedScriptEvent());
ScriptEvent.registerScriptEvent(new ItemMergesScriptEvent());
ScriptEvent.registerScriptEvent(new ItemSpawnsScriptEvent());
if (Depends.citizens != null) {
ScriptEvent.registerScriptEvent(new NPCSpawnScriptEvent());
}
ScriptEvent.registerScriptEvent(new PigZappedScriptEvent());
ScriptEvent.registerScriptEvent(new ProjectileHitsScriptEvent());
ScriptEvent.registerScriptEvent(new ProjectileLaunchedScriptEvent());
ScriptEvent.registerScriptEvent(new SheepDyedScriptEvent());
ScriptEvent.registerScriptEvent(new SheepRegrowsScriptEvent());
ScriptEvent.registerScriptEvent(new SlimeSplitsScriptEvent());
ScriptEvent.registerScriptEvent(new VehicleCollidesBlockScriptEvent());
ScriptEvent.registerScriptEvent(new VehicleCollidesEntityScriptEvent());
ScriptEvent.registerScriptEvent(new VehicleCreatedScriptEvent());
ScriptEvent.registerScriptEvent(new VehicleDamagedScriptEvent());
ScriptEvent.registerScriptEvent(new VehicleDestroyedScriptEvent());
ScriptEvent.registerScriptEvent(new VehicleMoveScriptEvent());
// Player events
ScriptEvent.registerScriptEvent(new BiomeEnterExitScriptEvent());
ScriptEvent.registerScriptEvent(new ChatScriptEvent());
ScriptEvent.registerScriptEvent(new ItemRecipeFormedScriptEvent());
ScriptEvent.registerScriptEvent(new ItemScrollScriptEvent());
ScriptEvent.registerScriptEvent(new ListPingScriptEvent());
ScriptEvent.registerScriptEvent(new PlayerAnimatesScriptEvent());
ScriptEvent.registerScriptEvent(new PlayerBreaksBlockScriptEvent());
ScriptEvent.registerScriptEvent(new PlayerBreaksItemScriptEvent());
ScriptEvent.registerScriptEvent(new PlayerChangesGamemodeScriptEvent());
ScriptEvent.registerScriptEvent(new PlayerChangesSignScriptEvent());
ScriptEvent.registerScriptEvent(new PlayerChangesWorldScriptEvent());
ScriptEvent.registerScriptEvent(new PlayerChangesXPScriptEvent());
ScriptEvent.registerScriptEvent(new PlayerClicksBlockScriptEvent());
ScriptEvent.registerScriptEvent(new PlayerClicksInInventoryScriptEvent());
ScriptEvent.registerScriptEvent(new PlayerClosesInvScriptEvent());
ScriptEvent.registerScriptEvent(new PlayerCompletesAdvancementScriptEvent());
ScriptEvent.registerScriptEvent(new PlayerConsumesScriptEvent());
ScriptEvent.registerScriptEvent(new PlayerCraftsItemScriptEvent());
ScriptEvent.registerScriptEvent(new PlayerDamagesBlockScriptEvent());
ScriptEvent.registerScriptEvent(new PlayerDragsInInvScriptEvent());
ScriptEvent.registerScriptEvent(new PlayerDropsItemScriptEvent());
ScriptEvent.registerScriptEvent(new PlayerEditsBookScriptEvent());
ScriptEvent.registerScriptEvent(new PlayerEmptiesBucketScriptEvent());
ScriptEvent.registerScriptEvent(new PlayerEntersBedScriptEvent());
ScriptEvent.registerScriptEvent(new PlayerFillsBucketScriptEvent());
ScriptEvent.registerScriptEvent(new PlayerFishesScriptEvent());
ScriptEvent.registerScriptEvent(new PlayerFlyingScriptEvent());
ScriptEvent.registerScriptEvent(new PlayerItemTakesDamageScriptEvent());
ScriptEvent.registerScriptEvent(new PlayerJoinsScriptEvent());
if (!Denizen.supportsPaper) {
ScriptEvent.registerScriptEvent(new PlayerJumpScriptEvent.PlayerJumpsSpigotScriptEventImpl());
}
ScriptEvent.registerScriptEvent(new PlayerKickedScriptEvent());
ScriptEvent.registerScriptEvent(new PlayerLeashesEntityScriptEvent());
ScriptEvent.registerScriptEvent(new PlayerLeavesBedScriptEvent());
ScriptEvent.registerScriptEvent(new PlayerLevelsUpScriptEvent());
ScriptEvent.registerScriptEvent(new PlayerLoginScriptEvent());
ScriptEvent.registerScriptEvent(new PlayerMendsItemScriptEvent());
ScriptEvent.registerScriptEvent(new PlayerOpensInvScriptEvent());
ScriptEvent.registerScriptEvent(new PlayerPicksUpScriptEvent());
ScriptEvent.registerScriptEvent(new PlayerPlacesBlockScriptEvent());
ScriptEvent.registerScriptEvent(new PlayerPlacesHangingScriptEvent());
ScriptEvent.registerScriptEvent(new PlayerPreparesAnvilCraftScriptEvent());
ScriptEvent.registerScriptEvent(new PlayerQuitsScriptEvent());
if (NMSHandler.getVersion().isAtLeast(NMSVersion.v1_13)) {
ScriptEvent.registerScriptEvent(new PlayerReceivesCommandsScriptEvent());
}
ScriptEvent.registerScriptEvent(new PlayerReceivesMessageScriptEvent());
ScriptEvent.registerScriptEvent(new PlayerRespawnsScriptEvent());
ScriptEvent.registerScriptEvent(new PlayerRightClicksEntityScriptEvent());
if (NMSHandler.getVersion().isAtLeast(NMSVersion.v1_13)) {
ScriptEvent.registerScriptEvent(new PlayerRiptideScriptEvent());
}
ScriptEvent.registerScriptEvent(new PlayerShearsScriptEvent());
ScriptEvent.registerScriptEvent(new PlayerSneakScriptEvent());
ScriptEvent.registerScriptEvent(new PlayerSprintScriptEvent());
ScriptEvent.registerScriptEvent(new PlayerStandsOnScriptEvent());
ScriptEvent.registerScriptEvent(new PlayerStatisticIncrementsScriptEvent());
ScriptEvent.registerScriptEvent(new PlayerSteersEntityScriptEvent());
ScriptEvent.registerScriptEvent(new PlayerStepsOnScriptEvent());
ScriptEvent.registerScriptEvent(new PlayerSwapsItemsScriptEvent());
ScriptEvent.registerScriptEvent(new PlayerTabCompleteScriptEvent());
ScriptEvent.registerScriptEvent(new PlayerTakesFromFurnaceScriptEvent());
if (NMSHandler.getVersion().isAtLeast(NMSVersion.v1_14)) {
ScriptEvent.registerScriptEvent(new PlayerTakesFromLecternScriptEvent());
}
ScriptEvent.registerScriptEvent(new PlayerThrowsEggScriptEvent());
ScriptEvent.registerScriptEvent(new PlayerUsesPortalScriptEvent());
ScriptEvent.registerScriptEvent(new PlayerWalkScriptEvent());
ScriptEvent.registerScriptEvent(new PlayerWalksOverScriptEvent());
ScriptEvent.registerScriptEvent(new ResourcePackStatusScriptEvent());
// World events
ScriptEvent.registerScriptEvent(new ChunkLoadScriptEvent());
ScriptEvent.registerScriptEvent(new ChunkUnloadScriptEvent());
ScriptEvent.registerScriptEvent(new InventoryPicksUpItemScriptEvent());
ScriptEvent.registerScriptEvent(new ItemMoveScriptEvent());
ScriptEvent.registerScriptEvent(new LightningStrikesScriptEvent());
ScriptEvent.registerScriptEvent(new LingeringPotionSplashScriptEvent());
ScriptEvent.registerScriptEvent(new PortalCreateScriptEvent());
ScriptEvent.registerScriptEvent(new PotionSplashScriptEvent());
ScriptEvent.registerScriptEvent(new SpawnChangeScriptEvent());
ScriptEvent.registerScriptEvent(new StructureGrowsScriptEvent());
ScriptEvent.registerScriptEvent(new WeatherChangesScriptEvent());
ScriptEvent.registerScriptEvent(new WorldInitsScriptEvent());
ScriptEvent.registerScriptEvent(new WorldLoadsScriptEvent());
ScriptEvent.registerScriptEvent(new WorldSavesScriptEvent());
ScriptEvent.registerScriptEvent(new WorldUnloadsScriptEvent());
}
}