Skip to content

Commit

Permalink
Add support for Paper 1.20.5
Browse files Browse the repository at this point in the history
  • Loading branch information
MrMicky-FR committed May 4, 2024
1 parent 43d8c13 commit 4271496
Show file tree
Hide file tree
Showing 9 changed files with 28 additions and 66 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,22 +16,23 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup JDK ${{ matrix.java-version }}
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: ${{ matrix.java-version }}

- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v1
uses: gradle/wrapper-validation-action@v2

- name: Build
run: ./gradlew build

- name: Upload artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: WorldEditSelectionVisualizer
path: plugin/build/libs/WorldEditSelectionVisualizer-*.jar
overwrite: true
41 changes: 0 additions & 41 deletions .github/workflows/codeql.yml

This file was deleted.

3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# WorldEditSelectionVisualizer

[![Java CI](https://github.com/MrMicky-FR/WorldEditSelectionVisualizer/actions/workflows/build.yml/badge.svg)](https://github.com/MrMicky-FR/WorldEditSelectionVisualizer/actions/workflows/build.yml)
[![CodeQL](https://github.com/MrMicky-FR/WorldEditSelectionVisualizer/actions/workflows/codeql.yml/badge.svg)](https://github.com/MrMicky-FR/WorldEditSelectionVisualizer/actions/workflows/codeql.yml)
[![Discord](https://img.shields.io/discord/390919659874156560.svg?colorB=5865f2&label=Discord&logo=discord&logoColor=white)](https://discord.gg/q9UwaBT)

WorldEditSelectionVisualizer (WESV) is essentially the famous [WorldEditCUI](http://www.minecraftforum.net/topic/2171206-172-worldeditcui/) mod in the form of a Bukkit plugin, which means that players don't need to install anything on their client.
Expand All @@ -18,7 +17,7 @@ WorldEditSelectionVisualizer (WESV) is essentially the famous [WorldEditCUI](htt
- Prevent players from spawning too many particles when selecting huge regions
- Highly customizable for the performance of your server
- Supports both [WorldEdit](https://enginehub.org/worldedit) and [FastAsyncWorldEdit](https://www.spigotmc.org/resources/fastasyncworldedit.13932/)
- Minecraft 1.7.10 to 1.20 support
- Compatible with all Minecraft versions starting with 1.7.10
- [PlaceholderAPI](https://github.com/PlaceholderAPI/PlaceholderAPI) support (you can use the placeholders `%wesv_toggled_selection%`, `%wesv_toggled_clipboard%`, `%wesv_volume_selection%` and `%wesv_volume_clipboard%`)

## Downloads
Expand Down
8 changes: 5 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
allprojects {
group = 'fr.mrmicky'
version = '2.1.5'
version = '2.1.6'
}

subprojects {
apply plugin: 'java'

sourceCompatibility = '1.8'
targetCompatibility = '1.8'
java {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}

tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
10 changes: 5 additions & 5 deletions gradlew
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/sh

#
# Copyright © 2015-2021 the original authors.
# Copyright © 2015-2021 the original authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -32,10 +32,10 @@
# Busybox and similar reduced shells will NOT work, because this script
# requires all of these POSIX shell features:
# * functions;
# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
# * compound commands having a testable exit status, especially «case»;
# * various built-in commands including «command», «set», and «ulimit».
# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
# * compound commands having a testable exit status, especially «case»;
# * various built-in commands including «command», «set», and «ulimit».
#
# Important for patching:
#
Expand Down
6 changes: 3 additions & 3 deletions plugin/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plugins {
id 'com.github.johnrengelman.shadow' version '7.1.2'
id 'com.github.johnrengelman.shadow' version '8.1.1'
}

repositories {
Expand All @@ -11,8 +11,8 @@ dependencies {
implementation project(':worldeditselectionvisualizer-compatibility-commons')
implementation project(':worldeditselectionvisualizer-compatibility-v6')
implementation project(':worldeditselectionvisualizer-compatibility-v7')
implementation 'fr.mrmicky:fastparticles:2.0.0'
implementation 'org.bstats:bstats-bukkit:3.0.0'
implementation 'fr.mrmicky:fastparticles:2.0.1'
implementation 'org.bstats:bstats-bukkit:3.0.2'
compileOnly 'com.sk89q.worldedit:worldedit-bukkit:7.2.0'
compileOnly 'me.clip:placeholderapi:2.10.9'
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import java.io.File;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.URI;
import java.net.URL;
import java.util.ArrayList;
import java.util.Collection;
Expand Down Expand Up @@ -60,8 +61,8 @@ public void onEnable() {
Region.class.getMethod("getVolume");
} catch (NoSuchMethodException e) {
getLogger().severe("**********************************");
getLogger().severe("You are using an unsupported WorldEdit version (7.0.x or 7.1.x) !");
getLogger().severe("WorldEditSelection visualizer don't works with outdated WorldEdit version.");
getLogger().severe("You are using an unsupported WorldEdit version (7.0.x or 7.1.x)!");
getLogger().severe("WorldEditSelection visualizer doesn't works with outdated WorldEdit version.");
getLogger().severe("You can download the latest WorldEdit version here: https://dev.bukkit.org/projects/worldedit/files");
getLogger().severe("**********************************");
getServer().getPluginManager().disablePlugin(this);
Expand Down Expand Up @@ -177,12 +178,12 @@ public String getMessage(String path) {

private void checkUpdate() {
try {
URL url = new URL("https://api.spigotmc.org/legacy/update.php?resource=17311");
URL url = URI.create("https://api.spigotmc.org/legacy/update.php?resource=17311").toURL();
try (BufferedReader reader = new BufferedReader(new InputStreamReader(url.openStream()))) {
String lastVersion = reader.readLine();
if (!getDescription().getVersion().equalsIgnoreCase(lastVersion)) {
getLogger().warning("A new version is available ! Last version is " + lastVersion + " and you are on " + getDescription().getVersion());
getLogger().warning("You can download it on: " + getDescription().getWebsite());
getLogger().warning("A new version is available! Last version is " + lastVersion + " and you are on " + getDescription().getVersion());
getLogger().warning("You can download it on " + getDescription().getWebsite());
}
}
} catch (IOException e) {
Expand Down
4 changes: 2 additions & 2 deletions plugin/src/main/resources/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ cuboid-top-bottom: false
# 'origin': The selection origin point (position 1 for cuboid selection, and center for ellipsoid/cylinders)
# 'fade-delay': The number of seconds before the particles disappears. You can set it to 0 to remove the fade delay
# 'max-selection-size' : The maximum size of a selection to be display. A big value (> 1000000) can cause important lags
# 'points-distance': The distance between each particles. The higher this number is, less particles will be spawn
# 'lines-gap' (secondary selection only): The distance between each particles lines on cuboid and polygon. The higher this number is, less particles will be spawn. Set it to 0 to remove cuboid lines
# 'points-distance': The distance between each particle. The higher this number is, fewer particles will be spawn
# 'lines-gap' (secondary selection only): The distance between each particles lines on cuboid and polygon. The higher this number is, fewer particles will be spawn. Set it to 0 to remove cuboid lines
# 'update-interval': The delay in ticks between particles spawn. This impact the players performances
# 'view-distance': The maximum distance in which players can see the particles. On 1.7.10 the particle distance is limited to 16 (Minecraft limitation)
# 'particles': The particles type and data. The data can be a color for redstone like in the form 'r,g,b' or a Material for block crack/item crack
Expand Down

0 comments on commit 4271496

Please sign in to comment.