fix \n bug & some hovers
This commit is contained in:
parent
9c7a5c8016
commit
3fe27e8aab
8 changed files with 51 additions and 3 deletions
|
@ -3,17 +3,19 @@ package lol.pyr.znpcsplus.util;
|
||||||
import java.io.BufferedReader;
|
import java.io.BufferedReader;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.Reader;
|
import java.io.Reader;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
public class FileUtil {
|
public class FileUtil {
|
||||||
public static String dumpReaderAsString(Reader reader) {
|
public static String dumpReaderAsString(Reader reader) {
|
||||||
BufferedReader bReader = new BufferedReader(reader);
|
BufferedReader bReader = new BufferedReader(reader);
|
||||||
try {
|
try {
|
||||||
StringBuilder sb = new StringBuilder();
|
List<String> lines = new ArrayList<>();
|
||||||
String line;
|
String line;
|
||||||
while ((line = bReader.readLine()) != null) {
|
while ((line = bReader.readLine()) != null) {
|
||||||
sb.append(line).append("\n");
|
lines.add(line);
|
||||||
}
|
}
|
||||||
return sb.toString();
|
return String.join("\n", lines);
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
throw new RuntimeException(e);
|
throw new RuntimeException(e);
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,13 @@
|
||||||
|
<gray>Examples:
|
||||||
|
<gold>* <yellow>/npc skin <gold>cool_npc1 static Notch
|
||||||
|
<gold>* <yellow>/npc skin <gold>my_npc mirror
|
||||||
|
<gold>* <yellow>/npc skin <gold>12 dynamic %leaderboard_mining_top_1%
|
||||||
|
<gold>* <yellow>/npc skin <gold>npc1234 url classic https://s.namemc.com/i/5d5eb6d84b57ea29.png
|
||||||
|
|
||||||
|
<gray>Skin Types:
|
||||||
|
<gold>* <yellow>Static <gray>- Only fetch the skin once and save the skin data
|
||||||
|
<gold>* <yellow>Mirror <gray>- Copy the skin of the player who is viewing the npc
|
||||||
|
<gold>* <yellow>Dynamic <gray>- Fetch the skin whenever the npc comes into viewing distance (supports placeholders)
|
||||||
|
<gold>* <yellow>Url <gray>- Fetch the skin from an url to a raw skin file, this works like static
|
||||||
|
|
||||||
|
<gray>Command used to change the skin of an npc
|
|
@ -0,0 +1,6 @@
|
||||||
|
<gray>Examples:
|
||||||
|
<gold>* <yellow>/npc teleport <gold>cool_npc1
|
||||||
|
<gold>* <yellow>/npc teleport <gold>my_npc
|
||||||
|
<gold>* <yellow>/npc teleport <gold>12
|
||||||
|
|
||||||
|
<gray>Command used to teleport yourself to an npc
|
|
@ -0,0 +1,6 @@
|
||||||
|
<gray>Examples:
|
||||||
|
<gold>* <yellow>/npc toggle <gold>cool_npc1
|
||||||
|
<gold>* <yellow>/npc toggle <gold>my_npc
|
||||||
|
<gold>* <yellow>/npc toggle <gold>12
|
||||||
|
|
||||||
|
<gray>Command used to enable or disable an npc
|
|
@ -0,0 +1,6 @@
|
||||||
|
<gray>Examples:
|
||||||
|
<gold>* <yellow>/npc type <gold>cool_npc1 zombie
|
||||||
|
<gold>* <yellow>/npc type <gold>my_npc skeleton
|
||||||
|
<gold>* <yellow>/npc type <gold>12 creeper
|
||||||
|
|
||||||
|
<gray>Command used to change the type of an npc
|
|
@ -0,0 +1,6 @@
|
||||||
|
<gray>Examples:
|
||||||
|
<gold>* <yellow>/npc storage import <gold>znpcs
|
||||||
|
<gold>* <yellow>/npc storage import <gold>znpcsplus_legacy
|
||||||
|
<gold>* <yellow>/npc storage import <gold>citizens
|
||||||
|
|
||||||
|
<gray>Command used to import npcs from a different npc plugin
|
|
@ -0,0 +1,5 @@
|
||||||
|
<gray>Examples:
|
||||||
|
<gold>* <yellow>/npc storage reload
|
||||||
|
|
||||||
|
<gray>Command used to re-load all npcs from storage
|
||||||
|
<red>Warning: This command will delete all unsaved changes to npcs
|
|
@ -0,0 +1,4 @@
|
||||||
|
<gray>Examples:
|
||||||
|
<gold>* <yellow>/npc storage save
|
||||||
|
|
||||||
|
<gray>Command used to save the currently loaded npcs to storage
|
Loading…
Reference in a new issue