-
Notifications
You must be signed in to change notification settings - Fork 4
Make a new abstraction for claims #12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
| return wrapped.isInside(location); | ||
| } | ||
|
|
||
| @Override |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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())); |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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 { |
There was a problem hiding this comment.
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()); |
There was a problem hiding this comment.
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()); | ||
| /** |
There was a problem hiding this comment.
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.
| } | ||
| } | ||
|
|
||
| /** |
There was a problem hiding this comment.
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.
|
Code Climate has analyzed commit 3f58acc and detected 100 issues on this pull request. Here's the issue category breakdown:
View more on Code Climate. |
e15de34 to
d71cb40
Compare
No description provided.