Skip to content

Commit

Permalink
Experimental annotation changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Lulu13022002 committed Jan 28, 2025
1 parent 7e21cb8 commit 76f5566
Show file tree
Hide file tree
Showing 23 changed files with 17 additions and 55 deletions.
24 changes: 12 additions & 12 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
[*]
charset=utf-8
end_of_line=lf
insert_final_newline=true
indent_style=space
indent_size=4
charset = utf-8
end_of_line = lf
insert_final_newline = true
indent_style = space
indent_size = 4
ij_any_block_comment_add_space = false
ij_any_block_comment_at_first_column = false
ij_any_line_comment_at_first_column = false
ij_any_line_comment_add_space = true

[*.tiny]
indent_style=tab
indent_style = tab

[*.bat]
end_of_line=crlf
end_of_line = crlf

[*.yml]
indent_size=2
indent_size = 2

[*.patch]
trim_trailing_whitespace=false
trim_trailing_whitespace = false

[*.java]
ij_continuation_indent_size = 4
ij_java_class_count_to_use_import_on_demand = 999999
ij_java_insert_inner_class_imports = false
ij_java_names_count_to_use_import_on_demand = 999999
ij_java_imports_layout = *,|,$*
ij_java_imports_layout = *, |, $*
ij_java_generate_final_locals = true
ij_java_generate_final_parameters = true
ij_java_method_parameters_new_line_after_left_paren = true
Expand All @@ -40,5 +40,5 @@ ij_java_use_fq_class_names = true
[paper-server/src/minecraft/resources/data/**/*.json]
indent_size = 2

[paper-api-generator/generated/**/*.java]
ij_java_imports_layout = $*,|,*
[paper-api/src/generated/java/**/*.java]
ij_java_imports_layout = $*, |, *
3 changes: 2 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,8 @@ required.
with `// Paper end - <COMMIT DESCRIPTION>`.
- One-line changes should have `// Paper - <COMMIT DESCRIPTION>` at the end of the line.

> [!NOTE] These comments are incredibly important to be able to keep track of changes
> [!NOTE]
> These comments are incredibly important to be able to keep track of changes
> across files and to remember what they are for, even a decade into the future.
Here's an example of how to mark changes by Paper:
Expand Down
1 change: 0 additions & 1 deletion paper-api/src/main/java/org/bukkit/Registry.java
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,6 @@ public Iterator<KeyedBossBar> iterator() {
* @see JukeboxSong
* @deprecated use {@link RegistryAccess#getRegistry(RegistryKey)} with {@link RegistryKey#JUKEBOX_SONG}
*/
@ApiStatus.Experimental
@Deprecated(since = "1.21")
Registry<JukeboxSong> JUKEBOX_SONG = legacyRegistryFor(JukeboxSong.class);
/**
Expand Down
3 changes: 0 additions & 3 deletions paper-api/src/main/java/org/bukkit/block/Crafter.java
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
package org.bukkit.block;

import org.bukkit.loot.Lootable;
import org.jetbrains.annotations.ApiStatus;

/**
* Represents a captured state of a crafter.
*/
Expand Down
3 changes: 0 additions & 3 deletions paper-api/src/main/java/org/bukkit/block/CreakingHeart.java
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
package org.bukkit.block;

import org.jetbrains.annotations.ApiStatus;

/**
* Represents a captured state of a creaking heart.
*/
@ApiStatus.Experimental
public interface CreakingHeart extends TileState {
}
1 change: 0 additions & 1 deletion paper-api/src/main/java/org/bukkit/block/TrialSpawner.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import org.bukkit.entity.Entity;
import org.bukkit.entity.Player;
import org.bukkit.spawner.TrialSpawnerConfiguration;
import org.jetbrains.annotations.ApiStatus;
import org.jetbrains.annotations.NotNull;

/**
Expand Down
2 changes: 0 additions & 2 deletions paper-api/src/main/java/org/bukkit/block/Vault.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
package org.bukkit.block;

import org.jetbrains.annotations.ApiStatus;

/**
* Represents a captured state of a trial spawner.
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
package org.bukkit.block.data.type;

import org.bukkit.block.data.Orientable;
import org.jetbrains.annotations.ApiStatus;

/**
* 'active' is whether the block is active.
* <br>
* 'natural' is whether this is a naturally generated block.
*/
@ApiStatus.Experimental
public interface CreakingHeart extends Orientable {

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
package org.bukkit.block.data.type;

import org.bukkit.block.data.BlockData;
import org.jetbrains.annotations.ApiStatus;

/**
* 'tip' indicates whether this block is a tip.
*/
@ApiStatus.Experimental
public interface HangingMoss extends BlockData {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import org.bukkit.block.BlockFace;
import org.bukkit.block.data.BlockData;
import org.jetbrains.annotations.ApiStatus;
import org.jetbrains.annotations.NotNull;

/**
Expand All @@ -11,7 +10,6 @@
*
* 'bottom' denotes whether this is a bottom block.
*/
@ApiStatus.Experimental
public interface MossyCarpet extends BlockData {

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
package org.bukkit.entity;

import org.jetbrains.annotations.ApiStatus;

/**
* Represents a Wind Charge.
*/
Expand Down
2 changes: 0 additions & 2 deletions paper-api/src/main/java/org/bukkit/entity/Bogged.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
package org.bukkit.entity;

import org.jetbrains.annotations.ApiStatus;

/**
* Represents a Bogged Skeleton.
*/
Expand Down
2 changes: 0 additions & 2 deletions paper-api/src/main/java/org/bukkit/entity/Breeze.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
package org.bukkit.entity;

import org.jetbrains.annotations.ApiStatus;

/**
* Represents a Breeze. Whoosh!
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
package org.bukkit.entity;

import org.jetbrains.annotations.ApiStatus;

/**
* Represents a Wind Charge.
*/
Expand Down
3 changes: 0 additions & 3 deletions paper-api/src/main/java/org/bukkit/entity/Creaking.java
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
package org.bukkit.entity;

import org.jetbrains.annotations.ApiStatus;

/**
* Represents a Creaking.
*/
@ApiStatus.Experimental
public interface Creaking extends Monster {

}
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package org.bukkit.entity;

import org.bukkit.inventory.ItemStack;
import org.jetbrains.annotations.ApiStatus;
import org.jetbrains.annotations.Nullable;

/**
Expand Down
2 changes: 0 additions & 2 deletions paper-api/src/main/java/org/bukkit/entity/WindCharge.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
package org.bukkit.entity;

import org.jetbrains.annotations.ApiStatus;

/**
* Represents a Wind Charge.
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
package org.bukkit.entity.boat;

import org.bukkit.entity.Boat;
import org.jetbrains.annotations.ApiStatus;

/**
* Represents an pale oak boat.
* Represents a pale oak boat.
*/
@ApiStatus.Experimental
public interface PaleOakBoat extends Boat {
}
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
package org.bukkit.entity.boat;

import org.bukkit.entity.ChestBoat;
import org.jetbrains.annotations.ApiStatus;

/**
* Represents an pale oak chest boat.
* Represents a pale oak chest boat.
*/
@ApiStatus.Experimental
public interface PaleOakChestBoat extends ChestBoat {
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
package org.bukkit.inventory;

import org.jetbrains.annotations.ApiStatus;

/**
* Interface to the inventory of a Crafter.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,9 @@

import java.util.List;
import org.bukkit.inventory.ItemStack;
import org.jetbrains.annotations.ApiStatus;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

@ApiStatus.Experimental
public interface BundleMeta extends ItemMeta {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,6 @@ public Builder maximumCost(final EnchantmentCost maximumCost) {

@Override
public Builder anvilCost(final @Range(from = 0, to = Integer.MAX_VALUE) int anvilCost) {
Preconditions.checkArgument(anvilCost >= 0, "anvilCost must be non-negative");
this.anvilCost = OptionalInt.of(asArgumentMin(anvilCost, "anvilCost", 0));
return this;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -590,7 +590,7 @@ public byte[] serializeEntity(org.bukkit.entity.Entity entity, EntitySerializati
e.getStringUUID()
);
} else {
// Ensure player flag is not needed
// Ensure misc flag is not needed
Preconditions.checkArgument(
nmsEntity.getType().canSerialize() || allowMiscSerialization,
"Cannot serialize misc non-saveable entity %s(%s) without the MISC flag",
Expand Down

0 comments on commit 76f5566

Please sign in to comment.