1
mirror of https://github.com/StarWishsama/Slimefun4.git synced 2024-09-19 19:25:48 +00:00

[CI skip] Lock in RC-24 release date

This commit is contained in:
TheBusyBiscuit 2021-06-03 18:57:07 +02:00
parent 5f8bd1b909
commit b7c6a431a5
7 changed files with 27 additions and 46 deletions

View File

@ -1,5 +1,5 @@
# Table of contents # Table of contents
- [Release Candidate 24 (TBD)](#release-candidate-24-tbd) - [Release Candidate 24 (03 Jun 2021)](#release-candidate-24-03-jun-2021)
- [Release Candidate 23 (19 May 2021)](#release-candidate-23-19-may-2021) - [Release Candidate 23 (19 May 2021)](#release-candidate-23-19-may-2021)
- [Release Candidate 22 (18 Apr 2021)](#release-candidate-22-18-apr-2021) - [Release Candidate 22 (18 Apr 2021)](#release-candidate-22-18-apr-2021)
- [Release Candidate 21 (14 Mar 2021)](#release-candidate-21-14-mar-2021) - [Release Candidate 21 (14 Mar 2021)](#release-candidate-21-14-mar-2021)
@ -24,7 +24,7 @@
- [Release Candidate 2 (29 Sep 2019)](#release-candidate-2-29-sep-2019) - [Release Candidate 2 (29 Sep 2019)](#release-candidate-2-29-sep-2019)
- [Release Candidate 1 (26 Sep 2019)](#release-candidate-1-26-sep-2019) - [Release Candidate 1 (26 Sep 2019)](#release-candidate-1-26-sep-2019)
## Release Candidate 24 (TBD) ## Release Candidate 24 (03 Jun 2021)
#### Additions #### Additions
* (API) Added AsyncMachineOperationFinishEvent * (API) Added AsyncMachineOperationFinishEvent

View File

@ -50,8 +50,7 @@ public interface SlimefunAddon {
* *
* @return The Name of this {@link SlimefunAddon} * @return The Name of this {@link SlimefunAddon}
*/ */
@Nonnull default @Nonnull String getName() {
default String getName() {
return getJavaPlugin().getName(); return getJavaPlugin().getName();
} }
@ -61,8 +60,7 @@ public interface SlimefunAddon {
* *
* @return The version of this {@link SlimefunAddon} * @return The version of this {@link SlimefunAddon}
*/ */
@Nonnull default @Nonnull String getPluginVersion() {
default String getPluginVersion() {
return getJavaPlugin().getDescription().getVersion(); return getJavaPlugin().getDescription().getVersion();
} }
@ -72,8 +70,7 @@ public interface SlimefunAddon {
* *
* @return The {@link Logger} of this {@link SlimefunAddon} * @return The {@link Logger} of this {@link SlimefunAddon}
*/ */
@Nonnull default @Nonnull Logger getLogger() {
default Logger getLogger() {
return getJavaPlugin().getLogger(); return getJavaPlugin().getLogger();
} }

View File

@ -61,8 +61,7 @@ public enum SlimefunBranch {
* *
* @return The name of this {@link SlimefunBranch} * @return The name of this {@link SlimefunBranch}
*/ */
@Nonnull public @Nonnull String getName() {
public String getName() {
return name; return name;
} }

View File

@ -99,8 +99,7 @@ public abstract class Network {
* *
* @return The assigned type of {@link NetworkComponent} for this {@link Location} * @return The assigned type of {@link NetworkComponent} for this {@link Location}
*/ */
@Nullable public abstract @Nullable NetworkComponent classifyLocation(@Nonnull Location l);
public abstract NetworkComponent classifyLocation(@Nonnull Location l);
/** /**
* This method is called whenever a {@link Location} in this {@link Network} changes * This method is called whenever a {@link Location} in this {@link Network} changes
@ -175,8 +174,7 @@ public abstract class Network {
} }
} }
@Nullable private @Nullable NetworkComponent getCurrentClassification(@Nonnull Location l) {
private NetworkComponent getCurrentClassification(@Nonnull Location l) {
if (regulatorNodes.contains(l)) { if (regulatorNodes.contains(l)) {
return NetworkComponent.REGULATOR; return NetworkComponent.REGULATOR;
} else if (connectorNodes.contains(l)) { } else if (connectorNodes.contains(l)) {
@ -259,8 +257,7 @@ public abstract class Network {
* *
* @return The {@link Location} of our regulator * @return The {@link Location} of our regulator
*/ */
@Nonnull public @Nonnull Location getRegulator() {
public Location getRegulator() {
return regulator; return regulator;
} }

View File

@ -110,8 +110,7 @@ public class PlayerProfile {
* *
* @return The cached armor for this {@link Player} * @return The cached armor for this {@link Player}
*/ */
@Nonnull public @Nonnull HashedArmorpiece[] getArmor() {
public HashedArmorpiece[] getArmor() {
return armor; return armor;
} }
@ -121,8 +120,7 @@ public class PlayerProfile {
* *
* @return The {@link Config} associated with this {@link PlayerProfile} * @return The {@link Config} associated with this {@link PlayerProfile}
*/ */
@Nonnull public @Nonnull Config getConfig() {
public Config getConfig() {
return configFile; return configFile;
} }
@ -131,8 +129,7 @@ public class PlayerProfile {
* *
* @return The {@link UUID} of our {@link PlayerProfile} * @return The {@link UUID} of our {@link PlayerProfile}
*/ */
@Nonnull public @Nonnull UUID getUUID() {
public UUID getUUID() {
return uuid; return uuid;
} }
@ -211,8 +208,7 @@ public class PlayerProfile {
* *
* @return A {@code Hashset<Research>} of all Researches this {@link Player} has unlocked * @return A {@code Hashset<Research>} of all Researches this {@link Player} has unlocked
*/ */
@Nonnull public @Nonnull Set<Research> getResearches() {
public Set<Research> getResearches() {
return ImmutableSet.copyOf(researches); return ImmutableSet.copyOf(researches);
} }
@ -222,8 +218,7 @@ public class PlayerProfile {
* *
* @return A {@link List} containing every {@link Waypoint} * @return A {@link List} containing every {@link Waypoint}
*/ */
@Nonnull public @Nonnull List<Waypoint> getWaypoints() {
public List<Waypoint> getWaypoints() {
return ImmutableList.copyOf(waypoints); return ImmutableList.copyOf(waypoints);
} }
@ -283,8 +278,7 @@ public class PlayerProfile {
dirty = true; dirty = true;
} }
@Nonnull public @Nonnull PlayerBackpack createBackpack(int size) {
public PlayerBackpack createBackpack(int size) {
IntStream stream = IntStream.iterate(0, i -> i + 1).filter(i -> !configFile.contains("backpacks." + i + ".size")); IntStream stream = IntStream.iterate(0, i -> i + 1).filter(i -> !configFile.contains("backpacks." + i + ".size"));
int id = stream.findFirst().getAsInt(); int id = stream.findFirst().getAsInt();
@ -294,8 +288,7 @@ public class PlayerProfile {
return backpack; return backpack;
} }
@Nonnull public @Nonnull Optional<PlayerBackpack> getBackpack(int id) {
public Optional<PlayerBackpack> getBackpack(int id) {
if (id < 0) { if (id < 0) {
throw new IllegalArgumentException("Backpacks cannot have negative ids!"); throw new IllegalArgumentException("Backpacks cannot have negative ids!");
} }
@ -313,8 +306,7 @@ public class PlayerProfile {
return Optional.empty(); return Optional.empty();
} }
@Nonnull public @Nonnull String getTitle() {
public String getTitle() {
List<String> titles = SlimefunPlugin.getRegistry().getResearchRanks(); List<String> titles = SlimefunPlugin.getRegistry().getResearchRanks();
float fraction = (float) researches.size() / SlimefunPlugin.getRegistry().getResearches().size(); float fraction = (float) researches.size() / SlimefunPlugin.getRegistry().getResearches().size();
@ -344,8 +336,7 @@ public class PlayerProfile {
* *
* @return The {@link Player} of this {@link PlayerProfile} or null * @return The {@link Player} of this {@link PlayerProfile} or null
*/ */
@Nullable public @Nullable Player getPlayer() {
public Player getPlayer() {
return Bukkit.getPlayer(getUUID()); return Bukkit.getPlayer(getUUID());
} }
@ -355,8 +346,7 @@ public class PlayerProfile {
* *
* @return The {@link GuideHistory} of this {@link Player} * @return The {@link GuideHistory} of this {@link Player}
*/ */
@Nonnull public @Nonnull GuideHistory getGuideHistory() {
public GuideHistory getGuideHistory() {
return guideHistory; return guideHistory;
} }
@ -431,13 +421,11 @@ public class PlayerProfile {
* *
* @return An {@link Optional} describing the result * @return An {@link Optional} describing the result
*/ */
@Nonnull public static @Nonnull Optional<PlayerProfile> find(@Nonnull OfflinePlayer p) {
public static Optional<PlayerProfile> find(@Nonnull OfflinePlayer p) {
return Optional.ofNullable(SlimefunPlugin.getRegistry().getPlayerProfiles().get(p.getUniqueId())); return Optional.ofNullable(SlimefunPlugin.getRegistry().getPlayerProfiles().get(p.getUniqueId()));
} }
@Nonnull public static @Nonnull Iterator<PlayerProfile> iterator() {
public static Iterator<PlayerProfile> iterator() {
return SlimefunPlugin.getRegistry().getPlayerProfiles().values().iterator(); return SlimefunPlugin.getRegistry().getPlayerProfiles().values().iterator();
} }

View File

@ -33,9 +33,8 @@ public class StatusEffect implements Keyed {
this.key = key; this.key = key;
} }
@Nonnull
@Override @Override
public NamespacedKey getKey() { public @Nonnull NamespacedKey getKey() {
return key; return key;
} }
@ -120,8 +119,7 @@ public class StatusEffect implements Keyed {
* The {@link Player} to check for * The {@link Player} to check for
* @return An {@link OptionalInt} that describes the result * @return An {@link OptionalInt} that describes the result
*/ */
@Nonnull public @Nonnull OptionalInt getLevel(@Nonnull Player p) {
public OptionalInt getLevel(@Nonnull Player p) {
Optional<String> optional = PersistentDataAPI.getOptionalString(p, getKey()); Optional<String> optional = PersistentDataAPI.getOptionalString(p, getKey());
if (optional.isPresent()) { if (optional.isPresent()) {

View File

@ -102,8 +102,10 @@ public class OilPump extends AContainer implements RecipeDisplayItem {
SlimefunPlugin.getGPSNetwork().getResourceManager().setSupplies(oil, b.getWorld(), b.getX() >> 4, b.getZ() >> 4, supplies.getAsInt() - 1); SlimefunPlugin.getGPSNetwork().getResourceManager().setSupplies(oil, b.getWorld(), b.getX() >> 4, b.getZ() >> 4, supplies.getAsInt() - 1);
return recipe; return recipe;
} else { } else {
// Move the empty bucket to the output slot to prevent this /*
// from immediately starting all over again (to prevent lag) * Move the empty bucket to the output slot to prevent this
* from immediately starting all over again (to prevent lag)
*/
ItemStack item = inv.getItemInSlot(slot).clone(); ItemStack item = inv.getItemInSlot(slot).clone();
inv.replaceExistingItem(slot, null); inv.replaceExistingItem(slot, null);
inv.pushItem(item, getOutputSlots()); inv.pushItem(item, getOutputSlots());