summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Essentials/src/com/earth2me/essentials/textreader/BookPager.java15
-rw-r--r--nbactions.xml2
2 files changed, 13 insertions, 4 deletions
diff --git a/Essentials/src/com/earth2me/essentials/textreader/BookPager.java b/Essentials/src/com/earth2me/essentials/textreader/BookPager.java
index e9dbd88bd..711eb1730 100644
--- a/Essentials/src/com/earth2me/essentials/textreader/BookPager.java
+++ b/Essentials/src/com/earth2me/essentials/textreader/BookPager.java
@@ -5,6 +5,7 @@ import java.util.ArrayList;
import java.util.List;
import java.util.Locale;
import java.util.Map;
+import org.bukkit.Bukkit;
public class BookPager
@@ -94,7 +95,10 @@ public class BookPager
tempLine = pageLine.substring(start, pointer);
pageLines.add(tempLine);
- buildPage(pages, pageLines, forcePageEnd);
+ if (buildPage(pages, pageLines, forcePageEnd))
+ {
+ pageLength = 0;
+ }
forcePageEnd = false;
start = pointer;
@@ -149,7 +153,10 @@ public class BookPager
{
tempLine = pageLine.substring(start, lineLength);
pageLines.add(tempLine);
- buildPage(pages, pageLines, false);
+ if (buildPage(pages, pageLines, false))
+ {
+ pageLength = 0;
+ }
}
}
@@ -157,7 +164,7 @@ public class BookPager
return pages;
}
- void buildPage(List<String> pages, List<String> lines, boolean override)
+ boolean buildPage(List<String> pages, List<String> lines, boolean override)
{
if (override || lines.size() > lineMax)
{
@@ -168,6 +175,8 @@ public class BookPager
}
pages.add(newPage.toString());
lines.clear();
+ return true;
}
+ return false;
}
}
diff --git a/nbactions.xml b/nbactions.xml
index 8d4997bfc..0842d88fd 100644
--- a/nbactions.xml
+++ b/nbactions.xml
@@ -4,11 +4,11 @@
<actionName>build-with-dependencies</actionName>
<reactor>also-make</reactor>
<goals>
- <goal>clean</goal>
<goal>package</goal>
<goal>dependency:copy</goal>
+
</goals>
</action>
<action>