Skip to content

Commit 4b5785f

Browse files
author
magiclu550
committed
[commit] something...
1 parent 7dfb4d3 commit 4b5785f

File tree

176 files changed

+613
-12184
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

176 files changed

+613
-12184
lines changed

.idea/libraries/Maven__com_fasterxml_classmate_1_3_4.xml

Lines changed: 13 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/libraries/Maven__com_fasterxml_jackson_core_jackson_core_2_9_2.xml

Lines changed: 13 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/libraries/Maven__com_fasterxml_jackson_core_jackson_databind_2_9_2.xml

Lines changed: 13 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/libraries/Maven__org_apache_commons_commons_lang3_3_7.xml

Lines changed: 13 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/libraries/Maven__org_springframework_hateoas_spring_hateoas_0_25_0_RELEASE.xml

Lines changed: 13 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

JPLS/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
55
<modelVersion>4.0.0</modelVersion>
66
<groupId>cn.jsmod2</groupId>
7-
<artifactId>JSMod2Starter</artifactId>
7+
<artifactId>JPLS</artifactId>
88
<version>1.0.BETA</version>
99
<parent>
1010
<groupId>org.springframework.boot</groupId>

JPLS/src/main/java/cn/jsmod2/Register.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ public void registerNativeCommand(){
9797
nativeCommandMap.put("about",new AboutCommand());
9898
nativeCommandMap.put("multi",new MultiCommand());
9999
nativeCommandMap.put("download",new DownloadPluginCommand());
100+
nativeCommandMap.put("register",new RegisterPanelCommand());
100101
}
101102

102103

JPLS/src/main/java/cn/jsmod2/ResponseValue.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@ public class ResponseValue<T> {
44

55
private String message;
66

7-
private T responseValue;
7+
private T value;
88

99
private int state;
1010

1111
public ResponseValue(String message, T responseValue, int state) {
1212
this.message = message;
13-
this.responseValue = responseValue;
13+
this.value = responseValue;
1414
this.state = state;
1515
}
1616

@@ -22,12 +22,12 @@ public void setMessage(String message) {
2222
this.message = message;
2323
}
2424

25-
public T getResponseValue() {
26-
return responseValue;
25+
public T getValue() {
26+
return value;
2727
}
2828

29-
public void setResponseValue(T responseValue) {
30-
this.responseValue = responseValue;
29+
public void setValue(T value) {
30+
this.value = value;
3131
}
3232

3333
public int getState() {
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
package cn.jsmod2.command;
2+
3+
import cn.jsmod2.core.CommandSender;
4+
import cn.jsmod2.core.Powers;
5+
import cn.jsmod2.core.command.NativeCommand;
6+
import cn.jsmod2.web.utils.PasswordUtil;
7+
8+
public class RegisterPanelCommand extends NativeCommand {
9+
10+
public RegisterPanelCommand() {
11+
super("register", Powers.CONSOLE, "register the Control Panel");
12+
}
13+
14+
//register name pwd -m 修改密码
15+
@Override
16+
public boolean execute(CommandSender commandSender, String[] strings) {
17+
if (strings.length>=3&&strings[2].equals("-m")){
18+
PasswordUtil.modifyPassword(strings[0],strings[1]);
19+
return true;
20+
}
21+
PasswordUtil.writePassword(strings[0],strings[1]);
22+
return true;
23+
}
24+
}

JPLS/src/main/java/cn/jsmod2/core/FileSystem.java

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,19 @@ private FileSystem(){
100100
public static final String PROPERTIES = ".properties";
101101

102102

103+
public File jsmod2Db() throws IOException{
104+
File file = new File(Server.getSender().getServer().getServerFolder(),".jsmod2.db");
105+
if(!file.exists()){
106+
file.createNewFile();
107+
}
108+
if(!file.isHidden()){
109+
if(!System.getProperty("os.name").toLowerCase().contains("linux")){
110+
String sets = "attrib +H \"" + file.getAbsolutePath() + "\"";
111+
Runtime.getRuntime().exec(sets);
112+
}
113+
}
114+
return file;
115+
}
103116

104117

105118
public Properties infoProperties(boolean newInfo){

0 commit comments

Comments
 (0)