SHOW:
|
|
- or go back to the newest paste.
| 1 | - | public static Integer getLimit(Player p) {
|
| 1 | + | public static Integer getLimit(Player p) {
|
| 2 | - | Integer limit = 0; |
| 2 | + | Integer limit = 0; |
| 3 | - | Integer maxlimit = 255; |
| 3 | + | Integer maxlimit = 255; |
| 4 | - | if(p.hasPermission("pl3xnpc.limit.*"))
|
| 4 | + | if(p.hasPermission("pl3xnpc.limit.*"))
|
| 5 | - | return -1; |
| 5 | + | return -1; |
| 6 | - | else |
| 6 | + | for(int i = 0; i < maxlimit; i++) |
| 7 | - | for(int i = 0; i < maxlimit; i++) |
| 7 | + | if(p.hasPermission("pl3xnpc.limit." + i))
|
| 8 | - | if(p.hasPermission("pl3xnpc.limit." + i))
|
| 8 | + | if (i > limit) |
| 9 | - | if (i > limit) |
| 9 | + | limit = i; |
| 10 | - | limit = i; |
| 10 | + | return limit; |
| 11 | - | return limit; |
| 11 | + | } |