-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove Lombok and refactor constructors.
Replaced Lombok annotations with explicit constructors throughout the codebase. Updated usages of `@Getter` and `@RequiredArgsConstructor` to improve clarity and remove dependency on Lombok. Also refined Gradle dependencies by removing unused Lombok references.
- Loading branch information
Showing
41 changed files
with
504 additions
and
126 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 6 additions & 3 deletions
9
api/src/main/java/net/thenextlvl/worlds/api/event/WorldDeleteEvent.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,24 @@ | ||
package net.thenextlvl.worlds.api.event; | ||
|
||
import lombok.Getter; | ||
import org.bukkit.World; | ||
import org.bukkit.event.HandlerList; | ||
import org.bukkit.event.world.WorldEvent; | ||
import org.jspecify.annotations.NullMarked; | ||
|
||
@NullMarked | ||
public class WorldDeleteEvent extends WorldEvent { | ||
private static final @Getter HandlerList handlerList = new HandlerList(); | ||
private static final HandlerList handlerList = new HandlerList(); | ||
|
||
public WorldDeleteEvent(World world) { | ||
super(world, false); | ||
} | ||
|
||
@Override | ||
public HandlerList getHandlers() { | ||
return getHandlerList(); | ||
return handlerList; | ||
} | ||
|
||
public static HandlerList getHandlerList() { | ||
return handlerList; | ||
} | ||
} |
27 changes: 25 additions & 2 deletions
27
api/src/main/java/net/thenextlvl/worlds/api/exception/GeneratorException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,45 @@ | ||
package net.thenextlvl.worlds.api.exception; | ||
|
||
import lombok.Getter; | ||
import org.jspecify.annotations.NullMarked; | ||
import org.jspecify.annotations.Nullable; | ||
|
||
/** | ||
* The GeneratorException class is a custom exception that is thrown when a requested plugin as a generator | ||
* cannot be found, is disabled, or doesn't provide a chunk generator or biome provider. | ||
*/ | ||
@Getter | ||
@NullMarked | ||
public class GeneratorException extends RuntimeException { | ||
private final String plugin; | ||
private final @Nullable String id; | ||
|
||
/** | ||
* Constructs a new GeneratorException with the specified plugin name, generator ID, and error message. | ||
* | ||
* @param plugin the name of the plugin associated with the generator | ||
* @param id the unique identifier for the generator | ||
* @param message the detailed error message describing the reason for the exception | ||
*/ | ||
public GeneratorException(String plugin, @Nullable String id, String message) { | ||
super(message); | ||
this.plugin = plugin; | ||
this.id = id; | ||
} | ||
|
||
/** | ||
* Retrieves the name of the plugin associated with the generator exception. | ||
* | ||
* @return a string representing the plugin name | ||
*/ | ||
public String getPlugin() { | ||
return plugin; | ||
} | ||
|
||
/** | ||
* Retrieves the unique identifier associated with the generator exception. | ||
* | ||
* @return a nullable string representing the ID of the generator, or null if no ID is provided | ||
*/ | ||
public @Nullable String getId() { | ||
return id; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.