···144144 generateConfigOption("world.settings.mob-spawner-area-limit.enable", true);
145145 generateConfigOption("world.settings.mob-spawner-area-limit.limit", 150);
146146 generateConfigOption("world.settings.mob-spawner-area-limit.chunk-radius", 8);
147147- generateConfigOption("world.settings.mob-spawner-area-limit.info",
148148- "This setting controls the maximum number of entities of a mob spawner type that can exist within the defined chunk radius around a mob spawner. If the number of entities exceeds this limit, the spawner will stop spawning additional entities of that type. This is useful to stop the extreme lag that can be caused by mob spawners.");
147147+ generateConfigOption("world.settings.mob-spawner-area-limit.info", "This setting controls the maximum number of entities of a mob spawner type that can exist within the defined chunk radius around a mob spawner. If the number of entities exceeds this limit, the spawner will stop spawning additional entities of that type. This is useful to stop the extreme lag that can be caused by mob spawners.");
149148150149151150 //generateConfigOption("world-settings.eject-from-vehicle-on-teleport.enabled", true);
···27272828 /**
2929 * Checks if the date in the log line is today's date
3030+ *
3031 * @param date The date in the log line. Format: "yyyy-MM-dd"
3132 * @return True if the date in the log line is today's date, false otherwise
3233 */
3334 private boolean isToday(String date) {
3434- String[] dateParts = date.split("-");
3535+ String[] dateParts = date.split("-");
3536 LocalDateTime logLineDateTime = LocalDateTime.of(Integer.parseInt(dateParts[0]), Integer.parseInt(dateParts[1]), Integer.parseInt(dateParts[2]), 0, 0, 0);
3637 LocalDateTime now = LocalDateTime.now();
3738 return logLineDateTime.getYear() == now.getYear() && logLineDateTime.getMonthValue() == now.getMonthValue() && logLineDateTime.getDayOfMonth() == now.getDayOfMonth();
···39404041 /**
4142 * Archives a log line to a log file with the same date as the date in the log line
4343+ *
4244 * @param parts The log line to archive to a log file haven been split already e.g. ["2024-03-20", "13:02:27", "[INFO]", "This is a log message..."]
4345 */
4446 private void archiveLine(String[] parts) {
···6062 writer.println(date + " " + time + " " + logLevel + " " + message);
6163 writer.close();
62646363- // catch any exceptions that occur during the process, and log them. IOExceptions are possible when calling createNewFile()
6565+ // catch any exceptions that occur during the process, and log them. IOExceptions are possible when calling createNewFile()
6466 } catch (IOException e) {
6567 logger.log(Level.SEVERE, "[Poseidon] Failed to create new log file!");
6668 logger.log(Level.SEVERE, e.toString());
···120122121123 logger.log(Level.INFO, "[Poseidon] Logs built from latest.log!");
122124123123- // catch any exceptions that occur during the process, and log them
125125+ // catch any exceptions that occur during the process, and log them
124126 } catch (Exception e) {
125127 logger.log(Level.SEVERE, "[Poseidon] Failed to build logs from latest.log!");
126128 logger.log(Level.SEVERE, e.toString());
···131133 // Calculate the initial delay and period for the log rotation task
132134 ZonedDateTime now = ZonedDateTime.now();
133135 ZonedDateTime nextRun = now.withHour(0).withMinute(0).withSecond(0).withNano(0);
134134- if(now.compareTo(nextRun) > 0)
135135- nextRun = nextRun.plusDays(1);
136136+ if (now.compareTo(nextRun) > 0) nextRun = nextRun.plusDays(1);
136137 Duration duration = Duration.between(now, nextRun);
137138 long initialDelay = duration.getSeconds();
138139 long period = TimeUnit.DAYS.toSeconds(1);
···142143143144 // Schedule the log rotation task to run every day at midnight offset by one second to avoid missing logs
144145 logger.log(Level.INFO, "[Poseidon] Log rotation task scheduled for run in " + initialDelay + " seconds, and then every " + period + " seconds.");
145145- logger.log(Level.INFO, "[Poseidon] If latest.log contains logs from earlier, not previously archived dates, they will be archived to the appropriate log files " +
146146- "upon first run of the log rotation task. If log files already exist for these dates, the logs will be appended to the existing log files!");
146146+ logger.log(Level.INFO, "[Poseidon] If latest.log contains logs from earlier, not previously archived dates, they will be archived to the appropriate log files " + "upon first run of the log rotation task. If log files already exist for these dates, the logs will be appended to the existing log files!");
147147 Bukkit.getScheduler().scheduleAsyncRepeatingTask(new PoseidonPlugin(), this::buildHistoricalLogsFromLatestLogFile, (initialDelay + 1) * 20, period * 20);
148148 }
149149}
···4646 loginProcessHandler.userUUIDReceived(uuidResult.getUuid(), true);
4747 return;
4848 } else if (uuidResult.getReturnType().equals(UUIDResult.ReturnType.ONLINE)) {
4949- if(PoseidonConfig.getInstance().getConfigBoolean("settings.uuid-fetcher.get.enforce-case-sensitivity.enabled")) {
4949+ if (PoseidonConfig.getInstance().getConfigBoolean("settings.uuid-fetcher.get.enforce-case-sensitivity.enabled")) {
5050 System.out.println("[Poseidon] Fetched UUID from Mojang for " + loginPacket.name + " using GET - " + uuidResult.getUuid().toString() + " however, the username returned was " + uuidAndUsernameResult.getReturnedUsername() + ". The user has been kicked as the server is configured to use case sensitive usernames");
5151 loginProcessHandler.cancelLoginProcess(ChatColor.RED + "Sorry, that username has invalid casing");
5252 return;
+5-5
src/main/java/net/minecraft/server/Block.java
···313313 if (world.random.nextFloat() < f) {
314314 //Project Poseidon Start - New way to handle block drops to allow for plugins to know what items a block will drop
315315 Optional<List<ItemStack>> items = getDrops(world, i, j, k, l);
316316- if(items.isPresent()) {
317317- for(ItemStack item : items.get()) {
316316+ if (items.isPresent()) {
317317+ for (ItemStack item : items.get()) {
318318 this.a(world, i, j, k, item);
319319 }
320320 }
···325325 }
326326327327 //Project Poseidon - API to get the drops of a block
328328- public Optional<List<ItemStack>> getDrops(World world, int x, int y, int z, int data){
328328+ public Optional<List<ItemStack>> getDrops(World world, int x, int y, int z, int data) {
329329 int id = this.a(data, world.random);
330330- if(id <= 0){
330330+ if (id <= 0) {
331331 return Optional.empty();
332332- }else{
332332+ } else {
333333 return Optional.of(Arrays.asList(new ItemStack(id, 1, this.a_(data))));
334334 }
335335 }
+2-2
src/main/java/net/minecraft/server/BlockBed.java
···195195 return null;
196196 }
197197198198- public Optional<List<ItemStack>> getDrops(World world, int x, int y, int z, int data){
199199- if(!d(data)){
198198+ public Optional<List<ItemStack>> getDrops(World world, int x, int y, int z, int data) {
199199+ if (!d(data)) {
200200 return super.getDrops(world, x, y, z, data);
201201 }
202202 return Optional.empty();
···8989 return this.textureId + j;
9090 }
91919292- public Optional<List<ItemStack>> getDrops(World world, int x, int y, int z, int data){
9292+ public Optional<List<ItemStack>> getDrops(World world, int x, int y, int z, int data) {
9393 Optional<List<ItemStack>> ret = super.getDrops(world, x, y, z, data);
9494 List<ItemStack> stacks = ret.orElse(new ArrayList<>(3));
9595- for(int i = 0; i < 3; i++){
9696- if(world.random.nextInt(15) <= 1){
9595+ for (int i = 0; i < 3; i++) {
9696+ if (world.random.nextInt(15) <= 1) {
9797 stacks.add(new ItemStack(Item.SEEDS));
9898 }
9999 }
···5858 }
595960606161- public Optional<List<ItemStack>> getDrops(World world, int x, int y, int z, int data){
6161+ public Optional<List<ItemStack>> getDrops(World world, int x, int y, int z, int data) {
6262 TileEntityPiston tileentitypiston = this.b(world, x, y, z);
6363- if(tileentitypiston != null){
6363+ if (tileentitypiston != null) {
6464 return Block.byId[tileentitypiston.a()].getDrops(world, x, y, z, tileentitypiston.e());
6565- }else{
6565+ } else {
6666 return Optional.empty();
6767 }
6868 }
···123123 this.a.remove(world, i, j, k);
124124 }
125125126126- public Optional<List<ItemStack>> getDrops(World world, int x, int y, int z, int data){
126126+ public Optional<List<ItemStack>> getDrops(World world, int x, int y, int z, int data) {
127127 return this.a.getDrops(world, x, y, z, data);
128128 }
129129
···7878 }
79798080 //Poseidon Start - Ensure the mob cound of the specific type of mob is under the defined limit within the area
8181- if(poseidonAreaLimit) {
8181+ if (poseidonAreaLimit) {
8282 double chunkSize = 16.0D;
8383 AxisAlignedBB searchArea = AxisAlignedBB.b(this.x - poseidonChunkRadius * chunkSize, 0.0D, this.z - poseidonChunkRadius * chunkSize, this.x + poseidonChunkRadius * chunkSize, 128, this.z + poseidonChunkRadius * chunkSize);
8484 List<Entity> existingEntities = this.world.a(entityliving.getClass(), searchArea);
+1-1
src/main/java/org/bukkit/ChatColor.java
···127127 /**
128128 * Translates alternate color codes in the given text to Minecraft color codes.
129129 *
130130- * @param altColorChar The character used to denote color codes '&'.
130130+ * @param altColorChar The character used to denote color codes '&'.
131131 * @param textToTranslate The text containing the alternate color codes.
132132 * @return The text with the alternate color codes replaced by Minecraft color codes.
133133 */
+4
src/main/java/org/bukkit/block/Block.java
···285285286286 /**
287287 * Returns a list of items which would drop by destroying this block
288288+ *
288289 * @return a list of dropped items for this type of block
289290 */
290291 Collection<ItemStack> getDrops();
291292292293 /**
293294 * Returns a list of items which would drop by destroying this block with a specific tool
295295+ *
294296 * @param tool The tool or item in hand used for digging
295297 * @return a list of dropped items for this type of block
296298 */
···298300299301 /**
300302 * Breaks the block and spawns items as if a player had digged it regardless of the tool
303303+ *
301304 * @return true if the block was broken
302305 */
303306 boolean breakNaturally();
304307305308 /**
306309 * Breaks the block and spawns items as if a player had digged it
310310+ *
307311 * @param tool The tool or item in hand used for digging
308312 * @return true if the block was broken
309313 */
···5050 register("uberbukkit", new FlushInvCommand());
5151 register("uberbukkit", new UuidLookupCommand());
5252 register("uberbukkit", new CrackedAllowlistCommand());
5353-5353+5454 register("bukkit", new VersionCommand("version"));
5555 register("bukkit", new ReloadCommand("reload"));
5656 register("bukkit", new PluginsCommand("plugins"));