Makes refundPercentage use short instead of int

This commit is contained in:
Kristian Knarvik 2022-03-02 13:02:34 +01:00
parent abb080b065
commit 3d83458b9c
2 changed files with 5 additions and 5 deletions

View File

@ -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>

View File

@ -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");
}