Mirror von
https://github.com/IntellectualSites/FastAsyncWorldEdit.git
synchronisiert 2024-09-06 08:02:50 +02:00
Fixes #1046
Also remove option to shorten urls for schematic upload. This option does not work with self hosted interfaces, nor is it really safe to use, as per-design.
Dieser Commit ist enthalten in:
Ursprung
00d689a238
Commit
2b0ab1a084
@ -409,11 +409,6 @@ public class Settings extends Config {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static class WEB {
|
public static class WEB {
|
||||||
@Comment({
|
|
||||||
"Should download urls be shortened?",
|
|
||||||
" - Links are less secure as they could be brute forced"
|
|
||||||
})
|
|
||||||
public boolean SHORTEN_URLS = false;
|
|
||||||
@Comment({
|
@Comment({
|
||||||
"The web interface for clipboards",
|
"The web interface for clipboards",
|
||||||
" - All schematics are anonymous and private",
|
" - All schematics are anonymous and private",
|
||||||
@ -430,7 +425,7 @@ public class Settings extends Config {
|
|||||||
})
|
})
|
||||||
public List<String> ALLOWED_PLUGINS = new ArrayList<>();
|
public List<String> ALLOWED_PLUGINS = new ArrayList<>();
|
||||||
@Comment("Should debug messages be sent when third party extents are used?")
|
@Comment("Should debug messages be sent when third party extents are used?")
|
||||||
public boolean DEBUG = false;
|
public boolean DEBUG = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Comment("Generic tick limiter (not necessarily WorldEdit related, but useful to stop abuse)")
|
@Comment("Generic tick limiter (not necessarily WorldEdit related, but useful to stop abuse)")
|
||||||
|
@ -243,16 +243,12 @@ public class EditSessionBuilder {
|
|||||||
if (Settings.IMP.EXTENT.DEBUG) {
|
if (Settings.IMP.EXTENT.DEBUG) {
|
||||||
if (event.getActor() != null) {
|
if (event.getActor() != null) {
|
||||||
event.getActor().printDebug(TextComponent.of("Potentially unsafe extent blocked: " + toReturn.getClass().getName()));
|
event.getActor().printDebug(TextComponent.of("Potentially unsafe extent blocked: " + toReturn.getClass().getName()));
|
||||||
event.getActor().printDebug(TextComponent.of(" - For area restrictions, it is recommended to use the FaweAPI"));
|
event.getActor().printDebug(TextComponent.of(" - For area restrictions and block logging, it is recommended to use the FaweAPI"));
|
||||||
event.getActor().printDebug(TextComponent.of(" - For block logging, it is recommended to use BlocksHub"));
|
event.getActor().printDebug(TextComponent.of(" - To allow this plugin add it to the FAWE `allowed-plugins` list in config.yml"));
|
||||||
event.getActor().printDebug(TextComponent.of(" - To allow this plugin add it to the FAWE `allowed-plugins` list"));
|
|
||||||
event.getActor().printDebug(TextComponent.of(" - To hide this message set `debug` to false in the FAWE config.yml"));
|
|
||||||
} else {
|
} else {
|
||||||
LOGGER.debug("Potentially unsafe extent blocked: " + toReturn.getClass().getName());
|
LOGGER.debug("Potentially unsafe extent blocked: " + toReturn.getClass().getName());
|
||||||
LOGGER.debug(" - For area restrictions, it is recommended to use the FaweAPI");
|
LOGGER.debug(" - For area restrictions and block logging, it is recommended to use the FaweAPI");
|
||||||
LOGGER.debug(" - For block logging, it is recommended to use BlocksHub");
|
LOGGER.debug(" - To allow this plugin, add it to the FAWE `allowed-plugins` list in config.yml");
|
||||||
LOGGER.debug(" - To allow this plugin add it to the FAWE `allowed-plugins` list");
|
|
||||||
LOGGER.debug(" - To hide this message set `debug` to false in the FAWE config.yml");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -90,7 +90,6 @@ import java.io.IOException;
|
|||||||
import java.io.OutputStream;
|
import java.io.OutputStream;
|
||||||
import java.net.URI;
|
import java.net.URI;
|
||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
import java.net.URLEncoder;
|
|
||||||
import java.nio.file.Files;
|
import java.nio.file.Files;
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -101,7 +100,6 @@ import java.util.zip.ZipOutputStream;
|
|||||||
import static com.sk89q.worldedit.command.util.Logging.LogMode.PLACEMENT;
|
import static com.sk89q.worldedit.command.util.Logging.LogMode.PLACEMENT;
|
||||||
import static com.sk89q.worldedit.command.util.Logging.LogMode.REGION;
|
import static com.sk89q.worldedit.command.util.Logging.LogMode.REGION;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Clipboard commands.
|
* Clipboard commands.
|
||||||
*/
|
*/
|
||||||
@ -386,13 +384,6 @@ public class ClipboardCommands {
|
|||||||
player.print(Caption.of("fawe.web.generating.link.failed"));
|
player.print(Caption.of("fawe.web.generating.link.failed"));
|
||||||
} else {
|
} else {
|
||||||
String urlText = url.toString();
|
String urlText = url.toString();
|
||||||
if (Settings.IMP.WEB.SHORTEN_URLS) {
|
|
||||||
try {
|
|
||||||
urlText = MainUtil.getText("https://athion.net/s/?" + URLEncoder.encode(url.toString(), "UTF-8"));
|
|
||||||
} catch (IOException e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
player.print(Caption.of("fawe.web.download.link", urlText).clickEvent(ClickEvent.openUrl(urlText)));
|
player.print(Caption.of("fawe.web.download.link", urlText).clickEvent(ClickEvent.openUrl(urlText)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren