updated dependency lunarutils to 0.0.2
This commit is contained in:
parent
8f8b53b3a4
commit
c9e4fc105c
5 changed files with 21 additions and 35 deletions
18
pom.xml
18
pom.xml
|
|
@ -59,14 +59,6 @@
|
||||||
<id>sonatype</id>
|
<id>sonatype</id>
|
||||||
<url>https://oss.sonatype.org/content/groups/public/</url>
|
<url>https://oss.sonatype.org/content/groups/public/</url>
|
||||||
</repository>
|
</repository>
|
||||||
<repository>
|
|
||||||
<id>brokkonaut</id>
|
|
||||||
<url>https://www.iani.de/nexus/repository/maven-releases/</url>
|
|
||||||
</repository>
|
|
||||||
<repository>
|
|
||||||
<id>lunarakai</id>
|
|
||||||
<url>https://lunarakai.de/nexus/repository/maven-releases/</url>
|
|
||||||
</repository>
|
|
||||||
</repositories>
|
</repositories>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
|
@ -76,12 +68,6 @@
|
||||||
<version>1.21-R0.1-SNAPSHOT</version>
|
<version>1.21-R0.1-SNAPSHOT</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
|
||||||
<groupId>de.iani.cubeside</groupId>
|
|
||||||
<artifactId>CubesideUtilsBukkit</artifactId>
|
|
||||||
<version>1.16-SNAPSHOT</version>
|
|
||||||
<scope>provided</scope>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.apptasticsoftware</groupId>
|
<groupId>com.apptasticsoftware</groupId>
|
||||||
<artifactId>rssreader</artifactId>
|
<artifactId>rssreader</artifactId>
|
||||||
|
|
@ -96,8 +82,8 @@
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>de.lunarakai</groupId>
|
<groupId>de.lunarakai</groupId>
|
||||||
<artifactId>LunarUtils</artifactId>
|
<artifactId>LunarUtils</artifactId>
|
||||||
<version>0.0.1</version>
|
<version>0.0.2</version>
|
||||||
<classifier>lunarutils</classifier>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
</project>
|
</project>
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ import de.iani.cubesideutils.bukkit.commands.exceptions.RequiresPlayerException;
|
||||||
import de.iani.cubesideutils.commands.ArgsParser;
|
import de.iani.cubesideutils.commands.ArgsParser;
|
||||||
import de.lunarakai.blockfox.BlockFoxPlugin;
|
import de.lunarakai.blockfox.BlockFoxPlugin;
|
||||||
import de.lunarakai.blockfox.common.BlockFoxDisplay;
|
import de.lunarakai.blockfox.common.BlockFoxDisplay;
|
||||||
import de.lunarakai.lunarutils.chat.MessageUtils;
|
import de.lunarakai.lunarutils.chat.SimpleChatMessages;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
@ -49,18 +49,18 @@ public class CreateCommand extends SubCommand {
|
||||||
public boolean onCommand(CommandSender sender, Command command, String s, String commandString, ArgsParser args) throws DisallowsCommandBlockException, RequiresPlayerException, NoPermissionException, IllegalSyntaxException, InternalCommandException {
|
public boolean onCommand(CommandSender sender, Command command, String s, String commandString, ArgsParser args) throws DisallowsCommandBlockException, RequiresPlayerException, NoPermissionException, IllegalSyntaxException, InternalCommandException {
|
||||||
Player player = (Player) sender;
|
Player player = (Player) sender;
|
||||||
if(args.remaining() < 1 || args.remaining() > 3) {
|
if(args.remaining() < 1 || args.remaining() > 3) {
|
||||||
MessageUtils.sendSimpleWarningMessage(player, commandString + getUsage());
|
SimpleChatMessages.sendSimpleWarningMessage(player, commandString + getUsage());
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
String name = args.getNext().toLowerCase().trim();
|
String name = args.getNext().toLowerCase().trim();
|
||||||
if(!VALID_NAME_PATTERN.matcher(name).matches()) {
|
if(!VALID_NAME_PATTERN.matcher(name).matches()) {
|
||||||
MessageUtils.sendSimpleWarningMessage(player, "display.name.invalid");
|
SimpleChatMessages.sendSimpleWarningMessage(player, "display.name.invalid");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(plugin.getDisplayList().getBlockFoxDisplay(name) != null) {
|
if(plugin.getDisplayList().getBlockFoxDisplay(name) != null) {
|
||||||
MessageUtils.sendSimpleWarningMessage(player, "display.name.exists");
|
SimpleChatMessages.sendSimpleWarningMessage(player, "display.name.exists");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -73,7 +73,7 @@ public class CreateCommand extends SubCommand {
|
||||||
} else if(arg.equals("noblocks")) {
|
} else if(arg.equals("noblocks")) {
|
||||||
noblocks = true;
|
noblocks = true;
|
||||||
} else {
|
} else {
|
||||||
MessageUtils.sendSimpleWarningMessage(player, commandString + getUsage());
|
SimpleChatMessages.sendSimpleWarningMessage(player, commandString + getUsage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -83,12 +83,12 @@ public class CreateCommand extends SubCommand {
|
||||||
@Nullable
|
@Nullable
|
||||||
RayTraceResult target = player.rayTraceBlocks(6);
|
RayTraceResult target = player.rayTraceBlocks(6);
|
||||||
if(target == null || target.getHitBlock() == null) {
|
if(target == null || target.getHitBlock() == null) {
|
||||||
MessageUtils.sendSimpleWarningMessage(player, "display.create.lookAtCenter");
|
SimpleChatMessages.sendSimpleWarningMessage(player, "display.create.lookAtCenter");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
BlockFace face = target.getHitBlockFace();
|
BlockFace face = target.getHitBlockFace();
|
||||||
if(face != BlockFace.NORTH && face != BlockFace.WEST && face != BlockFace.EAST && face != BlockFace.SOUTH) {
|
if(face != BlockFace.NORTH && face != BlockFace.WEST && face != BlockFace.EAST && face != BlockFace.SOUTH) {
|
||||||
MessageUtils.sendSimpleWarningMessage(player, "display.create.lookAtSide");
|
SimpleChatMessages.sendSimpleWarningMessage(player, "display.create.lookAtSide");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
location = target.getHitBlock().getLocation();
|
location = target.getHitBlock().getLocation();
|
||||||
|
|
@ -96,7 +96,7 @@ public class CreateCommand extends SubCommand {
|
||||||
|
|
||||||
BlockFoxDisplay newDisplay = new BlockFoxDisplay(plugin, name, location, orientation, fixed_mode);
|
BlockFoxDisplay newDisplay = new BlockFoxDisplay(plugin, name, location, orientation, fixed_mode);
|
||||||
if(plugin.getDisplayList().collidesWithBlockFoxDisplay(newDisplay)) {
|
if(plugin.getDisplayList().collidesWithBlockFoxDisplay(newDisplay)) {
|
||||||
MessageUtils.sendSimpleWarningMessage(player, "display.create.collidesWithOther");
|
SimpleChatMessages.sendSimpleWarningMessage(player, "display.create.collidesWithOther");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
newDisplay.generateDisplays();
|
newDisplay.generateDisplays();
|
||||||
|
|
@ -104,7 +104,7 @@ public class CreateCommand extends SubCommand {
|
||||||
newDisplay.generateBackgroundBlocks();
|
newDisplay.generateBackgroundBlocks();
|
||||||
}
|
}
|
||||||
plugin.getDisplayList().addBlockFoxDisplay(newDisplay);
|
plugin.getDisplayList().addBlockFoxDisplay(newDisplay);
|
||||||
MessageUtils.sendSimpleSuccessMessage(player, "display.create.success");
|
SimpleChatMessages.sendSimpleSuccessMessage(player, "display.create.success");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ import de.iani.cubesideutils.bukkit.commands.exceptions.RequiresPlayerException;
|
||||||
import de.iani.cubesideutils.commands.ArgsParser;
|
import de.iani.cubesideutils.commands.ArgsParser;
|
||||||
import de.lunarakai.blockfox.BlockFoxPlugin;
|
import de.lunarakai.blockfox.BlockFoxPlugin;
|
||||||
import de.lunarakai.blockfox.common.BlockFoxDisplay;
|
import de.lunarakai.blockfox.common.BlockFoxDisplay;
|
||||||
import de.lunarakai.lunarutils.chat.MessageUtils;
|
import de.lunarakai.lunarutils.chat.SimpleChatMessages;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import org.bukkit.block.Block;
|
import org.bukkit.block.Block;
|
||||||
|
|
@ -53,7 +53,7 @@ public class DeleteCommand extends SubCommand {
|
||||||
}
|
}
|
||||||
if(display != null) {
|
if(display != null) {
|
||||||
plugin.getDisplayList().removeBlockFoxDisplay(display);
|
plugin.getDisplayList().removeBlockFoxDisplay(display);
|
||||||
MessageUtils.sendSimpleWarningMessage(player, "display.delete.success");
|
SimpleChatMessages.sendSimpleWarningMessage(player, "display.delete.success");
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -13,8 +13,8 @@ import de.iani.cubesideutils.commands.ArgsParser;
|
||||||
import de.lunarakai.blockfox.BlockFoxPlugin;
|
import de.lunarakai.blockfox.BlockFoxPlugin;
|
||||||
import de.lunarakai.blockfox.utils.HTMLUtils;
|
import de.lunarakai.blockfox.utils.HTMLUtils;
|
||||||
import de.lunarakai.blockfox.utils.TimeUtils;
|
import de.lunarakai.blockfox.utils.TimeUtils;
|
||||||
import de.lunarakai.lunarutils.StringUtils;
|
import de.lunarakai.lunarutils.other.URIValidation;
|
||||||
import de.lunarakai.lunarutils.chat.MessageUtils;
|
import de.lunarakai.lunarutils.chat.SimpleChatMessages;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
|
|
@ -52,8 +52,8 @@ public class TestRSSCommand extends SubCommand {
|
||||||
}
|
}
|
||||||
String url = args.getNext().trim();
|
String url = args.getNext().trim();
|
||||||
|
|
||||||
if(!StringUtils.isValidURL(url)) {
|
if(!URIValidation.isValidURL(url)) {
|
||||||
MessageUtils.sendSimpleWarningMessage(player, "please enter a valid URL");
|
SimpleChatMessages.sendSimpleWarningMessage(player, "please enter a valid URL");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -72,7 +72,7 @@ public class TestRSSCommand extends SubCommand {
|
||||||
Document parsedTest = Jsoup.parse(optionaltest.get());
|
Document parsedTest = Jsoup.parse(optionaltest.get());
|
||||||
List<String> list = HTMLUtils.formatHTMLList(parsedTest);
|
List<String> list = HTMLUtils.formatHTMLList(parsedTest);
|
||||||
for(String string: list) {
|
for(String string: list) {
|
||||||
MessageUtils.sendSimpleSuccessMessage(player, string);
|
SimpleChatMessages.sendSimpleSuccessMessage(player, string);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
Optional<String> optionalDescription = items.getFirst().getDescription();
|
Optional<String> optionalDescription = items.getFirst().getDescription();
|
||||||
|
|
@ -85,7 +85,7 @@ public class TestRSSCommand extends SubCommand {
|
||||||
Optional<String> optionalDate = items.getFirst().getPubDate();
|
Optional<String> optionalDate = items.getFirst().getPubDate();
|
||||||
if(optionalDate.isPresent()) {
|
if(optionalDate.isPresent()) {
|
||||||
String time = TimeUtils.convertStringTime(plugin, optionalDate.get());
|
String time = TimeUtils.convertStringTime(plugin, optionalDate.get());
|
||||||
MessageUtils.sendSimpleSpecialMessage(player, time, NamedTextColor.GRAY);
|
SimpleChatMessages.sendSimpleSpecialMessage(player, time, NamedTextColor.GRAY);
|
||||||
}
|
}
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
throw new RuntimeException(e);
|
throw new RuntimeException(e);
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ package de.lunarakai.blockfox.common;
|
||||||
|
|
||||||
import com.google.common.base.Preconditions;
|
import com.google.common.base.Preconditions;
|
||||||
import de.lunarakai.blockfox.BlockFoxPlugin;
|
import de.lunarakai.blockfox.BlockFoxPlugin;
|
||||||
import de.lunarakai.lunarutils.chat.MessageUtils;
|
import de.lunarakai.lunarutils.chat.SimpleChatMessages;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
public class BlockFoxManager {
|
public class BlockFoxManager {
|
||||||
|
|
@ -26,7 +26,7 @@ public class BlockFoxManager {
|
||||||
Preconditions.checkArgument(display != null, "player is not using any display");
|
Preconditions.checkArgument(display != null, "player is not using any display");
|
||||||
plugin.getDisplayList().setBlockFoxDisplayForPlayer(player, null);
|
plugin.getDisplayList().setBlockFoxDisplayForPlayer(player, null);
|
||||||
if(message) {
|
if(message) {
|
||||||
MessageUtils.sendSimpleInfoMessage(player, "blockfox.display.usagecanceled");
|
SimpleChatMessages.sendSimpleInfoMessage(player, "blockfox.display.usagecanceled");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue