Skip to content

Commit

Permalink
fix: generate specific events that are being omitted
Browse files Browse the repository at this point in the history
  • Loading branch information
gabizou committed Oct 10, 2024
1 parent 917991a commit 714ccd7
Show file tree
Hide file tree
Showing 11 changed files with 18 additions and 4 deletions.
3 changes: 0 additions & 3 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -219,9 +219,6 @@ idea {
delegateBuildRunToGradle = false
testRunner = org.jetbrains.gradle.ext.ActionDelegationConfig.TestRunner.PLATFORM
}
taskTriggers {
// beforeBuild(tasks.genEventImpl)
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
import org.spongepowered.api.item.inventory.ItemStack;
import org.spongepowered.api.util.Direction;
import org.spongepowered.api.util.Tristate;
import org.spongepowered.eventgen.annotations.GenerateFactoryMethod;
import org.spongepowered.eventgen.annotations.ImplementedBy;
import org.spongepowered.api.world.server.ServerLocation;
import org.spongepowered.math.vector.Vector3d;
Expand Down Expand Up @@ -104,6 +105,7 @@ interface Finish extends Primary, Cancellable {
*
* <p>This is usually right-click.</p>
*/
@GenerateFactoryMethod
interface Secondary extends InteractBlockEvent {

Tristate originalUseItemResult();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
import org.spongepowered.api.event.entity.living.AnimateHandEvent;
import org.spongepowered.api.item.inventory.ItemStack;
import org.spongepowered.api.item.inventory.ItemStackSnapshot;
import org.spongepowered.eventgen.annotations.GenerateFactoryMethod;

/**
* Base event for all interactions with an {@link ItemStack} in hand.
Expand Down Expand Up @@ -65,6 +66,7 @@ interface Primary extends InteractItemEvent {
*
* <p>Vanilla minecraft does not call an event when interacting with an empty hand in air.</p>
*/
@GenerateFactoryMethod
interface Secondary extends InteractItemEvent, Cancellable {

interface Pre extends Secondary {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,10 @@
*/
package org.spongepowered.api.event.lifecycle;

import org.spongepowered.eventgen.annotations.GenerateFactoryMethod;
import org.spongepowered.plugin.PluginContainer;

@GenerateFactoryMethod
public interface ConstructPluginEvent extends LifecycleEvent {

PluginContainer plugin();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,13 @@
package org.spongepowered.api.event.lifecycle;

import org.spongepowered.api.Game;
import org.spongepowered.eventgen.annotations.GenerateFactoryMethod;

/**
* Called when the implementation signals that all the aspects of the
* {@link Game} have completed loading.
*/
@GenerateFactoryMethod
public interface LoadedGameEvent extends LifecycleEvent {

}
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
package org.spongepowered.api.event.lifecycle;

import org.spongepowered.api.Game;
import org.spongepowered.eventgen.annotations.GenerateFactoryMethod;

/**
* Fired when something within a {@link Game} triggers a refresh of
Expand All @@ -37,6 +38,7 @@
* plugin use.
* </p>
*/
@GenerateFactoryMethod
public interface RefreshGameEvent extends LifecycleEvent {

}
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
package org.spongepowered.api.event.lifecycle;

import org.spongepowered.api.Engine;
import org.spongepowered.eventgen.annotations.GenerateFactoryMethod;

@GenerateFactoryMethod
public interface StartedEngineEvent<E extends Engine> extends EngineLifecycleEvent<E> {
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
package org.spongepowered.api.event.lifecycle;

import org.spongepowered.api.Engine;
import org.spongepowered.eventgen.annotations.GenerateFactoryMethod;

@GenerateFactoryMethod
public interface StartingEngineEvent<E extends Engine> extends EngineLifecycleEvent<E> {
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
package org.spongepowered.api.event.lifecycle;

import org.spongepowered.api.Game;
import org.spongepowered.eventgen.annotations.GenerateFactoryMethod;

/**
* This event is called at the end of a {@link Game} instance, after the game's
Expand All @@ -38,6 +39,7 @@
* <p>Most users will want to listen to {@link StoppingEngineEvent} instead, to
* do operations tied to the lifecycle of one single engine.</p>
*/
@GenerateFactoryMethod
public interface StoppedGameEvent extends LifecycleEvent {

}
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
package org.spongepowered.api.event.lifecycle;

import org.spongepowered.api.Engine;
import org.spongepowered.eventgen.annotations.GenerateFactoryMethod;

@GenerateFactoryMethod
public interface StoppingEngineEvent<E extends Engine> extends EngineLifecycleEvent<E> {
}
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
* Fired when sending a chat message.
* To modify the message use {@link Decorate}.
*/
@NoFactoryMethod(ignoreNested = true)
public interface PlayerChatEvent extends MessageEvent {

/**
Expand Down

0 comments on commit 714ccd7

Please sign in to comment.