@craftjs-typings/worldguard 7.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. package/com_sk89q.d.ts +1167 -0
  2. package/index.d.ts +3 -0
  3. package/package.json +14 -0
package/com_sk89q.d.ts ADDED
@@ -0,0 +1,1167 @@
1
+ declare module 'com.sk89q.worldguard.bukkit' {
2
+ import { Location, Material, OfflinePlayer } from 'org.bukkit';
3
+ import { Block } from 'org.bukkit.block';
4
+ import { EntityType, Entity, Player } from 'org.bukkit.entity';
5
+ import { WorldGuardPlatform, StringMatcher, DebugHandler } from 'com.sk89q.worldguard.internal.platform';
6
+ import { FlagContextBuilder } from 'FlagContext';
7
+ import { SessionManager } from 'com.sk89q.worldguard.session';
8
+ import { TextComponent } from 'com.sk89q.worldedit.util.formatting.text';
9
+ import { RegionContainer, ProtectedRegion } from 'com.sk89q.worldguard.protection.regions';
10
+ import { GameMode } from 'com.sk89q.worldedit.world.gamemode';
11
+ import { Path } from 'java.nio.file';
12
+ import { LocalPlayer } from 'com.sk89q.worldguard';
13
+ import { ReportList } from 'com.sk89q.worldedit.util.report';
14
+ import { ProfileService } from 'com.sk89q.worldguard.util.profile.resolver';
15
+ import { ProfileCache } from 'com.sk89q.worldguard.util.profile.cache';
16
+ import { World } from 'com.sk89q.worldedit.world';
17
+ import { ItemStack } from 'org.bukkit.inventory';
18
+ import { Target } from 'com.sk89q.worldguard.blacklist.target';
19
+ import { BukkitPlayer as com_sk89q_worldedit_bukkit_BukkitPlayer, WorldEditPlugin } from 'com.sk89q.worldedit.bukkit';
20
+ import { WeatherType } from 'com.sk89q.worldedit.world.weather';
21
+ import { Location as com_sk89q_worldedit_util_Location, HandSide } from 'com.sk89q.worldedit.util';
22
+ import { UUID, Collection, List, Set } from 'java.util';
23
+ import { BaseItemStack } from 'com.sk89q.worldedit.blocks';
24
+ import { BlockBag } from 'com.sk89q.worldedit.extent.inventory';
25
+ import { Vector3 } from 'com.sk89q.worldedit.math';
26
+ import { BaseEntity } from 'com.sk89q.worldedit.entity';
27
+ import { SessionKey } from 'com.sk89q.worldedit.session';
28
+ import { Class, Iterable } from 'java.lang';
29
+ import { YamlConfigurationManager, YamlWorldConfiguration } from 'com.sk89q.worldguard.config';
30
+ import { File } from 'java.io';
31
+ import { JavaPlugin } from 'org.bukkit.plugin.java';
32
+ import { Actor } from 'com.sk89q.worldedit.extension.platform';
33
+ import { CommandSender, Command } from 'org.bukkit.command';
34
+ import { PlayerMoveListener } from 'com.sk89q.worldguard.bukkit.listener';
35
+ import { WorldLoadEvent, WorldUnloadEvent, ChunkLoadEvent, ChunkUnloadEvent } from 'org.bukkit.event.world';
36
+ import { TargetMatcherSet } from 'com.sk89q.worldguard.bukkit.internal';
37
+ import { YAMLProcessor } from 'com.sk89q.util.yaml';
38
+ import { ChestProtection } from 'com.sk89q.worldguard.chest';
39
+
40
+ class ProtectionQuery {
41
+ testBlockBreak(cause: any, block: Block): boolean;
42
+ testBlockInteract(cause: any, block: Block): boolean;
43
+ testBlockPlace(cause: any, location: Location, newMaterial: Material): boolean;
44
+ testEntityDamage(cause: any, entity: Entity): boolean;
45
+ testEntityDestroy(cause: any, entity: Entity): boolean;
46
+ testEntityInteract(cause: any, entity: Entity): boolean;
47
+ testEntityPlace(cause: any, location: Location, type: EntityType): boolean;
48
+ }
49
+
50
+
51
+ interface BukkitWorldGuardPlatform extends WorldGuardPlatform {}
52
+ class BukkitWorldGuardPlatform extends WorldGuardPlatform {
53
+ constructor();
54
+ addPlatformReports(report: ReportList): void;
55
+ broadcastNotification(message: string): void;
56
+ broadcastNotification(component: TextComponent): void;
57
+ createProfileService(profileCache: ProfileCache): ProfileService;
58
+ get configDir(): Path;
59
+ get debugHandler(): DebugHandler;
60
+ get defaultGameMode(): GameMode;
61
+ get globalStateManager(): BukkitConfigurationManager;
62
+ get matcher(): StringMatcher;
63
+ get platformName(): string;
64
+ get platformVersion(): string;
65
+ get regionContainer(): RegionContainer;
66
+ get sessionManager(): SessionManager;
67
+ getSpawnProtection(world: World): ProtectedRegion;
68
+ load(): void;
69
+ notifyFlagContextCreate(flagContextBuilder: FlagContextBuilder): void;
70
+ stackPlayerInventory(localPlayer: LocalPlayer): void;
71
+ unload(): void;
72
+ }
73
+
74
+
75
+ class BukkitUtil {
76
+ static createTarget(block: Block): Target;
77
+ static createTarget(item: ItemStack): Target;
78
+ static createTarget(material: Material): Target;
79
+ static getPotionEffectBits(item: ItemStack): number;
80
+ static isWaterPotion(item: ItemStack): boolean;
81
+ }
82
+
83
+
84
+ interface BukkitPlayer extends LocalPlayer, com_sk89q_worldedit_bukkit_BukkitPlayer {}
85
+ class BukkitPlayer extends LocalPlayer {
86
+ constructor(plugin: WorldGuardPlugin, player: Player);
87
+ ban(msg: string): void;
88
+ get exhaustion(): number;
89
+ get fireTicks(): number;
90
+ get foodLevel(): number;
91
+ get groups(): string[];
92
+ get health(): number;
93
+ get maxHealth(): number;
94
+ get name(): string;
95
+ get playerTimeOffset(): number;
96
+ get playerWeather(): WeatherType;
97
+ get saturation(): number;
98
+ hasGroup(group: string): boolean;
99
+ hasPermission(perm: string): boolean;
100
+ isPlayerTimeRelative(): boolean;
101
+ kick(msg: string): void;
102
+ printRaw(msg: string): void;
103
+ resetFallDistance(): void;
104
+ resetPlayerTime(): void;
105
+ resetPlayerWeather(): void;
106
+ sendTitle(title: string, subtitle: string): void;
107
+ set exhaustion(exhaustion: number);
108
+ set fireTicks(fireTicks: number);
109
+ set foodLevel(foodLevel: number);
110
+ set health(health: number);
111
+ set playerWeather(weather: WeatherType);
112
+ set saturation(saturation: number);
113
+ setCompassTarget(location: com_sk89q_worldedit_util_Location): void;
114
+ setPlayerTime(time: number, relative: boolean): void;
115
+ teleport(location: com_sk89q_worldedit_util_Location, successMessage: string, failMessage: string): void;
116
+ }
117
+
118
+
119
+ interface BukkitOfflinePlayer extends BukkitPlayer {}
120
+ class BukkitOfflinePlayer extends BukkitPlayer {
121
+ ban(msg: string): void;
122
+ get exhaustion(): number;
123
+ get foodLevel(): number;
124
+ get groups(): string[];
125
+ get health(): number;
126
+ get inventoryBlockBag(): BlockBag;
127
+ get location(): com_sk89q_worldedit_util_Location;
128
+ get maxHealth(): number;
129
+ get name(): string;
130
+ get playerTimeOffset(): number;
131
+ get playerWeather(): WeatherType;
132
+ get saturation(): number;
133
+ get sessionKey(): SessionKey;
134
+ get state(): BaseEntity;
135
+ get uniqueId(): UUID;
136
+ get world(): World;
137
+ getFacet<T>(cls: Class<T>): T;
138
+ getItemInHand(handSide: HandSide): BaseItemStack;
139
+ giveItem(itemStack: BaseItemStack): void;
140
+ hasGroup(group: string): boolean;
141
+ hasPermission(perm: string): boolean;
142
+ isPlayerTimeRelative(): boolean;
143
+ kick(msg: string): void;
144
+ print(msg: string): void;
145
+ printDebug(msg: string): void;
146
+ printError(msg: string): void;
147
+ printRaw(msg: string): void;
148
+ resetPlayerTime(): void;
149
+ resetPlayerWeather(): void;
150
+ set exhaustion(exhaustion: number);
151
+ set foodLevel(foodLevel: number);
152
+ set health(health: number);
153
+ set playerWeather(weather: WeatherType);
154
+ set saturation(saturation: number);
155
+ setCompassTarget(location: com_sk89q_worldedit_util_Location): void;
156
+ setPlayerTime(time: number, relative: boolean): void;
157
+ setPosition(pos: Vector3, pitch: number, yaw: number): void;
158
+ }
159
+
160
+
161
+ interface BukkitConfigurationManager extends YamlConfigurationManager {}
162
+ class BukkitConfigurationManager extends YamlConfigurationManager {
163
+ constructor(plugin: WorldGuardPlugin);
164
+ copyDefaults(): void;
165
+ get(world: World): BukkitWorldConfiguration;
166
+ get(worldName: string): BukkitWorldConfiguration;
167
+ get dataFolder(): File;
168
+ get worldConfigs(): Collection<BukkitWorldConfiguration>;
169
+ hasCommandBookGodMode(): boolean;
170
+ load(): void;
171
+ postLoad(): void;
172
+ unload(): void;
173
+ updateCommandBookGodMode(): void;
174
+ }
175
+
176
+
177
+ interface WorldGuardPlugin extends JavaPlugin {}
178
+ class WorldGuardPlugin extends JavaPlugin {
179
+ constructor();
180
+ checkPermission(sender: CommandSender, perm: string): void;
181
+ createDefaultConfiguration(actual: File, defaultName: string): void;
182
+ createProtectionQuery(): ProtectionQuery;
183
+ get configManager(): BukkitConfigurationManager;
184
+ get playerMoveListener(): PlayerMoveListener;
185
+ get worldEdit(): WorldEditPlugin;
186
+ getGroups(player: OfflinePlayer): string[];
187
+ hasPermission(player: Actor, perm: string): boolean;
188
+ hasPermission(sender: CommandSender, perm: string): boolean;
189
+ inGroup(player: OfflinePlayer, group: string): boolean;
190
+ static inst(): WorldGuardPlugin;
191
+ onCommand(sender: CommandSender, cmd: Command, label: string, args: string[]): boolean;
192
+ onDisable(): void;
193
+ onEnable(): void;
194
+ unwrapActor(sender: Actor): CommandSender;
195
+ wrapCommandSender(sender: CommandSender): Actor;
196
+ wrapOfflinePlayer(player: OfflinePlayer): LocalPlayer;
197
+ wrapPlayer(player: Player): LocalPlayer;
198
+ wrapPlayer(player: Player, silenced: boolean): LocalPlayer;
199
+ }
200
+
201
+
202
+ interface BukkitRegionContainer extends RegionContainer {}
203
+ class BukkitRegionContainer extends RegionContainer {
204
+ constructor(plugin: WorldGuardPlugin);
205
+ initialize(): void;
206
+ onChunkLoad(event: ChunkLoadEvent): void;
207
+ onChunkUnload(event: ChunkUnloadEvent): void;
208
+ onWorldLoad(event: WorldLoadEvent): void;
209
+ onWorldUnload(event: WorldUnloadEvent): void;
210
+ shutdown(): void;
211
+ }
212
+
213
+
214
+ interface BukkitDebugHandler extends DebugHandler {}
215
+ class BukkitDebugHandler extends DebugHandler {
216
+ testBreak(sender: Actor, target: LocalPlayer, fromTarget: boolean, stackTraceMode: boolean): void;
217
+ testDamage(sender: Actor, target: LocalPlayer, fromTarget: boolean, stackTraceMode: boolean): void;
218
+ testInteract(sender: Actor, target: LocalPlayer, fromTarget: boolean, stackTraceMode: boolean): void;
219
+ testPlace(sender: Actor, target: LocalPlayer, fromTarget: boolean, stackTraceMode: boolean): void;
220
+ }
221
+
222
+
223
+ interface BukkitStringMatcher extends StringMatcher {}
224
+ class BukkitStringMatcher extends StringMatcher {
225
+ getWorldByName(worldName: string): World;
226
+ matchPlayerNames(filter: string): LocalPlayer[];
227
+ matchPlayerOrConsole(sender: Actor, filter: string): Actor;
228
+ matchPlayers(source: Actor, filter: string): Iterable<LocalPlayer>;
229
+ matchWorld(sender: Actor, filter: string): World;
230
+ replaceMacros(sender: Actor, message: string): string;
231
+ }
232
+
233
+
234
+ interface BukkitWorldConfiguration extends YamlWorldConfiguration {}
235
+ class BukkitWorldConfiguration extends YamlWorldConfiguration {
236
+ blockPotions: Set;
237
+ allowAllInteract: TargetMatcherSet;
238
+ blockUseAtFeet: TargetMatcherSet;
239
+ usePaperEntityOrigin: boolean;
240
+ constructor(plugin: WorldGuardPlugin, worldName: string, parentConfig: YAMLProcessor);
241
+ get chestProtection(): ChestProtection;
242
+ isAdjacentChestProtected(block: com_sk89q_worldedit_util_Location, player: LocalPlayer): boolean;
243
+ isChestProtected(block: com_sk89q_worldedit_util_Location, player: LocalPlayer): boolean;
244
+ isChestProtected(block: com_sk89q_worldedit_util_Location): boolean;
245
+ isChestProtectedPlacement(block: com_sk89q_worldedit_util_Location, player: LocalPlayer): boolean;
246
+ loadConfiguration(): void;
247
+ }
248
+
249
+ }
250
+
251
+ declare module 'com.sk89q.worldguard.bukkit.chest' {
252
+ import { SignChestProtection } from 'com.sk89q.worldguard.chest';
253
+ import { Boolean } from 'java.lang';
254
+ import { Location } from 'com.sk89q.worldedit.util';
255
+ import { LocalPlayer } from 'com.sk89q.worldguard';
256
+
257
+ interface BukkitSignChestProtection extends SignChestProtection {}
258
+ class BukkitSignChestProtection extends SignChestProtection {
259
+ isProtectedSign(block: Location, player: LocalPlayer): boolean;
260
+ }
261
+
262
+ }
263
+
264
+ declare module 'com.sk89q.worldguard.bukkit.cause' {
265
+ import { Player, Entity, EntityType } from 'org.bukkit.entity';
266
+ import { Block } from 'org.bukkit.block';
267
+ import { Metadatable } from 'org.bukkit.metadata';
268
+
269
+ class Cause {
270
+ static create(...cause: any[]): Cause;
271
+ find(...types: EntityType[]): EntityType;
272
+ get firstBlock(): Block;
273
+ get firstEntity(): Entity;
274
+ get firstNonPlayerEntity(): Entity;
275
+ get firstPlayer(): Player;
276
+ get rootCause(): any;
277
+ isIndirect(): boolean;
278
+ isKnown(): boolean;
279
+ toString(): string;
280
+ static trackParentCause(target: Metadatable, parent: any): void;
281
+ static unknown(): Cause;
282
+ static untrackParentCause(target: Metadatable): void;
283
+ }
284
+
285
+ }
286
+
287
+ declare module 'com.sk89q.worldguard.bukkit.session' {
288
+ import { AbstractSessionManager } from 'com.sk89q.worldguard.session';
289
+ import { Runnable } from 'java.lang';
290
+ import { Listener } from 'org.bukkit.event';
291
+ import { ProcessPlayerEvent } from 'com.sk89q.worldguard.bukkit.event.player';
292
+ import { LocalPlayer } from 'com.sk89q.worldguard';
293
+ import { World } from 'com.sk89q.worldedit.world';
294
+
295
+ interface BukkitSessionManager extends Runnable, Listener, AbstractSessionManager {}
296
+ class BukkitSessionManager extends Runnable {
297
+ hasBypass(player: LocalPlayer, world: World): boolean;
298
+ onPlayerProcess(event: ProcessPlayerEvent): void;
299
+ resetAllStates(): void;
300
+ run(): void;
301
+ shutdown(): void;
302
+ }
303
+
304
+ }
305
+
306
+ declare module 'com.sk89q.worldguard.bukkit.internal' {
307
+ import { Metadatable } from 'org.bukkit.metadata';
308
+ import { Class } from 'java.lang';
309
+ import { TargetMatcher, Target } from 'com.sk89q.worldguard.blacklist.target';
310
+ import { Material } from 'org.bukkit';
311
+ import { Block, BlockState } from 'org.bukkit.block';
312
+ import { ItemStack } from 'org.bukkit.inventory';
313
+
314
+ class WGMetadata {
315
+ static getIfPresent<T>(target: Metadatable, key: string, expected: Class<T>): T;
316
+ static put(target: Metadatable, key: string, value: any): void;
317
+ static remove(target: Metadatable, key: string): void;
318
+ }
319
+
320
+
321
+ class TargetMatcherSet {
322
+ add(matcher: TargetMatcher): boolean;
323
+ test(target: Target): boolean;
324
+ test(material: Material): boolean;
325
+ test(block: Block): boolean;
326
+ test(state: BlockState): boolean;
327
+ test(itemStack: ItemStack): boolean;
328
+ toString(): string;
329
+ }
330
+
331
+ }
332
+
333
+ declare module 'com.sk89q.worldguard.bukkit.util.report' {
334
+ import { DataReport, Report } from 'com.sk89q.worldedit.util.report';
335
+ import { List } from 'java.util';
336
+ import { CancelAttempt } from 'com.sk89q.worldguard.bukkit.event.debug';
337
+
338
+ interface SchedulerReport extends DataReport {}
339
+ class SchedulerReport extends DataReport {
340
+ constructor();
341
+ }
342
+
343
+
344
+ interface ServerReport extends DataReport {}
345
+ class ServerReport extends DataReport {
346
+ constructor();
347
+ }
348
+
349
+
350
+ interface CancelReport extends Report {}
351
+ class CancelReport extends Report {
352
+ constructor(event: T, cancels: CancelAttempt[], stackTruncateLength: number);
353
+ get title(): string;
354
+ isDetectingPlugin(): boolean;
355
+ setDetectingPlugin(detectingPlugin: boolean): void;
356
+ toString(): string;
357
+ }
358
+
359
+
360
+ interface WorldReport extends DataReport {}
361
+ class WorldReport extends DataReport {
362
+ constructor();
363
+ }
364
+
365
+
366
+ interface ServicesReport extends DataReport {}
367
+ class ServicesReport extends DataReport {
368
+ constructor();
369
+ }
370
+
371
+
372
+ interface PluginReport extends DataReport {}
373
+ class PluginReport extends DataReport {
374
+ constructor();
375
+ }
376
+
377
+
378
+ interface DatapackReport extends DataReport {}
379
+ class DatapackReport extends DataReport {
380
+ constructor();
381
+ }
382
+
383
+
384
+ interface PerformanceReport extends DataReport {}
385
+ class PerformanceReport extends DataReport {
386
+ constructor();
387
+ }
388
+
389
+ }
390
+
391
+ declare module 'com.sk89q.worldguard.bukkit.util' {
392
+ import { Player, EntityType, Entity } from 'org.bukkit.entity';
393
+ import { Material } from 'org.bukkit';
394
+ import { Collection, List, Map } from 'java.util';
395
+ import { PotionEffect } from 'org.bukkit.potion';
396
+ import { Event, Cancellable } from 'org.bukkit.event';
397
+ import { PlayerInteractEvent } from 'org.bukkit.event.player';
398
+ import { BulkEvent } from 'com.sk89q.worldguard.bukkit.event';
399
+ import { DamageCause } from 'org.bukkit.event.entity.EntityDamageEvent';
400
+ import { Plugin } from 'org.bukkit.plugin';
401
+ import { StackTraceElement, Class } from 'java.lang';
402
+ import { Block } from 'org.bukkit.block';
403
+
404
+ class InteropUtils {
405
+ static isFakePlayer(player: Player): boolean;
406
+ }
407
+
408
+
409
+ class Materials {
410
+ static getBucketBlockMaterial(type: Material): Material;
411
+ static getEntitySpawnEgg(material: Material): EntityType;
412
+ static getRelatedEntity(material: Material): EntityType;
413
+ static getRelatedMaterial(type: EntityType): Material;
414
+ static hasDamageEffect(effects: Collection<PotionEffect>): boolean;
415
+ static isAmethystGrowth(mat: Material): boolean;
416
+ static isAnvil(material: Material): boolean;
417
+ static isArmor(type: Material): boolean;
418
+ static isBed(material: Material): boolean;
419
+ static isBlockModifiedOnClick(material: Material, rightClick: boolean): boolean;
420
+ static isBoat(material: Material): boolean;
421
+ static isConsideredBuildingIfUsed(type: Material): boolean;
422
+ static isCoral(material: Material): boolean;
423
+ static isCrop(type: Material): boolean;
424
+ static isFire(type: Material): boolean;
425
+ static isInventoryBlock(material: Material): boolean;
426
+ static isItemAppliedToBlock(item: Material, block: Material): boolean;
427
+ static isLava(material: Material): boolean;
428
+ static isLeaf(material: Material): boolean;
429
+ static isLiquid(material: Material): boolean;
430
+ static isMinecart(material: Material): boolean;
431
+ static isMushroom(material: Material): boolean;
432
+ static isPistonBlock(material: Material): boolean;
433
+ static isPortal(material: Material): boolean;
434
+ static isRailBlock(material: Material): boolean;
435
+ static isSculkGrowth(mat: Material): boolean;
436
+ static isShulkerBox(material: Material): boolean;
437
+ static isSpawnEgg(material: Material): boolean;
438
+ static isToolApplicable(toolMaterial: Material, targetMaterial: Material): boolean;
439
+ static isUnwaxedCopper(type: Material): boolean;
440
+ static isUseFlagApplicable(material: Material): boolean;
441
+ static isVine(newType: Material): boolean;
442
+ static isWater(material: Material): boolean;
443
+ static isWaxedCopper(type: Material): boolean;
444
+ }
445
+
446
+
447
+ class Events {
448
+ static fire(event: Event): void;
449
+ static fireAndTestCancel<T extends Event & Cancellable>(eventToFire: T): boolean;
450
+ static fireBulkEventToCancel<T extends Event & Cancellable & BulkEvent>(original: Cancellable, eventToFire: T): boolean;
451
+ static fireItemEventToCancel<T extends Event & Cancellable>(original: PlayerInteractEvent, eventToFire: T): boolean;
452
+ static fireToCancel<T extends Event & Cancellable>(original: Cancellable, eventToFire: T): boolean;
453
+ static isExplosionCause(cause: DamageCause): boolean;
454
+ static isFireCause(cause: DamageCause): boolean;
455
+ static restoreStatistic(entity: Entity, cause: DamageCause): void;
456
+ }
457
+
458
+
459
+ class HandlerTracer {
460
+ constructor(event: Event);
461
+ detectPlugin(elements: StackTraceElement[]): Plugin;
462
+ }
463
+
464
+
465
+ class Blocks {
466
+ static getConnected(block: Block): Block[];
467
+ }
468
+
469
+
470
+ class ClassSourceValidator {
471
+ constructor(plugin: Plugin);
472
+ findMismatches(classes: Class<any>[]): Map<Class<any>, Plugin>;
473
+ reportMismatches(classes: Class<any>[]): void;
474
+ }
475
+
476
+ }
477
+
478
+ declare module 'com.sk89q.worldguard.bukkit.event.inventory' {
479
+ import { DelegateEvent } from 'com.sk89q.worldguard.bukkit.event';
480
+ import { Event, HandlerList } from 'org.bukkit.event';
481
+ import { Cause } from 'com.sk89q.worldguard.bukkit.cause';
482
+ import { World } from 'org.bukkit';
483
+ import { ItemStack } from 'org.bukkit.inventory';
484
+
485
+ interface UseItemEvent extends DelegateEvent {}
486
+ class UseItemEvent extends DelegateEvent {
487
+ constructor(originalEvent: Event, cause: Cause, world: World, itemStack: ItemStack);
488
+ static get handlerList(): HandlerList;
489
+ get handlers(): HandlerList;
490
+ get itemStack(): ItemStack;
491
+ get world(): World;
492
+ }
493
+
494
+ }
495
+
496
+ declare module 'com.sk89q.worldguard.bukkit.event.player' {
497
+ import { Event, HandlerList } from 'org.bukkit.event';
498
+ import { Player } from 'org.bukkit.entity';
499
+
500
+ interface ProcessPlayerEvent extends Event {}
501
+ class ProcessPlayerEvent extends Event {
502
+ constructor(player: Player);
503
+ static get handlerList(): HandlerList;
504
+ get handlers(): HandlerList;
505
+ get player(): Player;
506
+ }
507
+
508
+ }
509
+
510
+ declare module 'com.sk89q.worldguard.bukkit.event.entity' {
511
+ import { Event, HandlerList } from 'org.bukkit.event';
512
+ import { Cause } from 'com.sk89q.worldguard.bukkit.cause';
513
+ import { Entity, EntityType } from 'org.bukkit.entity';
514
+ import { Location, World } from 'org.bukkit';
515
+ import { DelegateEvent } from 'com.sk89q.worldguard.bukkit.event';
516
+ import { Predicate } from 'com.google.common.base';
517
+
518
+ interface UseEntityEvent extends AbstractEntityEvent {}
519
+ class UseEntityEvent extends AbstractEntityEvent {
520
+ constructor(originalEvent: Event, cause: Cause, target: Entity);
521
+ get entity(): Entity;
522
+ static get handlerList(): HandlerList;
523
+ get handlers(): HandlerList;
524
+ }
525
+
526
+
527
+ interface SpawnEntityEvent extends AbstractEntityEvent {}
528
+ class SpawnEntityEvent extends AbstractEntityEvent {
529
+ constructor(originalEvent: Event, cause: Cause, target: Entity);
530
+
531
+ constructor(originalEvent: Event, cause: Cause, location: Location, type: EntityType);
532
+ get effectiveType(): EntityType;
533
+ static get handlerList(): HandlerList;
534
+ get handlers(): HandlerList;
535
+ }
536
+
537
+
538
+ interface AbstractEntityEvent extends DelegateEvent {}
539
+ class AbstractEntityEvent extends DelegateEvent {
540
+ filter(predicate: Predicate<Location>, cancelEventOnFalse: boolean): boolean;
541
+ get entity(): Entity;
542
+ get target(): Location;
543
+ get world(): World;
544
+ }
545
+
546
+
547
+ interface DestroyEntityEvent extends AbstractEntityEvent {}
548
+ class DestroyEntityEvent extends AbstractEntityEvent {
549
+ constructor(originalEvent: Event, cause: Cause, target: Entity);
550
+ get entity(): Entity;
551
+ static get handlerList(): HandlerList;
552
+ get handlers(): HandlerList;
553
+ }
554
+
555
+
556
+ interface DamageEntityEvent extends AbstractEntityEvent {}
557
+ class DamageEntityEvent extends AbstractEntityEvent {
558
+ constructor(originalEvent: Event, cause: Cause, target: Entity);
559
+ get entity(): Entity;
560
+ static get handlerList(): HandlerList;
561
+ get handlers(): HandlerList;
562
+ }
563
+
564
+ }
565
+
566
+ declare module 'com.sk89q.worldguard.bukkit.event' {
567
+ import { Result } from 'org.bukkit.event.Event';
568
+ import { Event, Cancellable } from 'org.bukkit.event';
569
+ import { Cause } from 'com.sk89q.worldguard.bukkit.cause';
570
+ import { List } from 'java.util';
571
+ import { StateFlag } from 'com.sk89q.worldguard.protection.flags';
572
+
573
+ class Handleable {
574
+ get result(): Result;
575
+ set result(result: Result);
576
+ }
577
+
578
+
579
+ class DelegateEvents {
580
+ static setAllowed<T extends Handleable>(event: T, allowed: boolean): T;
581
+ static setSilent<T extends DelegateEvent>(event: T): T;
582
+ static setSilent<T extends DelegateEvent>(event: T, silent: boolean): T;
583
+ }
584
+
585
+
586
+ class BulkEvent {
587
+ get explicitResult(): Result;
588
+ }
589
+
590
+
591
+ interface DelegateEvent extends Cancellable, Handleable, Event {}
592
+ class DelegateEvent extends Cancellable {
593
+ get cause(): Cause;
594
+ get originalEvent(): Event;
595
+ get relevantFlags(): StateFlag[];
596
+ get result(): Result;
597
+ isCancelled(): boolean;
598
+ isSilent(): boolean;
599
+ set result(result: Result);
600
+ setAllowed(allowed: boolean): DelegateEvent;
601
+ setCancelled(cancel: boolean): void;
602
+ setSilent(silent: boolean): DelegateEvent;
603
+ }
604
+
605
+ }
606
+
607
+ declare module 'com.sk89q.worldguard.bukkit.event.block' {
608
+ import { DelegateEvent, BulkEvent } from 'com.sk89q.worldguard.bukkit.event';
609
+ import { World, Location, Material } from 'org.bukkit';
610
+ import { List } from 'java.util';
611
+ import { Block, BlockState } from 'org.bukkit.block';
612
+ import { Predicate } from 'java.util.function';
613
+ import { Event, HandlerList } from 'org.bukkit.event';
614
+ import { Cause } from 'com.sk89q.worldguard.bukkit.cause';
615
+
616
+ interface AbstractBlockEvent extends BulkEvent, DelegateEvent {}
617
+ class AbstractBlockEvent extends BulkEvent {
618
+ filter(predicate: Predicate<Location>, cancelEventOnFalse: boolean): boolean;
619
+ filter(predicate: Predicate<Location>): boolean;
620
+ get blocks(): Block[];
621
+ get effectiveMaterial(): Material;
622
+ get explicitResult(): Result;
623
+ get result(): Result;
624
+ get world(): World;
625
+ }
626
+
627
+
628
+ interface PlaceBlockEvent extends AbstractBlockEvent {}
629
+ class PlaceBlockEvent extends AbstractBlockEvent {
630
+ constructor(originalEvent: Event, cause: Cause, world: World, blocks: BlockState[]);
631
+
632
+ constructor(originalEvent: Event, cause: Cause, world: World, blocks: Block[], effectiveMaterial: Material);
633
+
634
+ constructor(originalEvent: Event, cause: Cause, block: Block);
635
+
636
+ constructor(originalEvent: Event, cause: Cause, target: Location, effectiveMaterial: Material);
637
+ static get handlerList(): HandlerList;
638
+ get handlers(): HandlerList;
639
+ }
640
+
641
+
642
+ interface UseBlockEvent extends AbstractBlockEvent {}
643
+ class UseBlockEvent extends AbstractBlockEvent {
644
+ constructor(originalEvent: Event, cause: Cause, world: World, blocks: Block[], effectiveMaterial: Material);
645
+
646
+ constructor(originalEvent: Event, cause: Cause, block: Block);
647
+
648
+ constructor(originalEvent: Event, cause: Cause, target: Location, effectiveMaterial: Material);
649
+ static get handlerList(): HandlerList;
650
+ get handlers(): HandlerList;
651
+ }
652
+
653
+
654
+ interface BreakBlockEvent extends AbstractBlockEvent {}
655
+ class BreakBlockEvent extends AbstractBlockEvent {
656
+ constructor(originalEvent: Event, cause: Cause, world: World, blocks: Block[], effectiveMaterial: Material);
657
+
658
+ constructor(originalEvent: Event, cause: Cause, block: Block);
659
+
660
+ constructor(originalEvent: Event, cause: Cause, target: Location, effectiveMaterial: Material);
661
+ static get handlerList(): HandlerList;
662
+ get handlers(): HandlerList;
663
+ }
664
+
665
+ }
666
+
667
+ declare module 'com.sk89q.worldguard.bukkit.event.debug' {
668
+ import { Cancellable } from 'org.bukkit.event';
669
+ import { List } from 'java.util';
670
+ import { StackTraceElement } from 'java.lang';
671
+ import { BlockPlaceEvent, Action, BlockBreakEvent } from 'org.bukkit.event.block';
672
+ import { Block, BlockState, BlockFace } from 'org.bukkit.block';
673
+ import { ItemStack } from 'org.bukkit.inventory';
674
+ import { Player, Entity } from 'org.bukkit.entity';
675
+ import { EntityDamageByEntityEvent } from 'org.bukkit.event.entity';
676
+ import { PlayerInteractEvent } from 'org.bukkit.event.player';
677
+
678
+ interface CancelLogging extends Cancellable {}
679
+ class CancelLogging extends Cancellable {
680
+ get cancels(): CancelAttempt[];
681
+ }
682
+
683
+
684
+ class CancelLogger {
685
+ get cancels(): CancelAttempt[];
686
+ log(before: boolean, after: boolean, stackTrace: StackTraceElement[]): void;
687
+ }
688
+
689
+
690
+ interface LoggingBlockPlaceEvent extends CancelLogging, BlockPlaceEvent {}
691
+ class LoggingBlockPlaceEvent extends CancelLogging {
692
+ constructor(placedBlock: Block, replacedBlockState: BlockState, placedAgainst: Block, itemInHand: ItemStack, thePlayer: Player, canBuild: boolean);
693
+ get cancels(): CancelAttempt[];
694
+ setCancelled(cancel: boolean): void;
695
+ }
696
+
697
+
698
+ interface LoggingEntityDamageByEntityEvent extends CancelLogging, EntityDamageByEntityEvent {}
699
+ class LoggingEntityDamageByEntityEvent extends CancelLogging {
700
+ constructor(damager: Entity, damagee: Entity, cause: DamageCause, damage: number);
701
+ get cancels(): CancelAttempt[];
702
+ setCancelled(cancel: boolean): void;
703
+ }
704
+
705
+
706
+ class CancelAttempt {
707
+ constructor(before: boolean, after: boolean, stackTrace: StackTraceElement[]);
708
+ get after(): boolean;
709
+ get before(): boolean;
710
+ get stackTrace(): StackTraceElement[];
711
+ }
712
+
713
+
714
+ interface LoggingPlayerInteractEvent extends CancelLogging, PlayerInteractEvent {}
715
+ class LoggingPlayerInteractEvent extends CancelLogging {
716
+ constructor(who: Player, action: Action, item: ItemStack, clickedBlock: Block, clickedFace: BlockFace);
717
+ get cancels(): CancelAttempt[];
718
+ setCancelled(cancel: boolean): void;
719
+ setUseInteractedBlock(useInteractedBlock: Result): void;
720
+ setUseItemInHand(useItemInHand: Result): void;
721
+ }
722
+
723
+
724
+ interface LoggingBlockBreakEvent extends CancelLogging, BlockBreakEvent {}
725
+ class LoggingBlockBreakEvent extends CancelLogging {
726
+ constructor(block: Block, player: Player);
727
+ get cancels(): CancelAttempt[];
728
+ setCancelled(cancel: boolean): void;
729
+ }
730
+
731
+ }
732
+
733
+ declare module 'com.sk89q.worldguard.bukkit.protection.events.flags' {
734
+ import { Event, HandlerList } from 'org.bukkit.event';
735
+ import { FlagContextBuilder } from 'com.sk89q.worldguard.protection.flags.FlagContext';
736
+
737
+ interface FlagContextCreateEvent extends Event {}
738
+ class FlagContextCreateEvent extends Event {
739
+ constructor(builder: FlagContextBuilder);
740
+ addObject(key: string, value: any): boolean;
741
+ static get handlerList(): HandlerList;
742
+ get handlers(): HandlerList;
743
+ }
744
+
745
+ }
746
+
747
+ declare module 'com.sk89q.worldguard.bukkit.protection.events' {
748
+ import { Event, Cancellable, HandlerList } from 'org.bukkit.event';
749
+ import { Player } from 'org.bukkit.entity';
750
+
751
+ interface DisallowedPVPEvent extends Cancellable, Event {}
752
+ class DisallowedPVPEvent extends Cancellable {
753
+ constructor(attacker: Player, defender: Player, event: Event);
754
+ get attacker(): Player;
755
+ get cause(): Event;
756
+ get defender(): Player;
757
+ static get handlerList(): HandlerList;
758
+ get handlers(): HandlerList;
759
+ isCancelled(): boolean;
760
+ setCancelled(cancelled: boolean): void;
761
+ }
762
+
763
+ }
764
+
765
+ declare module 'com.sk89q.worldguard.bukkit.listener' {
766
+ import { WorldGuardPlugin } from 'com.sk89q.worldguard.bukkit';
767
+ import { ProcessPlayerEvent } from 'com.sk89q.worldguard.bukkit.event.player';
768
+ import { EntityDamageEvent, EntityCombustEvent, FoodLevelChangeEvent, EntityPotionEffectEvent, EntityChangeBlockEvent, EntityExplodeEvent, EntityInteractEvent, CreatureSpawnEvent, ExpBottleEvent, EntityDeathEvent, EntityUnleashEvent, EntityTameEvent, EntityPickupItemEvent, PotionSplashEvent, LingeringPotionSplashEvent, AreaEffectCloudApplyEvent, ExplosionPrimeEvent, EntityTransformEvent, PigZapEvent, CreeperPowerEvent, EntityRegainHealthEvent, EntityMountEvent } from 'org.bukkit.event.entity';
769
+ import { SpawnEntityEvent, DestroyEntityEvent, UseEntityEvent, DamageEntityEvent } from 'com.sk89q.worldguard.bukkit.event.entity';
770
+ import { BlockBreakEvent, BlockMultiPlaceEvent, BlockPlaceEvent, BlockBurnEvent, BlockPistonRetractEvent, BlockPistonExtendEvent, BlockDamageEvent, EntityBlockFormEvent, BlockFertilizeEvent, BlockIgniteEvent, SignChangeEvent, BlockFromToEvent, BlockExpEvent, BlockDispenseEvent, BlockExplodeEvent, CauldronLevelChangeEvent, BlockPhysicsEvent, BlockRedstoneEvent, LeavesDecayEvent, BlockFormEvent, BlockSpreadEvent, BlockGrowEvent, BlockFadeEvent, MoistureChangeEvent, BlockDispenseArmorEvent } from 'org.bukkit.event.block';
771
+ import { StructureGrowEvent, PortalCreateEvent, ChunkLoadEvent, WorldLoadEvent } from 'org.bukkit.event.world';
772
+ import { PlayerInteractEvent, PlayerBedEnterEvent, PlayerBucketEmptyEvent, PlayerBucketFillEvent, PlayerFishEvent, PlayerInteractEntityEvent, PlayerShearEntityEvent, PlayerPickupItemEvent, PlayerDropItemEvent, PlayerItemConsumeEvent, PlayerInteractAtEntityEvent, PlayerTakeLecternBookEvent, PlayerItemHeldEvent, PlayerGameModeChangeEvent, PlayerJoinEvent, AsyncPlayerChatEvent, PlayerLoginEvent, PlayerRespawnEvent, PlayerTeleportEvent, PlayerCommandPreprocessEvent, PlayerMoveEvent, PlayerQuitEvent } from 'org.bukkit.event.player';
773
+ import { HangingPlaceEvent, HangingBreakEvent } from 'org.bukkit.event.hanging';
774
+ import { VehicleDestroyEvent, VehicleDamageEvent, VehicleEnterEvent, VehicleExitEvent, VehicleMoveEvent } from 'org.bukkit.event.vehicle';
775
+ import { InventoryOpenEvent, InventoryMoveItemEvent, InventoryClickEvent, InventoryDragEvent, InventoryCreativeEvent } from 'org.bukkit.event.inventory';
776
+ import { WeatherChangeEvent, ThunderChangeEvent, LightningStrikeEvent } from 'org.bukkit.event.weather';
777
+ import { PlaceBlockEvent, BreakBlockEvent, UseBlockEvent } from 'com.sk89q.worldguard.bukkit.event.block';
778
+ import { UseItemEvent } from 'com.sk89q.worldguard.bukkit.event.inventory';
779
+ import { Listener } from 'org.bukkit.event';
780
+ import { PluginEnableEvent, PluginDisableEvent } from 'org.bukkit.event.server';
781
+ import { PlayerWhoisEvent } from 'InfoComponent';
782
+ import { Logger } from 'java.util.logging';
783
+ import { World } from 'org.bukkit';
784
+
785
+ interface PlayerModesListener extends AbstractListener {}
786
+ class PlayerModesListener extends AbstractListener {
787
+ constructor(plugin: WorldGuardPlugin);
788
+ onProcessPlayer(event: ProcessPlayerEvent): void;
789
+ }
790
+
791
+
792
+ interface InvincibilityListener extends AbstractListener {}
793
+ class InvincibilityListener extends AbstractListener {
794
+ constructor(plugin: WorldGuardPlugin);
795
+ onEntityCombust(event: EntityCombustEvent): void;
796
+ onEntityDamage(event: EntityDamageEvent): void;
797
+ onFoodLevelChange(event: FoodLevelChangeEvent): void;
798
+ }
799
+
800
+
801
+ interface WorldRulesListener extends AbstractListener {}
802
+ class WorldRulesListener extends AbstractListener {
803
+ constructor(plugin: WorldGuardPlugin);
804
+ onPotionEffect(event: EntityPotionEffectEvent): void;
805
+ onSpawnEntity(event: SpawnEntityEvent): void;
806
+ }
807
+
808
+
809
+ interface EventAbstractionListener extends AbstractListener {}
810
+ class EventAbstractionListener extends AbstractListener {
811
+ constructor(plugin: WorldGuardPlugin);
812
+ onBedEnter(event: PlayerBedEnterEvent): void;
813
+ onBlockBreak(event: BlockBreakEvent): void;
814
+ onBlockBurn(event: BlockBurnEvent): void;
815
+ onBlockDamage(event: BlockDamageEvent): void;
816
+ onBlockDispense(event: BlockDispenseEvent): void;
817
+ onBlockExp(event: BlockExpEvent): void;
818
+ onBlockExplode(event: BlockExplodeEvent): void;
819
+ onBlockFertilize(event: BlockFertilizeEvent): void;
820
+ onBlockFromTo(event: BlockFromToEvent): void;
821
+ onBlockIgnite(event: BlockIgniteEvent): void;
822
+ onBlockMultiPlace(event: BlockMultiPlaceEvent): void;
823
+ onBlockPistonExtend(event: BlockPistonExtendEvent): void;
824
+ onBlockPistonRetract(event: BlockPistonRetractEvent): void;
825
+ onBlockPlace(event: BlockPlaceEvent): void;
826
+ onCauldronLevelChange(event: CauldronLevelChangeEvent): void;
827
+ onCreatureSpawn(event: CreatureSpawnEvent): void;
828
+ onEntityBlockForm(event: EntityBlockFormEvent): void;
829
+ onEntityChangeBlock(event: EntityChangeBlockEvent): void;
830
+ onEntityCombust(event: EntityCombustEvent): void;
831
+ onEntityDamage(event: EntityDamageEvent): void;
832
+ onEntityDeath(event: EntityDeathEvent): void;
833
+ onEntityExplode(event: EntityExplodeEvent): void;
834
+ onEntityInteract(event: EntityInteractEvent): void;
835
+ onEntityPickupItem(event: EntityPickupItemEvent): void;
836
+ onEntityTame(event: EntityTameEvent): void;
837
+ onEntityUnleash(event: EntityUnleashEvent): void;
838
+ onExpBottle(event: ExpBottleEvent): void;
839
+ onHangingBreak(event: HangingBreakEvent): void;
840
+ onHangingPlace(event: HangingPlaceEvent): void;
841
+ onInventoryMoveItem(event: InventoryMoveItemEvent): void;
842
+ onInventoryOpen(event: InventoryOpenEvent): void;
843
+ onLingeringApply(event: AreaEffectCloudApplyEvent): void;
844
+ onLingeringSplash(event: LingeringPotionSplashEvent): void;
845
+ onPlayerBucketEmpty(event: PlayerBucketEmptyEvent): void;
846
+ onPlayerBucketFill(event: PlayerBucketFillEvent): void;
847
+ onPlayerDropItem(event: PlayerDropItemEvent): void;
848
+ onPlayerFish(event: PlayerFishEvent): void;
849
+ onPlayerInteract(event: PlayerInteractEvent): void;
850
+ onPlayerInteractAtEntity(event: PlayerInteractAtEntityEvent): void;
851
+ onPlayerInteractEntity(event: PlayerInteractEntityEvent): void;
852
+ onPlayerItemConsume(event: PlayerItemConsumeEvent): void;
853
+ onPlayerPickupItem(event: PlayerPickupItemEvent): void;
854
+ onPlayerShearEntity(event: PlayerShearEntityEvent): void;
855
+ onPotionSplash(event: PotionSplashEvent): void;
856
+ onSignChange(event: SignChangeEvent): void;
857
+ onStructureGrowEvent(event: StructureGrowEvent): void;
858
+ onTakeLecternBook(event: PlayerTakeLecternBookEvent): void;
859
+ onVehicleDamage(event: VehicleDamageEvent): void;
860
+ onVehicleDestroy(event: VehicleDestroyEvent): void;
861
+ registerEvents(): void;
862
+ }
863
+
864
+
865
+ interface WorldGuardHangingListener extends AbstractListener {}
866
+ class WorldGuardHangingListener extends AbstractListener {
867
+ constructor(plugin: WorldGuardPlugin);
868
+ onHangingBreak(event: HangingBreakEvent): void;
869
+ }
870
+
871
+
872
+ interface WorldGuardWeatherListener extends AbstractListener {}
873
+ class WorldGuardWeatherListener extends AbstractListener {
874
+ constructor(plugin: WorldGuardPlugin);
875
+ onLightningStrike(event: LightningStrikeEvent): void;
876
+ onThunderChange(event: ThunderChangeEvent): void;
877
+ onWeatherChange(event: WeatherChangeEvent): void;
878
+ }
879
+
880
+
881
+ interface BuildPermissionListener extends AbstractListener {}
882
+ class BuildPermissionListener extends AbstractListener {
883
+ constructor(plugin: WorldGuardPlugin);
884
+ onBreakBlock(event: BreakBlockEvent): void;
885
+ onDamageEntity(event: DamageEntityEvent): void;
886
+ onDestroyEntity(event: DestroyEntityEvent): void;
887
+ onPlaceBlock(event: PlaceBlockEvent): void;
888
+ onSpawnEntity(event: SpawnEntityEvent): void;
889
+ onUseBlock(event: UseBlockEvent): void;
890
+ onUseEntity(event: UseEntityEvent): void;
891
+ onUseItem(event: UseItemEvent): void;
892
+ }
893
+
894
+
895
+ interface WorldGuardBlockListener extends AbstractListener {}
896
+ class WorldGuardBlockListener extends AbstractListener {
897
+ constructor(plugin: WorldGuardPlugin);
898
+ onBlockBreak(event: BlockBreakEvent): void;
899
+ onBlockBurn(event: BlockBurnEvent): void;
900
+ onBlockExplode(event: BlockExplodeEvent): void;
901
+ onBlockFade(event: BlockFadeEvent): void;
902
+ onBlockForm(event: BlockFormEvent): void;
903
+ onBlockFromTo(event: BlockFromToEvent): void;
904
+ onBlockGrow(event: BlockGrowEvent): void;
905
+ onBlockIgnite(event: BlockIgniteEvent): void;
906
+ onBlockPhysics(event: BlockPhysicsEvent): void;
907
+ onBlockPlace(event: BlockPlaceEvent): void;
908
+ onBlockRedstoneChange(event: BlockRedstoneEvent): void;
909
+ onBlockSpread(event: BlockSpreadEvent): void;
910
+ onLeavesDecay(event: LeavesDecayEvent): void;
911
+ onMoistureChange(event: MoistureChangeEvent): void;
912
+ }
913
+
914
+
915
+ interface ChestProtectionListener extends AbstractListener {}
916
+ class ChestProtectionListener extends AbstractListener {
917
+ constructor(plugin: WorldGuardPlugin);
918
+ onBreakBlock(event: BreakBlockEvent): void;
919
+ onPlaceBlock(event: PlaceBlockEvent): void;
920
+ onSignChange(event: SignChangeEvent): void;
921
+ onUseBlock(event: UseBlockEvent): void;
922
+ }
923
+
924
+
925
+ interface BlacklistListener extends AbstractListener {}
926
+ class BlacklistListener extends AbstractListener {
927
+ constructor(plugin: WorldGuardPlugin);
928
+ onBlockDispense(event: BlockDispenseEvent): void;
929
+ onBlockDispenseArmor(event: BlockDispenseArmorEvent): void;
930
+ onBreakBlock(event: BreakBlockEvent): void;
931
+ onDestroyEntity(event: DestroyEntityEvent): void;
932
+ onInventoryClick(event: InventoryClickEvent): void;
933
+ onInventoryCreative(event: InventoryCreativeEvent): void;
934
+ onInventoryDrag(event: InventoryDragEvent): void;
935
+ onPlaceBlock(event: PlaceBlockEvent): void;
936
+ onPlayerDropItem(event: PlayerDropItemEvent): void;
937
+ onPlayerItemHeld(event: PlayerItemHeldEvent): void;
938
+ onSpawnEntity(event: SpawnEntityEvent): void;
939
+ onUseBlock(event: UseBlockEvent): void;
940
+ onUseItem(event: UseItemEvent): void;
941
+ }
942
+
943
+
944
+ interface WorldGuardEntityListener extends AbstractListener {}
945
+ class WorldGuardEntityListener extends AbstractListener {
946
+ constructor(plugin: WorldGuardPlugin);
947
+ onCreatePortal(event: PortalCreateEvent): void;
948
+ onCreatureSpawn(event: CreatureSpawnEvent): void;
949
+ onCreeperPower(event: CreeperPowerEvent): void;
950
+ onEntityChangeBlock(event: EntityChangeBlockEvent): void;
951
+ onEntityDamage(event: EntityDamageEvent): void;
952
+ onEntityDeath(event: EntityDeathEvent): void;
953
+ onEntityExplode(event: EntityExplodeEvent): void;
954
+ onEntityInteract(event: EntityInteractEvent): void;
955
+ onEntityRegainHealth(event: EntityRegainHealthEvent): void;
956
+ onEntityTransform(event: EntityTransformEvent): void;
957
+ onExplosionPrime(event: ExplosionPrimeEvent): void;
958
+ onFoodChange(event: FoodLevelChangeEvent): void;
959
+ onPigZap(event: PigZapEvent): void;
960
+ onVehicleEnter(event: VehicleEnterEvent): void;
961
+ }
962
+
963
+
964
+ interface RegionProtectionListener extends AbstractListener {}
965
+ class RegionProtectionListener extends AbstractListener {
966
+ constructor(plugin: WorldGuardPlugin);
967
+ onBreakBlock(event: BreakBlockEvent): void;
968
+ onDamageEntity(event: DamageEntityEvent): void;
969
+ onDestroyEntity(event: DestroyEntityEvent): void;
970
+ onPlaceBlock(event: PlaceBlockEvent): void;
971
+ onSpawnEntity(event: SpawnEntityEvent): void;
972
+ onUseBlock(event: UseBlockEvent): void;
973
+ onUseEntity(event: UseEntityEvent): void;
974
+ onVehicleExit(event: VehicleExitEvent): void;
975
+ }
976
+
977
+
978
+ interface AbstractListener extends Listener {}
979
+ class AbstractListener extends Listener {
980
+ constructor(plugin: WorldGuardPlugin);
981
+ registerEvents(): void;
982
+ }
983
+
984
+
985
+ interface WorldGuardServerListener extends AbstractListener {}
986
+ class WorldGuardServerListener extends AbstractListener {
987
+ constructor(plugin: WorldGuardPlugin);
988
+ onPluginDisable(event: PluginDisableEvent): void;
989
+ onPluginEnable(event: PluginEnableEvent): void;
990
+ }
991
+
992
+
993
+ interface WorldGuardCommandBookListener extends Listener {}
994
+ class WorldGuardCommandBookListener extends Listener {
995
+ constructor(plugin: WorldGuardPlugin);
996
+ onPlayerWhois(event: PlayerWhoisEvent): void;
997
+ }
998
+
999
+
1000
+ interface DebuggingListener extends AbstractListener {}
1001
+ class DebuggingListener extends AbstractListener {
1002
+ constructor(plugin: WorldGuardPlugin, logger: Logger);
1003
+ onBreakBlock(event: BreakBlockEvent): void;
1004
+ onDamageEntity(event: DamageEntityEvent): void;
1005
+ onDestroyEntity(event: DestroyEntityEvent): void;
1006
+ onPlaceBlock(event: PlaceBlockEvent): void;
1007
+ onSpawnEntity(event: SpawnEntityEvent): void;
1008
+ onUseBlock(event: UseBlockEvent): void;
1009
+ onUseEntity(event: UseEntityEvent): void;
1010
+ onUseItem(event: UseItemEvent): void;
1011
+ }
1012
+
1013
+
1014
+ interface RegionFlagsListener extends AbstractListener {}
1015
+ class RegionFlagsListener extends AbstractListener {
1016
+ constructor(plugin: WorldGuardPlugin);
1017
+ onBreakBlock(event: BreakBlockEvent): void;
1018
+ onEntityDamage(event: EntityDamageEvent): void;
1019
+ onPlaceBlock(event: PlaceBlockEvent): void;
1020
+ }
1021
+
1022
+
1023
+ interface WorldGuardWorldListener extends AbstractListener {}
1024
+ class WorldGuardWorldListener extends AbstractListener {
1025
+ constructor(plugin: WorldGuardPlugin);
1026
+ initWorld(world: World): void;
1027
+ onChunkLoad(event: ChunkLoadEvent): void;
1028
+ onWorldLoad(event: WorldLoadEvent): void;
1029
+ }
1030
+
1031
+
1032
+ interface WorldGuardPlayerListener extends AbstractListener {}
1033
+ class WorldGuardPlayerListener extends AbstractListener {
1034
+ constructor(plugin: WorldGuardPlugin);
1035
+ onItemHeldChange(event: PlayerItemHeldEvent): void;
1036
+ onPlayerChat(event: AsyncPlayerChatEvent): void;
1037
+ onPlayerCommandPreprocess(event: PlayerCommandPreprocessEvent): void;
1038
+ onPlayerGameModeChange(event: PlayerGameModeChangeEvent): void;
1039
+ onPlayerInteract(event: PlayerInteractEvent): void;
1040
+ onPlayerJoin(event: PlayerJoinEvent): void;
1041
+ onPlayerLogin(event: PlayerLoginEvent): void;
1042
+ onPlayerRespawn(event: PlayerRespawnEvent): void;
1043
+ onPlayerTeleport(event: PlayerTeleportEvent): void;
1044
+ }
1045
+
1046
+
1047
+ interface PlayerMoveListener extends AbstractListener {}
1048
+ class PlayerMoveListener extends AbstractListener {
1049
+ constructor(plugin: WorldGuardPlugin);
1050
+ onEntityMount(event: EntityMountEvent): void;
1051
+ onPlayerMove(event: PlayerMoveEvent): void;
1052
+ onPlayerQuit(event: PlayerQuitEvent): void;
1053
+ onPlayerRespawn(event: PlayerRespawnEvent): void;
1054
+ onVehicleEnter(event: VehicleEnterEvent): void;
1055
+ registerEvents(): void;
1056
+ }
1057
+
1058
+
1059
+ interface BlockedPotionsListener extends AbstractListener {}
1060
+ class BlockedPotionsListener extends AbstractListener {
1061
+ constructor(plugin: WorldGuardPlugin);
1062
+ onItemInteract(event: UseItemEvent): void;
1063
+ onProjectile(event: DamageEntityEvent): void;
1064
+ }
1065
+
1066
+
1067
+ interface WorldGuardVehicleListener extends AbstractListener {}
1068
+ class WorldGuardVehicleListener extends AbstractListener {
1069
+ constructor(plugin: WorldGuardPlugin);
1070
+ onVehicleMove(event: VehicleMoveEvent): void;
1071
+ }
1072
+
1073
+ }
1074
+
1075
+ declare module 'com.sk89q.worldguard.bukkit.listener.debounce.legacy' {
1076
+ import { Entry } from 'com.sk89q.worldguard.bukkit.listener.debounce.legacy.AbstractEventDebounce';
1077
+ import { Key } from 'com.sk89q.worldguard.bukkit.listener.debounce.legacy.BlockEntityEventDebounce';
1078
+ import { Block } from 'org.bukkit.block';
1079
+ import { Entity } from 'org.bukkit.entity';
1080
+ import { Cancellable, Event } from 'org.bukkit.event';
1081
+ import { Key as com_sk89q_worldguard_bukkit_listener_debounce_legacy_entityentityeventdebounce_Key } from 'com.sk89q.worldguard.bukkit.listener.debounce.legacy.EntityEntityEventDebounce';
1082
+ import { Key as com_sk89q_worldguard_bukkit_listener_debounce_legacy_inventorymoveitemeventdebounce_Key } from 'com.sk89q.worldguard.bukkit.listener.debounce.legacy.InventoryMoveItemEventDebounce';
1083
+ import { InventoryMoveItemEvent } from 'org.bukkit.event.inventory';
1084
+
1085
+ class AbstractEventDebounce<K = any> {
1086
+ load(key: K): Entry;
1087
+ }
1088
+
1089
+
1090
+ interface BlockEntityEventDebounce extends AbstractEventDebounce<Key> {}
1091
+ class BlockEntityEventDebounce extends AbstractEventDebounce<Key> {
1092
+ constructor(debounceTime: number);
1093
+ debounce<T extends Event & Cancellable>(block: Block, entity: Entity, originalEvent: Cancellable, firedEvent: T): void;
1094
+ }
1095
+
1096
+
1097
+ interface EntityEntityEventDebounce extends AbstractEventDebounce<com_sk89q_worldguard_bukkit_listener_debounce_legacy_entityentityeventdebounce_Key> {}
1098
+ class EntityEntityEventDebounce extends AbstractEventDebounce<com_sk89q_worldguard_bukkit_listener_debounce_legacy_entityentityeventdebounce_Key> {
1099
+ constructor(debounceTime: number);
1100
+ debounce<T extends Event & Cancellable>(source: Entity, target: Entity, originalEvent: Cancellable, firedEvent: T): void;
1101
+ }
1102
+
1103
+
1104
+ interface InventoryMoveItemEventDebounce extends AbstractEventDebounce<com_sk89q_worldguard_bukkit_listener_debounce_legacy_inventorymoveitemeventdebounce_Key> {}
1105
+ class InventoryMoveItemEventDebounce extends AbstractEventDebounce<com_sk89q_worldguard_bukkit_listener_debounce_legacy_inventorymoveitemeventdebounce_Key> {
1106
+ constructor(debounceTime: number);
1107
+ tryDebounce(event: InventoryMoveItemEvent): Entry;
1108
+ }
1109
+
1110
+ }
1111
+
1112
+ declare module 'com.sk89q.worldguard.bukkit.listener.debounce.legacy.AbstractEventDebounce' {
1113
+ class Entry {
1114
+ setCancelled(cancelled: boolean): void;
1115
+ }
1116
+
1117
+ }
1118
+
1119
+ declare module 'com.sk89q.worldguard.bukkit.listener.debounce' {
1120
+ import { BlockPistonExtendEvent, BlockPistonRetractEvent } from 'org.bukkit.event.block';
1121
+ import { Entry } from 'com.sk89q.worldguard.bukkit.listener.debounce.EventDebounce';
1122
+ import { Cancellable, Event } from 'org.bukkit.event';
1123
+
1124
+ class BlockPistonExtendKey {
1125
+ constructor(event: BlockPistonExtendEvent);
1126
+ equals(o: any): boolean;
1127
+ hashCode(): number;
1128
+ }
1129
+
1130
+
1131
+ class EventDebounce<K = any> {
1132
+ constructor(debounceTime: number);
1133
+ static create<K>(debounceTime: number): EventDebounce<K>;
1134
+ fireToCancel<T extends Event & Cancellable>(originalEvent: Cancellable, firedEvent: T, key: K): void;
1135
+ getIfNotPresent<T extends Event & Cancellable>(key: K, originalEvent: Cancellable): Entry;
1136
+ load(key: K): Entry;
1137
+ }
1138
+
1139
+
1140
+ class BlockPistonRetractKey {
1141
+ constructor(event: BlockPistonRetractEvent);
1142
+ equals(o: any): boolean;
1143
+ hashCode(): number;
1144
+ }
1145
+
1146
+ }
1147
+
1148
+ declare module 'com.sk89q.worldguard.bukkit.listener.debounce.EventDebounce' {
1149
+ class Entry {
1150
+ setCancelled(cancelled: boolean): void;
1151
+ }
1152
+
1153
+ }
1154
+
1155
+ declare module 'com.sk89q.worldguard.util.profile.resolver' {
1156
+ import { Profile } from 'com.sk89q.worldguard.util.profile';
1157
+ import { UUID } from 'java.util';
1158
+
1159
+ interface PaperProfileService extends SingleRequestService {}
1160
+ class PaperProfileService extends SingleRequestService {
1161
+ findByName(name: string): Profile;
1162
+ findByUuid(uuid: UUID): Profile;
1163
+ get idealRequestLimit(): number;
1164
+ static get instance(): PaperProfileService;
1165
+ }
1166
+
1167
+ }
package/index.d.ts ADDED
@@ -0,0 +1,3 @@
1
+ // Auto generated index file, do not edit!
2
+
3
+ /// <reference path="com_sk89q.d.ts" />
package/package.json ADDED
@@ -0,0 +1,14 @@
1
+ {
2
+ "name": "@craftjs-typings/worldguard",
3
+ "version": "7.1.0",
4
+ "description": "WorldGuard TypeScript bindings",
5
+ "repository": {
6
+ "type": "git",
7
+ "url": "https://github.com/raikasdev/craftjs-types.git",
8
+ "directory": "packages/worldguard"
9
+ },
10
+ "author": "raikasdev",
11
+ "dependencies": {
12
+ "@craftjs-typings/java.base": "latest"
13
+ }
14
+ }