Skip to content

Commit

Permalink
Add missing signs (#128)
Browse files Browse the repository at this point in the history
* Increase sign name character limit

* Add crimson and warped wall signs to config

* bump version
  • Loading branch information
weaves7 authored Dec 24, 2021
1 parent a987019 commit 78f9872
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>org.makershaven</groupId>
<artifactId>SignShop</artifactId>
<version>3.6.1</version>
<version>3.6.2</version>
<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ private boolean loadSellerFromSettings(String key, HashMap<String,List<String>>
} catch(StorageException caughtex) {
if(!caughtex.getWorld().isEmpty()) {
for(World temp : Bukkit.getServer().getWorlds()) {
if(temp.getName().equalsIgnoreCase(caughtex.getWorld()) && temp.getLoadedChunks().length == 0) {
if(temp.getName().equalsIgnoreCase(caughtex.getWorld()) && temp.getLoadedChunks().length == 0) { //TODO Option to short circuit this to prevent invalid shop removal
invalidShops.put(key, sellerSettings);
return true; // World might not be loaded yet
}
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/org/wargamer2010/signshop/util/itemUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
import java.util.regex.Matcher;
import java.util.regex.Pattern;

/** @noinspection deprecation*/ //TODO Remove deprecated calls
public class itemUtil {

private itemUtil() {
Expand Down Expand Up @@ -252,7 +253,7 @@ public static void setSignStatus(Block sign, ChatColor color) {
if(clickedSign(sign)) {
Sign signblock = ((Sign) sign.getState());
String[] sLines = signblock.getLines();
if(ChatColor.stripColor(sLines[0]).length() < 14) {
if(ChatColor.stripColor(sLines[0]).length() <= 14) {
signblock.setLine(0, (color + ChatColor.stripColor(sLines[0])));
signblock.update();
}
Expand Down
2 changes: 2 additions & 0 deletions src/main/resources/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,9 @@ linkableMaterials:
SPRUCE_SIGN: sign
SPRUCE_WALL_SIGN: sign
CRIMSON_SIGN: sign
CRIMSON_WALL_SIGN: sign
WARPED_SIGN: sign
WARPED_WALL_SIGN: sign
STEP: slab
JUKEBOX: jukebox
ACACIA_DOOR: door
Expand Down

0 comments on commit 78f9872

Please sign in to comment.