Skip to content
Open

26.2 #396

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 21
java-version: 25

- name: Cache maven packages to speed up build
uses: actions/cache@v4
Expand Down
22 changes: 5 additions & 17 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
<version>master</version>

<properties>
<maven.compiler.source>21</maven.compiler.source>
<maven.compiler.target>21</maven.compiler.target>
<maven.compiler.source>25</maven.compiler.source>
<maven.compiler.target>25</maven.compiler.target>
<maven.test.skip>true</maven.test.skip>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
Expand All @@ -15,14 +15,14 @@
<dependency>
<groupId>io.papermc.paper</groupId>
<artifactId>paper-api</artifactId>
<version>1.21.10-R0.1-SNAPSHOT</version>
<version>26.2.build.15-alpha</version>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>com.github.oshi</groupId>
<artifactId>oshi-core</artifactId>
<version>6.6.5</version>
<version>6.9.0</version>
<!-- This is a vanilla dependency, as of 1.20.4 -->
<scope>provided</scope>
</dependency>
Expand All @@ -37,19 +37,7 @@

<build>
<finalName>${project.artifactId}</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.4.2</version>
<configuration>
<archive>
<manifestEntries>
<paperweight-mappings-namespace>mojang</paperweight-mappings-namespace>
</manifestEntries>
</archive>
</configuration>
</plugin>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,14 @@
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;

import javax.annotation.Nonnull;
import org.jspecify.annotations.NonNull;

public final class CommandBroadcastMM implements CommandExecutor {
private static final MiniMessage MINI_MESSAGE = MiniMessage.miniMessage();

public boolean onCommand(final @Nonnull CommandSender sender,
final @Nonnull Command command,
final @Nonnull String label,
public boolean onCommand(final @NonNull CommandSender sender,
final @NonNull Command command,
final @NonNull String label,
final String[] args) {
if (args.length == 0) {
sender.sendMessage(Component
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,14 @@
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;

import javax.annotation.Nonnull;
import org.jspecify.annotations.NonNull;

public final class CommandBroadcastRainbow implements CommandExecutor {
private static final MiniMessage MINI_MESSAGE = MiniMessage.miniMessage();

public boolean onCommand(final @Nonnull CommandSender sender,
final @Nonnull Command command,
final @Nonnull String label,
public boolean onCommand(final @NonNull CommandSender sender,
final @NonNull Command command,
final @NonNull String label,
final String[] args) {
if (args.length == 0) {
sender.sendMessage(Component
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,18 @@
import org.bukkit.command.CommandSender;
import org.bukkit.command.ConsoleCommandSender;
import org.bukkit.entity.Player;
import org.jspecify.annotations.NonNull;

import javax.annotation.Nonnull;
import java.util.Collection;

public final class CommandBroadcastVanilla implements CommandExecutor {
private static final LegacyComponentSerializer LEGACY_COMPONENT_SERIALIZER =
LegacyComponentSerializer
.legacyAmpersand();

public boolean onCommand(final @Nonnull CommandSender sender,
final @Nonnull Command command,
final @Nonnull String label,
public boolean onCommand(final @NonNull CommandSender sender,
final @NonNull Command command,
final @NonNull String label,
final String[] args) {
if (args.length == 0) {
sender.sendMessage(Component
Expand Down
9 changes: 4 additions & 5 deletions src/main/java/pw/kaboom/extras/commands/CommandClearChat.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,12 @@
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;

import javax.annotation.Nonnull;
import org.jspecify.annotations.NonNull;

public final class CommandClearChat implements CommandExecutor {
public boolean onCommand(final @Nonnull CommandSender sender,
final @Nonnull Command command,
final @Nonnull String label,
public boolean onCommand(final @NonNull CommandSender sender,
final @NonNull Command command,
final @NonNull String label,
final String[] args) {
final int maxMessages = 100;
Component clearChatComponent = Component.empty();
Expand Down
9 changes: 4 additions & 5 deletions src/main/java/pw/kaboom/extras/commands/CommandConsole.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,13 @@
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
import org.jspecify.annotations.NonNull;
import pw.kaboom.extras.util.Utility;

import javax.annotation.Nonnull;

public final class CommandConsole implements CommandExecutor {
public boolean onCommand(final @Nonnull CommandSender sender,
final @Nonnull Command command,
final @Nonnull String label,
public boolean onCommand(final @NonNull CommandSender sender,
final @NonNull Command command,
final @NonNull String label,
final String[] args) {
if (args.length == 0) {
sender.sendMessage(Component
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,13 @@
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Entity;
import org.bukkit.entity.EntityType;

import javax.annotation.Nonnull;
import org.jspecify.annotations.NonNull;

public final class CommandDestroyEntities implements CommandExecutor {
@Override
public boolean onCommand(final @Nonnull CommandSender sender,
final @Nonnull Command command,
final @Nonnull String label,
public boolean onCommand(final @NonNull CommandSender sender,
final @NonNull Command command,
final @NonNull String label,
final String[] args) {
int entityCount = 0;
int worldCount = 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,12 @@
import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack;
import org.jetbrains.annotations.NotNull;

import javax.annotation.Nonnull;
import org.jspecify.annotations.NonNull;

public final class CommandEnchantAll implements CommandExecutor {
public boolean onCommand(final @Nonnull CommandSender sender,
final @Nonnull Command command,
final @Nonnull String label,
public boolean onCommand(final @NonNull CommandSender sender,
final @NonNull Command command,
final @NonNull String label,
final String[] args) {
if (!(sender instanceof final Player player)) {
sender.sendMessage(Component
Expand Down
9 changes: 4 additions & 5 deletions src/main/java/pw/kaboom/extras/commands/CommandGetJSON.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,12 @@
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;

import javax.annotation.Nonnull;
import org.jspecify.annotations.NonNull;

public final class CommandGetJSON implements CommandExecutor {
public boolean onCommand(final @Nonnull CommandSender sender,
final @Nonnull Command command,
final @Nonnull String label,
public boolean onCommand(final @NonNull CommandSender sender,
final @NonNull Command command,
final @NonNull String label,
final String[] args) {
if (args.length == 0) {
sender.sendMessage(Component
Expand Down
9 changes: 4 additions & 5 deletions src/main/java/pw/kaboom/extras/commands/CommandGetJSONMM.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,12 @@
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;

import javax.annotation.Nonnull;
import org.jspecify.annotations.NonNull;

public final class CommandGetJSONMM implements CommandExecutor {
public boolean onCommand(final @Nonnull CommandSender sender,
final @Nonnull Command command,
final @Nonnull String label,
public boolean onCommand(final @NonNull CommandSender sender,
final @NonNull Command command,
final @NonNull String label,
final String[] args) {
if (args.length == 0) {
sender.sendMessage(Component
Expand Down
9 changes: 4 additions & 5 deletions src/main/java/pw/kaboom/extras/commands/CommandJumpscare.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;

import javax.annotation.Nonnull;
import org.jspecify.annotations.NonNull;

public final class CommandJumpscare implements CommandExecutor {
private void createJumpscare(final Player player) {
Expand All @@ -23,9 +22,9 @@ private void createJumpscare(final Player player) {
}
}

public boolean onCommand(final @Nonnull CommandSender sender,
final @Nonnull Command command,
final @Nonnull String label,
public boolean onCommand(final @NonNull CommandSender sender,
final @NonNull Command command,
final @NonNull String label,
final String[] args) {
if (args.length == 0) {
sender.sendMessage(Component
Expand Down
116 changes: 58 additions & 58 deletions src/main/java/pw/kaboom/extras/commands/CommandKaboom.java
Original file line number Diff line number Diff line change
@@ -1,58 +1,58 @@
package pw.kaboom.extras.commands;
import net.kyori.adventure.text.Component;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.World;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack;
import javax.annotation.Nonnull;
import java.util.concurrent.ThreadLocalRandom;
public final class CommandKaboom implements CommandExecutor {
public boolean onCommand(final @Nonnull CommandSender sender,
final @Nonnull Command command,
final @Nonnull String label,
final String[] args) {
if (!(sender instanceof final Player player)) {
sender.sendMessage(Component
.text("Command has to be run by a player"));
return true;
}
boolean explode = ThreadLocalRandom.current().nextBoolean();
if (explode) {
final Location location = player.getLocation();
final World world = player.getWorld();
final int explosionCount = 20;
final int power = 8;
world.createExplosion(location, power, true, true);
for (int i = 0; i < explosionCount; i++) {
final double posX = location.getX() + ThreadLocalRandom.current().nextInt(-15, 15);
final double posY = location.getY() + ThreadLocalRandom.current().nextInt(-6, 6);
final double posZ = location.getZ() + ThreadLocalRandom.current().nextInt(-15, 15);
final Location explodeLocation = new Location(world, posX, posY, posZ);
final int power2 = 4;
world.createExplosion(explodeLocation, power2, true, true);
explodeLocation.getBlock().setType(Material.LAVA);
}
player.sendMessage(Component.text("Forgive me :c"));
return true;
}
player.getInventory().setItemInMainHand(new ItemStack(Material.CAKE));
player.sendMessage(Component.text("Have a nice day :)"));
return true;
}
}
package pw.kaboom.extras.commands;

import net.kyori.adventure.text.Component;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.World;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack;
import org.jspecify.annotations.NonNull;

import java.util.concurrent.ThreadLocalRandom;

public final class CommandKaboom implements CommandExecutor {

public boolean onCommand(final @NonNull CommandSender sender,
final @NonNull Command command,
final @NonNull String label,
final String[] args) {
if (!(sender instanceof final Player player)) {
sender.sendMessage(Component
.text("Command has to be run by a player"));
return true;
}

boolean explode = ThreadLocalRandom.current().nextBoolean();

if (explode) {
final Location location = player.getLocation();
final World world = player.getWorld();
final int explosionCount = 20;
final int power = 8;

world.createExplosion(location, power, true, true);

for (int i = 0; i < explosionCount; i++) {
final double posX = location.getX() + ThreadLocalRandom.current().nextInt(-15, 15);
final double posY = location.getY() + ThreadLocalRandom.current().nextInt(-6, 6);
final double posZ = location.getZ() + ThreadLocalRandom.current().nextInt(-15, 15);

final Location explodeLocation = new Location(world, posX, posY, posZ);
final int power2 = 4;

world.createExplosion(explodeLocation, power2, true, true);
explodeLocation.getBlock().setType(Material.LAVA);
}

player.sendMessage(Component.text("Forgive me :c"));
return true;
}

player.getInventory().setItemInMainHand(new ItemStack(Material.CAKE));
player.sendMessage(Component.text("Have a nice day :)"));
return true;
}
}
9 changes: 4 additions & 5 deletions src/main/java/pw/kaboom/extras/commands/CommandPing.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,13 @@
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;

import javax.annotation.Nonnull;
import org.jspecify.annotations.NonNull;

public final class CommandPing implements CommandExecutor {

public boolean onCommand(final @Nonnull CommandSender sender,
final @Nonnull Command command,
final @Nonnull String label,
public boolean onCommand(final @NonNull CommandSender sender,
final @NonNull Command command,
final @NonNull String label,
final String[] args) {
Player target;

Expand Down
Loading
Loading