Pr commentaries resolved
This commit is contained in:
parent
08cb90f560
commit
7729565a13
|
@ -15,7 +15,7 @@ jobs:
|
||||||
|
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
java: [8, 9, 10, 11, 12, 13, 14, 15, 16, 17]
|
java: [8, 11, 16, 17]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
|
|
|
@ -57,15 +57,12 @@ public abstract class IoMCommand extends Command {
|
||||||
|
|
||||||
|
|
||||||
protected boolean checkHostingSite(URL url) {
|
protected boolean checkHostingSite(URL url) {
|
||||||
PluginLogger.info("allow list " + PluginConfiguration.ALLOWLIST_HOSTINGSITE.get());
|
|
||||||
String urlsString = PluginConfiguration.ALLOWLIST_HOSTINGSITE.get();
|
String urlsString = PluginConfiguration.ALLOWLIST_HOSTINGSITE.get();
|
||||||
if (urlsString.trim().equals("")) {
|
if (urlsString.trim().isEmpty()) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
String[] hosts = urlsString.trim().replaceAll("https://","").split(",");
|
String[] hosts = urlsString.trim().replaceAll("https://","").split(",");
|
||||||
for (String host : hosts) {
|
for (String host : hosts) {
|
||||||
PluginLogger.info(host);
|
|
||||||
PluginLogger.info(url.getHost());
|
|
||||||
if (url.getHost().equals(host.trim())) {
|
if (url.getHost().equals(host.trim())) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -94,7 +94,9 @@ public class NewCommand extends IoMCommand {
|
||||||
int imageCount = MapManager.getPlayerMapStore(player.getUniqueId()).getImagesCount();
|
int imageCount = MapManager.getPlayerMapStore(player.getUniqueId()).getImagesCount();
|
||||||
if (imageLimit <= imageCount) {
|
if (imageLimit <= imageCount) {
|
||||||
throwInvalidArgument(
|
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)) {
|
if (!Permissions.BYPASS_MAP_LIMIT.grantedTo(player)) {
|
||||||
|
@ -102,7 +104,9 @@ public class NewCommand extends IoMCommand {
|
||||||
int mapCount = MapManager.getPlayerMapStore(player.getUniqueId()).getMapCount();
|
int mapCount = MapManager.getPlayerMapStore(player.getUniqueId()).getMapCount();
|
||||||
if (mapLimit <= mapCount) {
|
if (mapLimit <= mapCount) {
|
||||||
throwInvalidArgument(
|
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 {
|
try {
|
||||||
|
|
|
@ -236,7 +236,7 @@ public class MapDetailGui extends ExplorerGui<Integer> {
|
||||||
}, map.getName(), this);
|
}, map.getName(), this);
|
||||||
|
|
||||||
} catch (IllegalStateException e) {
|
} catch (IllegalStateException e) {
|
||||||
PluginLogger.info("error while renaming");
|
PluginLogger.error("Error while renaming map: ", e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -38,7 +38,6 @@ package fr.moribus.imageonmap.image;
|
||||||
|
|
||||||
import fr.moribus.imageonmap.Permissions;
|
import fr.moribus.imageonmap.Permissions;
|
||||||
import fr.moribus.imageonmap.PluginConfiguration;
|
import fr.moribus.imageonmap.PluginConfiguration;
|
||||||
import fr.moribus.imageonmap.commands.IoMCommand;
|
|
||||||
import fr.moribus.imageonmap.map.ImageMap;
|
import fr.moribus.imageonmap.map.ImageMap;
|
||||||
import fr.moribus.imageonmap.map.MapManager;
|
import fr.moribus.imageonmap.map.MapManager;
|
||||||
import fr.zcraft.quartzlib.components.i18n.I;
|
import fr.zcraft.quartzlib.components.i18n.I;
|
||||||
|
|
|
@ -203,7 +203,6 @@ public class MapInitEvent implements Listener {
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void onHangingBreakEvent(HangingBreakEvent event) {
|
public void onHangingBreakEvent(HangingBreakEvent event) {
|
||||||
Entity entity = event.getEntity();
|
Entity entity = event.getEntity();
|
||||||
PluginLogger.info("entity " + entity.toString());
|
|
||||||
if (!(entity instanceof ItemFrame)) {
|
if (!(entity instanceof ItemFrame)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue