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>
|
||||
<version>3.8.1</version>
|
||||
<configuration>
|
||||
<source>16</source>
|
||||
<target>16</target>
|
||||
<source>17</source>
|
||||
<target>17</target>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
|
@ -38,7 +38,7 @@ public final class PaidSigns extends JavaPlugin {
|
||||
private boolean ignoreCase;
|
||||
private boolean ignoreColor;
|
||||
private boolean enableRefunds;
|
||||
private int refundPercentage;
|
||||
private short refundPercentage;
|
||||
|
||||
/**
|
||||
* 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>
|
||||
*/
|
||||
public int getRefundPercentage() {
|
||||
public short getRefundPercentage() {
|
||||
if (this.refundPercentage < 0) {
|
||||
return 0;
|
||||
} else if (refundPercentage > 100) {
|
||||
@ -178,7 +178,7 @@ public final class PaidSigns extends JavaPlugin {
|
||||
ignoreCase = config.getBoolean("ignoreCase", true);
|
||||
ignoreColor = config.getBoolean("ignoreColor", false);
|
||||
enableRefunds = config.getBoolean("enableRefunds", true);
|
||||
refundPercentage = config.getInt("refundPercentage", 100);
|
||||
refundPercentage = (short) config.getInt("refundPercentage", 100);
|
||||
language = config.getString("language", "en");
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user