Pr commentaries resolved

This commit is contained in:
Vlammar 2021-11-14 13:39:29 +01:00
parent 08cb90f560
commit 7729565a13
6 changed files with 9 additions and 10 deletions

View File

@ -15,7 +15,7 @@ jobs:
strategy:
matrix:
java: [8, 9, 10, 11, 12, 13, 14, 15, 16, 17]
java: [8, 11, 16, 17]
steps:
- name: Checkout

View File

@ -57,15 +57,12 @@ public abstract class IoMCommand extends Command {
protected boolean checkHostingSite(URL url) {
PluginLogger.info("allow list " + PluginConfiguration.ALLOWLIST_HOSTINGSITE.get());
String urlsString = PluginConfiguration.ALLOWLIST_HOSTINGSITE.get();
if (urlsString.trim().equals("")) {
if (urlsString.trim().isEmpty()) {
return true;
}
String[] hosts = urlsString.trim().replaceAll("https://","").split(",");
for (String host : hosts) {
PluginLogger.info(host);
PluginLogger.info(url.getHost());
if (url.getHost().equals(host.trim())) {
return true;
}

View File

@ -94,7 +94,9 @@ public class NewCommand extends IoMCommand {
int imageCount = MapManager.getPlayerMapStore(player.getUniqueId()).getImagesCount();
if (imageLimit <= imageCount) {
throwInvalidArgument(
I.t("Your image limit is set to {0} and you currently have {1} ", imageLimit, imageCount));
I.t("Your image limit is set to {0} and you currently have {1} loaded image(s)",
imageLimit,
imageCount));
}
}
if (!Permissions.BYPASS_MAP_LIMIT.grantedTo(player)) {
@ -102,7 +104,9 @@ public class NewCommand extends IoMCommand {
int mapCount = MapManager.getPlayerMapStore(player.getUniqueId()).getMapCount();
if (mapLimit <= mapCount) {
throwInvalidArgument(
I.t("Your map limit is set to {0} and you currently have {1} ", mapLimit, mapCount));
I.t("Your map limit is set to {0} and you currently have {1} loaded map(s)",
mapLimit,
mapCount));
}
}
try {

View File

@ -236,7 +236,7 @@ public class MapDetailGui extends ExplorerGui<Integer> {
}, map.getName(), this);
} catch (IllegalStateException e) {
PluginLogger.info("error while renaming");
PluginLogger.error("Error while renaming map: ", e);
}
}

View File

@ -38,7 +38,6 @@ package fr.moribus.imageonmap.image;
import fr.moribus.imageonmap.Permissions;
import fr.moribus.imageonmap.PluginConfiguration;
import fr.moribus.imageonmap.commands.IoMCommand;
import fr.moribus.imageonmap.map.ImageMap;
import fr.moribus.imageonmap.map.MapManager;
import fr.zcraft.quartzlib.components.i18n.I;

View File

@ -203,7 +203,6 @@ public class MapInitEvent implements Listener {
@EventHandler
public void onHangingBreakEvent(HangingBreakEvent event) {
Entity entity = event.getEntity();
PluginLogger.info("entity " + entity.toString());
if (!(entity instanceof ItemFrame)) {
return;
}