Skip to content

Conversation

@zyuiop
Copy link
Owner

@zyuiop zyuiop commented Sep 6, 2019

No description provided.

return wrapped.isInside(location);
}

@Override

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar blocks of code found in 3 locations. Consider refactoring.


GregorianCalendar compare = new GregorianCalendar();
compare.setTime(target);
@Override

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar blocks of code found in 3 locations. Consider refactoring.

return wrapped.canInteractWithBlock(player, block, action) || hasPermission(player, CityPermissions.INTERACT_IN_PLOTS);
}

@Override

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar blocks of code found in 3 locations. Consider refactoring.


@EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true)
public void onInteractEntity(PlayerInteractAtEntityEvent event) {
event.setCancelled(!claims.canInteractWithEntity(event.getPlayer(), event.getRightClicked()));

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line is longer than 100 characters (found 102).

}


@EventHandler

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Method onFireSpread has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.

this.claims = claims;
}

@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Method onInteract has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.

import java.util.concurrent.CopyOnWriteArrayList;

public class Plot implements Ownable {
public class Plot extends CompoundClaim implements Ownable {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Plot has 26 methods (exceeds 20 allowed). Consider refactoring.

continue;

player.sendMessage(ChatColor.RED + "ATTENTION ! Votre compte ne contient pas assez d'argent pour payer vos impots.");
player.sendMessage(ChatColor.RED + "Vous devez " + ChatColor.AQUA + topay + ChatColor.RED + " à la ville de " + ChatColor.AQUA + entry.getKey());

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar blocks of code found in 2 locations. Consider refactoring.

private static boolean sameDay(Date target) {
GregorianCalendar date = new GregorianCalendar();
date.setTime(new Date());
/**

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

First sentence of Javadoc is missing an ending period.

}
}

/**

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

First sentence of Javadoc is missing an ending period.

@qlty-cloud-legacy
Copy link

Code Climate has analyzed commit 3f58acc and detected 100 issues on this pull request.

Here's the issue category breakdown:

Category Count
Complexity 4
Duplication 4
Style 92

View more on Code Climate.

@zyuiop zyuiop force-pushed the master branch 2 times, most recently from e15de34 to d71cb40 Compare March 19, 2020 13:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants