mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-07-04 03:56:41 +00:00
Add and apply .editorconfig from P2 (#1195)
* Consistenty use javax annotations. - Unfortunately jetbrains annotations seem to be exposed transitively via core somewhere, but with the correct IDE settings, annotations can be defaulted to javax - Cleaning up of import order in #1195 - Must be merged before #1195 * Add and apply .editorconfig from P2 - Does not rearrange entries * Address some comments * add back some javadoc comments * Address final comments Co-authored-by: NotMyFault <mc.cache@web.de>
This commit is contained in:
@ -38,4 +38,5 @@ public class AdapterLoadException extends Exception {
|
||||
public AdapterLoadException(Throwable cause) {
|
||||
super(cause);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -23,8 +23,8 @@ import com.fastasyncworldedit.bukkit.FaweBukkit;
|
||||
import com.fastasyncworldedit.bukkit.adapter.IBukkitAdapter;
|
||||
import com.fastasyncworldedit.bukkit.adapter.NMSRelighterFactory;
|
||||
import com.fastasyncworldedit.core.Fawe;
|
||||
import com.fastasyncworldedit.core.queue.IChunkGet;
|
||||
import com.fastasyncworldedit.core.extent.processor.lighting.RelighterFactory;
|
||||
import com.fastasyncworldedit.core.queue.IChunkGet;
|
||||
import com.fastasyncworldedit.core.queue.implementation.packet.ChunkPacket;
|
||||
import com.sk89q.jnbt.AdventureNBTConverter;
|
||||
import com.sk89q.jnbt.Tag;
|
||||
@ -59,10 +59,10 @@ import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.Map;
|
||||
import java.util.OptionalInt;
|
||||
import java.util.Set;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
/**
|
||||
* An interface for adapters of various Bukkit implementations.
|
||||
@ -123,7 +123,7 @@ public interface BukkitImplAdapter<T> extends IBukkitAdapter {
|
||||
* Create the given entity.
|
||||
*
|
||||
* @param location the location
|
||||
* @param state the state
|
||||
* @param state the state
|
||||
* @return the created entity or null
|
||||
*/
|
||||
@Nullable
|
||||
@ -164,8 +164,8 @@ public interface BukkitImplAdapter<T> extends IBukkitAdapter {
|
||||
/**
|
||||
* Send the given NBT data to the player.
|
||||
*
|
||||
* @param player The player
|
||||
* @param pos The position
|
||||
* @param player The player
|
||||
* @param pos The position
|
||||
* @param nbtData The NBT Data
|
||||
*/
|
||||
void sendFakeNBT(Player player, BlockVector3 pos, CompoundBinaryTag nbtData);
|
||||
@ -181,10 +181,10 @@ public interface BukkitImplAdapter<T> extends IBukkitAdapter {
|
||||
/**
|
||||
* Simulates a player using an item.
|
||||
*
|
||||
* @param world the world
|
||||
* @param world the world
|
||||
* @param position the location
|
||||
* @param item the item to be used
|
||||
* @param face the direction in which to "face" when using the item
|
||||
* @param item the item to be used
|
||||
* @param face the direction in which to "face" when using the item
|
||||
* @return whether the usage was successful
|
||||
*/
|
||||
default boolean simulateItemUse(World world, BlockVector3 position, BaseItem item, Direction face) {
|
||||
@ -194,8 +194,8 @@ public interface BukkitImplAdapter<T> extends IBukkitAdapter {
|
||||
/**
|
||||
* Gets whether the given {@link BlockState} can be placed here.
|
||||
*
|
||||
* @param world The world
|
||||
* @param position The position
|
||||
* @param world The world
|
||||
* @param position The position
|
||||
* @param blockState The blockstate
|
||||
* @return If it can be placed
|
||||
*/
|
||||
@ -243,9 +243,10 @@ public interface BukkitImplAdapter<T> extends IBukkitAdapter {
|
||||
|
||||
/**
|
||||
* Regenerate a region in the given world, so it appears "as new".
|
||||
* @param world the world to regen in
|
||||
* @param region the region to regen
|
||||
* @param extent the extent to use for setting blocks
|
||||
*
|
||||
* @param world the world to regen in
|
||||
* @param region the region to regen
|
||||
* @param extent the extent to use for setting blocks
|
||||
* @param options the regeneration options
|
||||
* @return true on success, false on failure
|
||||
*/
|
||||
|
@ -47,15 +47,15 @@ public class BukkitImplLoader {
|
||||
private static final String CLASS_SUFFIX = ".class";
|
||||
|
||||
private static final String LOAD_ERROR_MESSAGE =
|
||||
//FAWE start - exchange WorldEdit to FAWE & suggest to update Fawe & the server software
|
||||
"\n**********************************************\n"
|
||||
+ "** This FastAsyncWorldEdit version does not fully support your version of Bukkit.\n"
|
||||
+ "** You can fix this by:\n"
|
||||
+ "** - Updating your server version (Check /version to see how many versions you are behind)\n** - Updating FAWE\n"
|
||||
+ "**\n" + "** When working with blocks or undoing, chests will be empty, signs\n"
|
||||
+ "** will be blank, and so on. There will be no support for entity\n"
|
||||
+ "** and block property-related functions.\n"
|
||||
+ "**********************************************\n";
|
||||
//FAWE start - exchange WorldEdit to FAWE & suggest to update Fawe & the server software
|
||||
"\n**********************************************\n"
|
||||
+ "** This FastAsyncWorldEdit version does not fully support your version of Bukkit.\n"
|
||||
+ "** You can fix this by:\n"
|
||||
+ "** - Updating your server version (Check /version to see how many versions you are behind)\n** - Updating FAWE\n"
|
||||
+ "**\n" + "** When working with blocks or undoing, chests will be empty, signs\n"
|
||||
+ "** will be blank, and so on. There will be no support for entity\n"
|
||||
+ "** and block property-related functions.\n"
|
||||
+ "**********************************************\n";
|
||||
//FAWE end
|
||||
|
||||
/**
|
||||
@ -164,10 +164,10 @@ public class BukkitImplLoader {
|
||||
}
|
||||
} catch (ClassNotFoundException e) {
|
||||
LOGGER.warn("Failed to load the Bukkit adapter class '" + className
|
||||
+ "' that is not supposed to be missing", e);
|
||||
+ "' that is not supposed to be missing", e);
|
||||
} catch (IllegalAccessException e) {
|
||||
LOGGER.warn("Failed to load the Bukkit adapter class '" + className
|
||||
+ "' that is not supposed to be raising this error", e);
|
||||
+ "' that is not supposed to be raising this error", e);
|
||||
} catch (Throwable e) {
|
||||
if (className.equals(customCandidate)) {
|
||||
LOGGER.warn("Failed to load the Bukkit adapter class '" + className + "'", e);
|
||||
|
Reference in New Issue
Block a user