Makes refundPercentage use short instead of int
This commit is contained in:
parent
abb080b065
commit
3d83458b9c
4
pom.xml
4
pom.xml
@ -25,8 +25,8 @@
|
|||||||
<artifactId>maven-compiler-plugin</artifactId>
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
<version>3.8.1</version>
|
<version>3.8.1</version>
|
||||||
<configuration>
|
<configuration>
|
||||||
<source>16</source>
|
<source>17</source>
|
||||||
<target>16</target>
|
<target>17</target>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
<plugin>
|
||||||
|
@ -38,7 +38,7 @@ public final class PaidSigns extends JavaPlugin {
|
|||||||
private boolean ignoreCase;
|
private boolean ignoreCase;
|
||||||
private boolean ignoreColor;
|
private boolean ignoreColor;
|
||||||
private boolean enableRefunds;
|
private boolean enableRefunds;
|
||||||
private int refundPercentage;
|
private short refundPercentage;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Instantiates a new paid signs object
|
* Instantiates a new paid signs object
|
||||||
@ -128,7 +128,7 @@ public final class PaidSigns extends JavaPlugin {
|
|||||||
*
|
*
|
||||||
* @return <p>The percentage of the cost to refund</p>
|
* @return <p>The percentage of the cost to refund</p>
|
||||||
*/
|
*/
|
||||||
public int getRefundPercentage() {
|
public short getRefundPercentage() {
|
||||||
if (this.refundPercentage < 0) {
|
if (this.refundPercentage < 0) {
|
||||||
return 0;
|
return 0;
|
||||||
} else if (refundPercentage > 100) {
|
} else if (refundPercentage > 100) {
|
||||||
@ -178,7 +178,7 @@ public final class PaidSigns extends JavaPlugin {
|
|||||||
ignoreCase = config.getBoolean("ignoreCase", true);
|
ignoreCase = config.getBoolean("ignoreCase", true);
|
||||||
ignoreColor = config.getBoolean("ignoreColor", false);
|
ignoreColor = config.getBoolean("ignoreColor", false);
|
||||||
enableRefunds = config.getBoolean("enableRefunds", true);
|
enableRefunds = config.getBoolean("enableRefunds", true);
|
||||||
refundPercentage = config.getInt("refundPercentage", 100);
|
refundPercentage = (short) config.getInt("refundPercentage", 100);
|
||||||
language = config.getString("language", "en");
|
language = config.getString("language", "en");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user