Skip to content

Commit

Permalink
Bunch of fixes for arbitrary things.
Browse files Browse the repository at this point in the history
Only some of them I made.
Okay most of them were me.
Fixes ezeiger92/Bukkit-Prism#3
  • Loading branch information
ezeiger92 committed Jan 27, 2018
1 parent 4d19146 commit 6ae1362
Show file tree
Hide file tree
Showing 7 changed files with 254 additions and 195 deletions.
3 changes: 3 additions & 0 deletions pom.xml
Expand Up @@ -5,6 +5,9 @@
<artifactId>prism</artifactId>
<version>2.1.0</version>
<name>prism</name>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<!-- <dependency>
<groupId>us.dhmc</groupId>
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/me/botsko/prism/Prism.java
Expand Up @@ -327,7 +327,8 @@ public DataSource initDbPool() {
DataSource pool = null;

final String dns = "jdbc:mysql://" + config.getString( "prism.mysql.hostname" ) + ":"
+ config.getString( "prism.mysql.port" ) + "/" + config.getString( "prism.mysql.database" ) + "?useUnicode=true&characterEncoding=UTF-8";
+ config.getString( "prism.mysql.port" ) + "/" + config.getString( "prism.mysql.database" )
+ "?useUnicode=true&characterEncoding=UTF-8&useSSL=false";
pool = new DataSource();
pool.setDriverClassName( "com.mysql.jdbc.Driver" );
pool.setUrl( dns );
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/me/botsko/prism/actionlibs/RecordingTask.java
Expand Up @@ -235,9 +235,9 @@ public void insertActionsIntoDatabase() {

// TODO: Lookup name and get id
@SuppressWarnings("deprecation")
int newId = a.getBlock().getId();
int newId = a.getBlock() != null ? a.getBlock().getId() : 0;
@SuppressWarnings("deprecation")
int oldId = a.getOldBlock().getId();
int oldId = a.getOldBlock() != null ? a.getOldBlock().getId() : 0;

s.setInt( 5, newId );
s.setInt( 6, a.getBlockSubId() );
Expand Down

0 comments on commit 6ae1362

Please sign in to comment.