-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
162 additions
and
71 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
35 changes: 35 additions & 0 deletions
35
src/main/java/de/Ste3et_C0st/FurnitureLib/LimitationManager/LimitationInforamtion.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
package de.Ste3et_C0st.FurnitureLib.LimitationManager; | ||
|
||
public class LimitationInforamtion { | ||
|
||
private final String type; | ||
private final int max, amount; | ||
|
||
public LimitationInforamtion(String type, int max, int amount) { | ||
this.type = type; | ||
this.max = max; | ||
this.amount = amount; | ||
} | ||
|
||
public String getType() { | ||
return type; | ||
} | ||
|
||
public int getMax() { | ||
return max; | ||
} | ||
|
||
public int getAmount() { | ||
return amount; | ||
} | ||
|
||
public boolean isCanceld() { | ||
if(isInfinite()) return false; | ||
return amount + 1 > max; | ||
} | ||
|
||
public boolean isInfinite() { | ||
return max < 1; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters