Added RixaPermission#fromString, GuildMapper, GuildManager
This commit is contained in:
parent
4c67eff7ee
commit
6e5b7a0b42
6
.idea/vcs.xml
Normal file
6
.idea/vcs.xml
Normal file
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
6
pom.xml
6
pom.xml
@ -42,6 +42,12 @@
|
||||
<artifactId>lombok</artifactId>
|
||||
<version>1.16.18</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-jdbc</artifactId>
|
||||
<version>4.3.9.RELEASE</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
|
@ -2,4 +2,13 @@ package io.rixa.commands;
|
||||
|
||||
public enum RixaPermission {
|
||||
NONE;
|
||||
|
||||
public static RixaPermission fromString(String string) {
|
||||
for (RixaPermission value : values()) {
|
||||
if (value.toString().equalsIgnoreCase(string)) {
|
||||
return value;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
package io.rixa.guild;
|
||||
|
||||
import io.rixa.guild.manager.IGuild;
|
||||
import io.rixa.guild.modules.RixaModule;
|
||||
import lombok.Getter;
|
||||
import net.dv8tion.jda.core.entities.Guild;
|
||||
|
4
src/main/java/io/rixa/guild/manager/GuildManager.java
Normal file
4
src/main/java/io/rixa/guild/manager/GuildManager.java
Normal file
@ -0,0 +1,4 @@
|
||||
package io.rixa.guild.manager;
|
||||
|
||||
public class GuildManager {
|
||||
}
|
18
src/main/java/io/rixa/guild/manager/GuildMapper.java
Normal file
18
src/main/java/io/rixa/guild/manager/GuildMapper.java
Normal file
@ -0,0 +1,18 @@
|
||||
package io.rixa.guild.manager;
|
||||
|
||||
import io.rixa.guild.RixaGuild;
|
||||
import org.springframework.jdbc.core.RowMapper;
|
||||
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
|
||||
public class GuildMapper implements RowMapper<RixaGuild> {
|
||||
|
||||
@Override
|
||||
public RixaGuild mapRow(ResultSet resultSet, int i) throws SQLException {
|
||||
RixaGuild guild = new RixaGuild(null);
|
||||
guild.load(resultSet);
|
||||
// Register guild;
|
||||
return guild;
|
||||
}
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
package io.rixa.guild;
|
||||
package io.rixa.guild.manager;
|
||||
|
||||
import io.rixa.guild.modules.RixaModule;
|
||||
|
Loading…
Reference in New Issue
Block a user