mirror of
				https://github.com/IntellectualSites/PlotSquared.git
				synced 2025-10-26 23:23:45 +01:00 
			
		
		
		
	Compare commits
	
		
			5 Commits
		
	
	
		
			6.7.0
			...
			feature/v6
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
|   | d1aeef85d4 | ||
|   | 13d7357c85 | ||
| ![renovate[bot]](/assets/img/avatar_default.png)  | 16e26b910c | ||
|   | faadebd30e | ||
|   | 2aeacb3dcf | 
| @@ -80,7 +80,8 @@ final class DelegatePlotGenerator extends IndependentPlotGenerator { | ||||
|                     result.setBiome(x, z, BukkitAdapter.adapt(biome)); | ||||
|                 } | ||||
|  | ||||
|                 //do not annotate with Override until we discontinue support for 1.4.4 | ||||
|                 //do not annotate with Override until we discontinue support for 1.4.4 (we no longer support 1.4.4) | ||||
|                 @Override | ||||
|                 public void setBiome(int x, int y, int z, @NonNull Biome biome) { | ||||
|                     result.setBiome(x, z, BukkitAdapter.adapt(biome)); | ||||
|  | ||||
|   | ||||
| @@ -282,7 +282,7 @@ public class BukkitQueueCoordinator extends BasicQueueCoordinator { | ||||
|                 CompoundTag tag = block.getNbtData(); | ||||
|                 StateWrapper sw = new StateWrapper(tag); | ||||
|  | ||||
|                 sw.restoreTag(getWorld().getName(), existing.getX(), existing.getY(), existing.getZ()); | ||||
|                 sw.restoreTag(existing); | ||||
|             } | ||||
|         } | ||||
|     } | ||||
|   | ||||
| @@ -44,6 +44,7 @@ import org.bukkit.enchantments.Enchantment; | ||||
| import org.bukkit.inventory.Inventory; | ||||
| import org.bukkit.inventory.InventoryHolder; | ||||
| import org.bukkit.inventory.ItemStack; | ||||
| import org.checkerframework.checker.nullness.qual.NonNull; | ||||
|  | ||||
| import java.util.ArrayList; | ||||
| import java.util.HashMap; | ||||
| @@ -166,14 +167,32 @@ public class StateWrapper { | ||||
|         return str; | ||||
|     } | ||||
|  | ||||
|     @SuppressWarnings("deprecation") // #setLine is needed for Spigot compatibility | ||||
|     /** | ||||
|      * Restore the TileEntity data to the given world at the given coordinates. | ||||
|      * | ||||
|      * @param worldName World name | ||||
|      * @param x         x position | ||||
|      * @param y         y position | ||||
|      * @param z         z position | ||||
|      * @return true if successful | ||||
|      */ | ||||
|     public boolean restoreTag(String worldName, int x, int y, int z) { | ||||
|         if (this.tag == null) { | ||||
|         World world = BukkitUtil.getWorld(worldName); | ||||
|         if (world == null) { | ||||
|             return false; | ||||
|         } | ||||
|         World world = BukkitUtil.getWorld(worldName); | ||||
|         Block block = world.getBlockAt(x, y, z); | ||||
|         if (block == null) { | ||||
|         return restoreTag(world.getBlockAt(x, y, z)); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * Restore the TileEntity data to the given block | ||||
|      * | ||||
|      * @param block Block to restore to | ||||
|      * @return true if successful | ||||
|      */ | ||||
|     @SuppressWarnings("deprecation") // #setLine is needed for Spigot compatibility | ||||
|     public boolean restoreTag(@NonNull Block block) { | ||||
|         if (this.tag == null) { | ||||
|             return false; | ||||
|         } | ||||
|         org.bukkit.block.BlockState state = block.getState(); | ||||
|   | ||||
| @@ -889,8 +889,8 @@ public class PlotSquared { | ||||
|                             e.printStackTrace(); | ||||
|                         } | ||||
|                         LOGGER.info("| generator: {}>{}", baseGenerator, areaGen); | ||||
|                         LOGGER.info("| plot world: {}", pa); | ||||
|                         LOGGER.info("| manager: {}", pa); | ||||
|                         LOGGER.info("| plot world: {}", pa.getClass().getCanonicalName()); | ||||
|                         LOGGER.info("| manager: {}", pa.getPlotManager().getClass().getCanonicalName()); | ||||
|                         LOGGER.info("Note: Area created for cluster '{}' (invalid or old configuration?)", name); | ||||
|                         areaGen.getPlotGenerator().initialize(pa); | ||||
|                         areaGen.augment(pa); | ||||
| @@ -906,6 +906,13 @@ public class PlotSquared { | ||||
|                     throw new IllegalArgumentException("Invalid Generator: " + gen_string); | ||||
|                 } | ||||
|                 PlotArea pa = areaGen.getPlotGenerator().getNewPlotArea(world, null, null, null); | ||||
|                 LOGGER.info("- generator: {}>{}", baseGenerator, areaGen); | ||||
|                 LOGGER.info("- plot world: {}", pa.getClass().getCanonicalName()); | ||||
|                 LOGGER.info("- plot area manager: {}", pa.getPlotManager().getClass().getCanonicalName()); | ||||
|                 if (!this.worldConfiguration.contains(path)) { | ||||
|                     this.worldConfiguration.createSection(path); | ||||
|                     worldSection = this.worldConfiguration.getConfigurationSection(path); | ||||
|                 } | ||||
|                 pa.saveConfiguration(worldSection); | ||||
|                 pa.loadDefaultConfiguration(worldSection); | ||||
|                 try { | ||||
| @@ -913,9 +920,6 @@ public class PlotSquared { | ||||
|                 } catch (IOException e) { | ||||
|                     e.printStackTrace(); | ||||
|                 } | ||||
|                 LOGGER.info("- generator: {}>{}", baseGenerator, areaGen); | ||||
|                 LOGGER.info("- plot world: {}", pa); | ||||
|                 LOGGER.info("- plot area manager: {}", pa.getPlotManager()); | ||||
|                 areaGen.getPlotGenerator().initialize(pa); | ||||
|                 areaGen.augment(pa); | ||||
|                 addPlotArea(pa); | ||||
|   | ||||
| @@ -18,7 +18,7 @@ plugins { | ||||
|     idea | ||||
| } | ||||
|  | ||||
| version = "6.7.0" | ||||
| version = "6.7.1-SNAPSHOT" | ||||
|  | ||||
| allprojects { | ||||
|     group = "com.plotsquared" | ||||
| @@ -140,7 +140,7 @@ allprojects { | ||||
|                         } | ||||
|                         developer { | ||||
|                             id.set("NotMyFault") | ||||
|                             name.set("NotMyFault") | ||||
|                             name.set("Alexander Brandes") | ||||
|                             organization.set("IntellectualSites") | ||||
|                             email.set("contact@notmyfault.dev") | ||||
|                         } | ||||
|   | ||||
| @@ -8,7 +8,7 @@ guava = "31.0.1-jre" # Version set by Minecraft | ||||
| paper = "1.18.1-R0.1-SNAPSHOT" | ||||
| checker-qual = "3.22.0" | ||||
| guice = "5.1.0" | ||||
| spotbugs = "4.6.0" | ||||
| spotbugs = "4.7.0" | ||||
| snakeyaml = "1.30" # Version set by Bukkit | ||||
|  | ||||
| # Adventure & MiniMessage | ||||
|   | ||||
		Reference in New Issue
	
	Block a user