v1.0.2 Update || Bug fixes

Hello, this is a quick update to fix some bugs.

Bugs:
- Players that tried running commands without permission got an error.
- Default sell and bid limit was set to 1 and not 0.
- Bid limiter wasn't working and was set to the selling limiter.
This commit is contained in:
BadBones69 2016-10-31 12:27:07 -04:00
parent 1f823c409b
commit 9aca319650
3 changed files with 5 additions and 5 deletions

View File

@ -2,7 +2,7 @@ name: CrazyAuctions
author: BadBones69
main: me.badbones69.crazyauctions.Main
website: https://www.spigotmc.org/resources/authors/kicjow.9719/
version: 1.0.1
version: 1.0.2
depend: [Vault]
description: >
A plugin to auction off items globally.

View File

@ -216,7 +216,7 @@ public class Api {
if(sender instanceof Player){
Player player = (Player) sender;
if(!player.hasPermission("CrazyAuctions." + perm)){
player.sendMessage(color(Main.settings.getConfig().getString("Messages.No-Permission")));
player.sendMessage(color(Main.settings.getMsg().getString("Messages.No-Permission")));
return false;
}else{
return true;

View File

@ -179,8 +179,8 @@ public class Main extends JavaPlugin implements Listener{
return true;
}
}
int SellLimit = 1;
int BidLimit = 1;
int SellLimit = 0;
int BidLimit = 0;
for(PermissionAttachmentInfo permission : player.getEffectivePermissions()){
String perm = permission.getPermission();
if(perm.startsWith("crazyauctions.sell.")){
@ -194,7 +194,7 @@ public class Main extends JavaPlugin implements Listener{
if(perm.startsWith("crazyauctions.bid.")){
perm=perm.replace("crazyauctions.bid.", "");
if(Api.isInt(perm)){
if(Integer.parseInt(perm)>SellLimit){
if(Integer.parseInt(perm)>BidLimit){
BidLimit = Integer.parseInt(perm);
}
}