mirror of
				https://github.com/IntellectualSites/PlotSquared.git
				synced 2025-10-31 17:43:44 +01:00 
			
		
		
		
	Compare commits
	
		
			5 Commits
		
	
	
		
			docs/ploti
			...
			feature/v7
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
|   | e5a4026a2a | ||
|   | e138dc0267 | ||
|   | ca50b53f94 | ||
|   | f705487055 | ||
|   | b7c9453a1a | 
							
								
								
									
										5
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										5
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							| @@ -138,6 +138,5 @@ build/ | |||||||
|  |  | ||||||
| .DS_Store | .DS_Store | ||||||
| # Ignore run folders | # Ignore run folders | ||||||
| run-[0-0].[0-9]/ | run-[0-9].[0-9][0-9]/ | ||||||
| run-[0-0].[0-9].[0-9]/ | run-[0-9].[0-9][0-9].[0-9]/ | ||||||
|  |  | ||||||
|   | |||||||
| @@ -252,6 +252,7 @@ public final class BukkitPlatform extends JavaPlugin implements Listener, PlotPl | |||||||
|     } |     } | ||||||
|  |  | ||||||
|     @Override |     @Override | ||||||
|  |     @SuppressWarnings("deprecation") // Paper deprecation | ||||||
|     public void onEnable() { |     public void onEnable() { | ||||||
|         this.pluginName = getDescription().getName(); |         this.pluginName = getDescription().getName(); | ||||||
|  |  | ||||||
| @@ -1160,6 +1161,7 @@ public final class BukkitPlatform extends JavaPlugin implements Listener, PlotPl | |||||||
|         return new BukkitPlotGenerator(world, generator, this.plotAreaManager); |         return new BukkitPlotGenerator(world, generator, this.plotAreaManager); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|  |     @SuppressWarnings("deprecation") // Paper deprecation | ||||||
|     @Override |     @Override | ||||||
|     public @NonNull String pluginsFormatted() { |     public @NonNull String pluginsFormatted() { | ||||||
|         StringBuilder msg = new StringBuilder(); |         StringBuilder msg = new StringBuilder(); | ||||||
| @@ -1181,7 +1183,7 @@ public final class BukkitPlatform extends JavaPlugin implements Listener, PlotPl | |||||||
|     } |     } | ||||||
|  |  | ||||||
|     @Override |     @Override | ||||||
|     @SuppressWarnings("ConstantConditions") |     @SuppressWarnings({"ConstantConditions", "deprecation"}) // Paper deprecation | ||||||
|     public @NonNull String worldEditImplementations() { |     public @NonNull String worldEditImplementations() { | ||||||
|         StringBuilder msg = new StringBuilder(); |         StringBuilder msg = new StringBuilder(); | ||||||
|         if (Bukkit.getPluginManager().getPlugin("FastAsyncWorldEdit") != null) { |         if (Bukkit.getPluginManager().getPlugin("FastAsyncWorldEdit") != null) { | ||||||
|   | |||||||
| @@ -74,6 +74,7 @@ public final class ReplicatingEntityWrapper extends EntityWrapper { | |||||||
|     private HorseStats horse; |     private HorseStats horse; | ||||||
|     private boolean noGravity; |     private boolean noGravity; | ||||||
|  |  | ||||||
|  |     @SuppressWarnings("deprecation") // Deprecation exists since 1.20, while we support 1.16 onwards | ||||||
|     public ReplicatingEntityWrapper(Entity entity, short depth) { |     public ReplicatingEntityWrapper(Entity entity, short depth) { | ||||||
|         super(entity); |         super(entity); | ||||||
|  |  | ||||||
|   | |||||||
| @@ -369,6 +369,7 @@ public class PlayerEventListener implements Listener { | |||||||
|     } |     } | ||||||
|  |  | ||||||
|     @EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true) |     @EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true) | ||||||
|  |     @SuppressWarnings("deprecation") // Paper deprecation | ||||||
|     public void onConnect(PlayerJoinEvent event) { |     public void onConnect(PlayerJoinEvent event) { | ||||||
|         final Player player = event.getPlayer(); |         final Player player = event.getPlayer(); | ||||||
|         PlotSquared.platform().playerManager().removePlayer(player.getUniqueId()); |         PlotSquared.platform().playerManager().removePlayer(player.getUniqueId()); | ||||||
| @@ -733,6 +734,7 @@ public class PlayerEventListener implements Listener { | |||||||
|     } |     } | ||||||
|  |  | ||||||
|     @EventHandler(priority = EventPriority.LOW) |     @EventHandler(priority = EventPriority.LOW) | ||||||
|  |     @SuppressWarnings("deprecation") // Paper deprecation | ||||||
|     public void onChat(AsyncPlayerChatEvent event) { |     public void onChat(AsyncPlayerChatEvent event) { | ||||||
|         if (event.isCancelled()) { |         if (event.isCancelled()) { | ||||||
|             return; |             return; | ||||||
| @@ -1063,6 +1065,7 @@ public class PlayerEventListener implements Listener { | |||||||
|     } |     } | ||||||
|  |  | ||||||
|     @EventHandler(priority = EventPriority.LOW) |     @EventHandler(priority = EventPriority.LOW) | ||||||
|  |     @SuppressWarnings("deprecation") // Paper deprecation | ||||||
|     public void onCancelledInteract(PlayerInteractEvent event) { |     public void onCancelledInteract(PlayerInteractEvent event) { | ||||||
|         if (event.isCancelled() && event.getAction() == Action.RIGHT_CLICK_AIR) { |         if (event.isCancelled() && event.getAction() == Action.RIGHT_CLICK_AIR) { | ||||||
|             Player player = event.getPlayer(); |             Player player = event.getPlayer(); | ||||||
|   | |||||||
| @@ -44,6 +44,7 @@ import java.util.stream.IntStream; | |||||||
| @Singleton | @Singleton | ||||||
| public class BukkitInventoryUtil extends InventoryUtil { | public class BukkitInventoryUtil extends InventoryUtil { | ||||||
|  |  | ||||||
|  |     @SuppressWarnings("deprecation") // Paper deprecation | ||||||
|     private static @Nullable ItemStack getItem(PlotItemStack item) { |     private static @Nullable ItemStack getItem(PlotItemStack item) { | ||||||
|         if (item == null) { |         if (item == null) { | ||||||
|             return null; |             return null; | ||||||
|   | |||||||
| @@ -67,6 +67,7 @@ public class BukkitSetupUtils extends SetupUtils { | |||||||
|         this.worldFile = worldFile; |         this.worldFile = worldFile; | ||||||
|     } |     } | ||||||
|  |  | ||||||
|  |     @SuppressWarnings("deprecation") // Paper deprecation | ||||||
|     @Override |     @Override | ||||||
|     public void updateGenerators(final boolean force) { |     public void updateGenerators(final boolean force) { | ||||||
|         if (loaded && !SetupUtils.generators.isEmpty() && !force) { |         if (loaded && !SetupUtils.generators.isEmpty() && !force) { | ||||||
|   | |||||||
| @@ -60,7 +60,7 @@ public class UpdateUtility implements Listener { | |||||||
|         task = Bukkit.getScheduler().runTaskTimerAsynchronously(this.javaPlugin, () -> { |         task = Bukkit.getScheduler().runTaskTimerAsynchronously(this.javaPlugin, () -> { | ||||||
|             try { |             try { | ||||||
|                 HttpsURLConnection connection = (HttpsURLConnection) new URL( |                 HttpsURLConnection connection = (HttpsURLConnection) new URL( | ||||||
|                         "https://api.spigotmc.org/simple/0.1/index.php?action=getResource&id=77506") |                         "https://api.spigotmc.org/simple/0.2/index.php?action=getResource&id=77506") | ||||||
|                         .openConnection(); |                         .openConnection(); | ||||||
|                 connection.setRequestMethod("GET"); |                 connection.setRequestMethod("GET"); | ||||||
|                 JsonObject result = new JsonParser() |                 JsonObject result = new JsonParser() | ||||||
|   | |||||||
| @@ -517,6 +517,7 @@ public class ListCmd extends SubCommand { | |||||||
|                     } |                     } | ||||||
|                 } |                 } | ||||||
|                 finalResolver.tag("players", Tag.inserting(builder.asComponent())); |                 finalResolver.tag("players", Tag.inserting(builder.asComponent())); | ||||||
|  |                 finalResolver.tag("size", Tag.inserting(Component.text(plot.getConnectedPlots().size()))); | ||||||
|                 caption.set(TranslatableCaption.of("info.plot_list_item")); |                 caption.set(TranslatableCaption.of("info.plot_list_item")); | ||||||
|                 caption.setTagResolvers(finalResolver.build()); |                 caption.setTagResolvers(finalResolver.build()); | ||||||
|             } |             } | ||||||
|   | |||||||
| @@ -187,6 +187,7 @@ public final class PlaceholderRegistry { | |||||||
|             } |             } | ||||||
|         }); |         }); | ||||||
|         this.createPlaceholder("currentplot_biome", (player, plot) -> plot.getBiomeSynchronous().toString()); |         this.createPlaceholder("currentplot_biome", (player, plot) -> plot.getBiomeSynchronous().toString()); | ||||||
|  |         this.createPlaceholder("currentplot_size", (player, plot) -> String.valueOf(plot.getConnectedPlots().size())); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     /** |     /** | ||||||
|   | |||||||
| @@ -1,5 +1,6 @@ | |||||||
| import com.diffplug.gradle.spotless.SpotlessPlugin | import com.diffplug.gradle.spotless.SpotlessPlugin | ||||||
| import com.github.jengelman.gradle.plugins.shadow.ShadowPlugin | import com.github.jengelman.gradle.plugins.shadow.ShadowPlugin | ||||||
|  | import groovy.json.JsonSlurper | ||||||
| import java.net.URI | import java.net.URI | ||||||
| import xyz.jpenilla.runpaper.task.RunServer | import xyz.jpenilla.runpaper.task.RunServer | ||||||
|  |  | ||||||
| @@ -218,14 +219,23 @@ tasks.getByName<Jar>("jar") { | |||||||
|     enabled = false |     enabled = false | ||||||
| } | } | ||||||
|  |  | ||||||
| val supportedVersions = listOf("1.16.5", "1.17", "1.17.1", "1.18.2", "1.19", "1.19.1", "1.19.2", "1.19.3", "1.19.4", "1.20") | val supportedVersions = listOf("1.16.5", "1.17.1", "1.18.2", "1.19.4", "1.20.1") | ||||||
| tasks { | tasks { | ||||||
|  |     val lastSuccessfulBuildUrl = uri("https://ci.athion.net/job/FastAsyncWorldEdit/lastSuccessfulBuild/api/json").toURL() | ||||||
|  |     val artifact = ((JsonSlurper().parse(lastSuccessfulBuildUrl) as Map<*, *>)["artifacts"] as List<*>) | ||||||
|  |             .map { it as Map<*, *> } | ||||||
|  |             .map { it["fileName"] as String } | ||||||
|  |             .first { it.contains("Bukkit") } | ||||||
|  |  | ||||||
|     supportedVersions.forEach { |     supportedVersions.forEach { | ||||||
|         register<RunServer>("runServer-$it") { |         register<RunServer>("runServer-$it") { | ||||||
|             minecraftVersion(it) |             minecraftVersion(it) | ||||||
|             pluginJars(*project(":plotsquared-bukkit").getTasksByName("shadowJar", false).map { (it as Jar).archiveFile } |             pluginJars(*project(":plotsquared-bukkit").getTasksByName("shadowJar", false).map { (it as Jar).archiveFile } | ||||||
|                     .toTypedArray()) |                     .toTypedArray()) | ||||||
|             jvmArgs("-DPaper.IgnoreJavaVersion=true", "-Dcom.mojang.eula.agree=true") |             jvmArgs("-DPaper.IgnoreJavaVersion=true", "-Dcom.mojang.eula.agree=true") | ||||||
|  |             downloadPlugins { | ||||||
|  |                 url("https://ci.athion.net/job/FastAsyncWorldEdit/lastSuccessfulBuild/artifact/artifacts/$artifact") | ||||||
|  |             } | ||||||
|             group = "run paper" |             group = "run paper" | ||||||
|             runDirectory.set(file("run-$it")) |             runDirectory.set(file("run-$it")) | ||||||
|         } |         } | ||||||
|   | |||||||
| @@ -37,7 +37,7 @@ shadow = "8.1.1" | |||||||
| grgit = "4.1.1" | grgit = "4.1.1" | ||||||
| spotless = "6.21.0" | spotless = "6.21.0" | ||||||
| nexus = "1.3.0" | nexus = "1.3.0" | ||||||
| runPaper = "2.1.0" | runPaper = "2.2.0" | ||||||
|  |  | ||||||
| [libraries] | [libraries] | ||||||
| # Platform expectations | # Platform expectations | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user