ursinn/DeadByDaylightMC

View on GitHub

Showing 36 of 213 total issues

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

package noahnok.dbdl.files.utils;

import org.bukkit.Material;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
Severity: Major
Found in src/main/java/noahnok/dbdl/files/utils/InventoryEvents.java and 1 other location - About 2 hrs to fix
src/main/java/noahnok/dbdl/files/utils/pagenation/PageEvent.java on lines 1..42

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 147.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

package noahnok.dbdl.files.utils.pagenation;

import noahnok.dbdl.files.utils.pagenation.buttons.PageItem;
import noahnok.dbdl.files.utils.pagenation.interfaces.GeneralClick;
import org.bukkit.Material;
src/main/java/noahnok/dbdl/files/utils/InventoryEvents.java on lines 1..46

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 147.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

    public void announceJoin(Player p) {
        for (DPlayer player : players) {
            Player reciever = main.getServer().getPlayer(player.getId());
            reciever.spigot().sendMessage(ChatMessageType.ACTION_BAR,
                    TextComponent.fromLegacyText(ChatColor.GOLD + p.getName() + ChatColor.GRAY + " joined the game!"));
Severity: Major
Found in src/main/java/noahnok/dbdl/files/game/DGame.java and 1 other location - About 1 hr to fix
src/main/java/noahnok/dbdl/files/game/DGame.java on lines 254..264

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 112.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

    public void announceLeave(Player p) {
        for (DPlayer player : players) {
            Player reciever = main.getServer().getPlayer(player.getId());
            reciever.spigot().sendMessage(ChatMessageType.ACTION_BAR,
                    TextComponent.fromLegacyText(ChatColor.GOLD + p.getName() + ChatColor.GRAY + " left the game!"));
Severity: Major
Found in src/main/java/noahnok/dbdl/files/game/DGame.java and 1 other location - About 1 hr to fix
src/main/java/noahnok/dbdl/files/game/DGame.java on lines 242..252

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 112.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

            } else {
                i = invBuilder.createIcon(itemBuilder.getNewBuilder(Material.WOOL)
                        .setByte((short) 14).build(), ChatColor.GOLD + "✕ " + mode.getId());
                i.addLore(ChatColor.translateAlternateColorCodes('&', "&aClick to &a&lENABLE &a this mode!"));
                i.addLore("");
src/main/java/noahnok/dbdl/files/utils/ArenaManagmentInvs.java on lines 148..159

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 102.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

            if (Boolean.TRUE.equals(a.getUsableModes().get(mode))) {
                i = invBuilder.createIcon(itemBuilder.getNewBuilder(Material.WOOL)
                        .setByte((short) 5).build(), ChatColor.GREEN + "✔ " + mode.getId());
                i.addLore(ChatColor.translateAlternateColorCodes('&', "&4Click to &4&lDISABLE &4 this mode!"));
                i.addLore("");
src/main/java/noahnok/dbdl/files/utils/ArenaManagmentInvs.java on lines 159..169

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 102.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

        if (args[0].equalsIgnoreCase("create")) {
            if (args.length == 1) {
                player.sendMessage("Please provide an arena name(ID)");
                return true;
            }
src/main/java/noahnok/dbdl/files/commands/ArenaCommands.java on lines 54..67

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 90.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

        if (args[0].equalsIgnoreCase("delete")) {
            if (args.length == 1) {
                player.sendMessage("Please provide an arena name(ID)");
                return true;
            }
src/main/java/noahnok/dbdl/files/commands/ArenaCommands.java on lines 32..45

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 90.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

    public void countDownBleep(int timeLeft) {
        for (DPlayer player : players) {
            Player actual = player.getPlayer();
            actual.spigot().sendMessage(ChatMessageType.ACTION_BAR,
                    TextComponent.fromLegacyText(ChatColor.translateAlternateColorCodes('&',
Severity: Major
Found in src/main/java/noahnok/dbdl/files/game/DGame.java and 1 other location - About 1 hr to fix
src/main/java/noahnok/dbdl/files/game/DGame.java on lines 342..352

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 82.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

    public void gameStartBleep(int timeLeft) {
        for (DPlayer player : players) {
            Player actual = player.getPlayer();
            actual.spigot().sendMessage(ChatMessageType.ACTION_BAR,
                    TextComponent.fromLegacyText(ChatColor.translateAlternateColorCodes('&',
Severity: Major
Found in src/main/java/noahnok/dbdl/files/game/DGame.java and 1 other location - About 1 hr to fix
src/main/java/noahnok/dbdl/files/game/DGame.java on lines 331..340

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 82.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

        hunter = new EditorItem(new ItemStack(Material.WOOL, 1, (short) 15), "&0Hunter")
                .addExecutor((Player p, Location bloc) -> {
                    p.sendMessage("Hunter Spawn Placed");
                    editing.get(p.getUniqueId()).getPossibleHunterSpawns().add(bloc);
                    addShulker(bloc, BLACK, Material.WOOL, editing.get(p.getUniqueId()));
Severity: Major
Found in src/main/java/noahnok/dbdl/files/utils/ArenaEditor.java and 1 other location - About 1 hr to fix
src/main/java/noahnok/dbdl/files/utils/ArenaEditor.java on lines 297..302

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 72.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

        hunted = new EditorItem(new ItemStack(Material.WOOL, 1, (short) 0), "&fHunted")
                .addExecutor((Player p, Location bloc) -> {
                    p.sendMessage("Hunted Spawn Placed");
                    editing.get(p.getUniqueId()).getPossibleHuntedSpawns().add(bloc);
                    addShulker(bloc, WHITE, Material.WOOL, editing.get(p.getUniqueId()));
Severity: Major
Found in src/main/java/noahnok/dbdl/files/utils/ArenaEditor.java and 1 other location - About 1 hr to fix
src/main/java/noahnok/dbdl/files/utils/ArenaEditor.java on lines 306..311

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 72.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 7 locations. Consider refactoring.
Open

        generator = new EditorItem(new ItemStack(Material.FURNACE, 1), "&bGenerator")
                .addExecutor((Player p, Location bloc) -> {
                    p.sendMessage("Generator placed!");
                    editing.get(p.getUniqueId()).getPossibleGeneratorLocations().add(bloc);
                    addShulker(bloc, BLUE, Material.FURNACE, editing.get(p.getUniqueId()));
Severity: Major
Found in src/main/java/noahnok/dbdl/files/utils/ArenaEditor.java and 6 other locations - About 1 hr to fix
src/main/java/noahnok/dbdl/files/utils/ArenaEditor.java on lines 270..275
src/main/java/noahnok/dbdl/files/utils/ArenaEditor.java on lines 279..284
src/main/java/noahnok/dbdl/files/utils/ArenaEditor.java on lines 288..293
src/main/java/noahnok/dbdl/files/utils/ArenaEditor.java on lines 337..342
src/main/java/noahnok/dbdl/files/utils/ArenaEditor.java on lines 346..351
src/main/java/noahnok/dbdl/files/utils/ArenaEditor.java on lines 355..360

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 68.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 7 locations. Consider refactoring.
Open

        hatch = new EditorItem(new ItemStack(Material.TRAP_DOOR, 1), "&5Hatch")
                .addExecutor((Player p, Location bloc) -> {
                    p.sendMessage("Hatch Location Placed");
                    editing.get(p.getUniqueId()).getPossibleHatchLocations().add(bloc);
                    addShulker(bloc, PURPLE, Material.TRAP_DOOR, editing.get(p.getUniqueId()));
Severity: Major
Found in src/main/java/noahnok/dbdl/files/utils/ArenaEditor.java and 6 other locations - About 1 hr to fix
src/main/java/noahnok/dbdl/files/utils/ArenaEditor.java on lines 261..266
src/main/java/noahnok/dbdl/files/utils/ArenaEditor.java on lines 270..275
src/main/java/noahnok/dbdl/files/utils/ArenaEditor.java on lines 279..284
src/main/java/noahnok/dbdl/files/utils/ArenaEditor.java on lines 288..293
src/main/java/noahnok/dbdl/files/utils/ArenaEditor.java on lines 346..351
src/main/java/noahnok/dbdl/files/utils/ArenaEditor.java on lines 355..360

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 68.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 7 locations. Consider refactoring.
Open

        chest = new EditorItem(new ItemStack(Material.CHEST, 1), "&1Chest")
                .addExecutor((Player p, Location bloc) -> {
                    p.sendMessage("Chest placed!");
                    editing.get(p.getUniqueId()).getPossibleChestSpawns().add(bloc);
                    addShulker(bloc, D_BLUE, Material.CHEST, editing.get(p.getUniqueId()));
Severity: Major
Found in src/main/java/noahnok/dbdl/files/utils/ArenaEditor.java and 6 other locations - About 1 hr to fix
src/main/java/noahnok/dbdl/files/utils/ArenaEditor.java on lines 261..266
src/main/java/noahnok/dbdl/files/utils/ArenaEditor.java on lines 270..275
src/main/java/noahnok/dbdl/files/utils/ArenaEditor.java on lines 288..293
src/main/java/noahnok/dbdl/files/utils/ArenaEditor.java on lines 337..342
src/main/java/noahnok/dbdl/files/utils/ArenaEditor.java on lines 346..351
src/main/java/noahnok/dbdl/files/utils/ArenaEditor.java on lines 355..360

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 68.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 7 locations. Consider refactoring.
Open

        trap = new EditorItem(new ItemStack(Material.PISTON_BASE, 1), "&dTrap")
                .addExecutor((Player p, Location bloc) -> {
                    p.sendMessage("Trap Location Placed");
                    editing.get(p.getUniqueId()).getTrapLocations().add(bloc);
                    addShulker(bloc, PINK, Material.PISTON_BASE, editing.get(p.getUniqueId()));
Severity: Major
Found in src/main/java/noahnok/dbdl/files/utils/ArenaEditor.java and 6 other locations - About 1 hr to fix
src/main/java/noahnok/dbdl/files/utils/ArenaEditor.java on lines 261..266
src/main/java/noahnok/dbdl/files/utils/ArenaEditor.java on lines 270..275
src/main/java/noahnok/dbdl/files/utils/ArenaEditor.java on lines 279..284
src/main/java/noahnok/dbdl/files/utils/ArenaEditor.java on lines 288..293
src/main/java/noahnok/dbdl/files/utils/ArenaEditor.java on lines 337..342
src/main/java/noahnok/dbdl/files/utils/ArenaEditor.java on lines 355..360

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 68.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 7 locations. Consider refactoring.
Open

        exitArea = new EditorItem(new ItemStack(Material.BARRIER, 1), "&8Exit Area")
                .addExecutor((Player p, Location bloc) -> {
                    p.sendMessage("ExitArea Location Placed");
                    editing.get(p.getUniqueId()).getExitArea().add(bloc);
                    addShulker(bloc, PINK, Material.BARRIER, editing.get(p.getUniqueId()));
Severity: Major
Found in src/main/java/noahnok/dbdl/files/utils/ArenaEditor.java and 6 other locations - About 1 hr to fix
src/main/java/noahnok/dbdl/files/utils/ArenaEditor.java on lines 261..266
src/main/java/noahnok/dbdl/files/utils/ArenaEditor.java on lines 270..275
src/main/java/noahnok/dbdl/files/utils/ArenaEditor.java on lines 279..284
src/main/java/noahnok/dbdl/files/utils/ArenaEditor.java on lines 288..293
src/main/java/noahnok/dbdl/files/utils/ArenaEditor.java on lines 337..342
src/main/java/noahnok/dbdl/files/utils/ArenaEditor.java on lines 346..351

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 68.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 7 locations. Consider refactoring.
Open

        cabinet = new EditorItem(new ItemStack(Material.BOOKSHELF, 1), "&cCabinet")
                .addExecutor((Player p, Location bloc) -> {
                    p.sendMessage("Cabinet Placed");
                    editing.get(p.getUniqueId()).getCabinetLocations().add(bloc);
                    addShulker(bloc, L_RED, Material.BOOKSHELF, editing.get(p.getUniqueId()));
Severity: Major
Found in src/main/java/noahnok/dbdl/files/utils/ArenaEditor.java and 6 other locations - About 1 hr to fix
src/main/java/noahnok/dbdl/files/utils/ArenaEditor.java on lines 261..266
src/main/java/noahnok/dbdl/files/utils/ArenaEditor.java on lines 270..275
src/main/java/noahnok/dbdl/files/utils/ArenaEditor.java on lines 279..284
src/main/java/noahnok/dbdl/files/utils/ArenaEditor.java on lines 337..342
src/main/java/noahnok/dbdl/files/utils/ArenaEditor.java on lines 346..351
src/main/java/noahnok/dbdl/files/utils/ArenaEditor.java on lines 355..360

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 68.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 7 locations. Consider refactoring.
Open

        hook = new EditorItem(new ItemStack(Material.IRON_BLOCK, 1), "&4Hook")
                .addExecutor((Player p, Location bloc) -> {
                    p.sendMessage("Hook placed!");
                    editing.get(p.getUniqueId()).getPossibleHookLocations().add(bloc);
                    addShulker(bloc, RED, Material.IRON_BLOCK, editing.get(p.getUniqueId()));
Severity: Major
Found in src/main/java/noahnok/dbdl/files/utils/ArenaEditor.java and 6 other locations - About 1 hr to fix
src/main/java/noahnok/dbdl/files/utils/ArenaEditor.java on lines 261..266
src/main/java/noahnok/dbdl/files/utils/ArenaEditor.java on lines 279..284
src/main/java/noahnok/dbdl/files/utils/ArenaEditor.java on lines 288..293
src/main/java/noahnok/dbdl/files/utils/ArenaEditor.java on lines 337..342
src/main/java/noahnok/dbdl/files/utils/ArenaEditor.java on lines 346..351
src/main/java/noahnok/dbdl/files/utils/ArenaEditor.java on lines 355..360

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 68.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

    public Countdown(int timeInSeconds, boolean contAlert, int interval, DGame ref, DeadByDaylight main) {
        this.timeInSeconds = timeInSeconds;
        this.contAlert = contAlert;
        this.interval = interval;
        this.ref = ref;
Severity: Minor
Found in src/main/java/noahnok/dbdl/files/game/Countdown.java and 1 other location - About 50 mins to fix
src/main/java/noahnok/dbdl/files/game/InGameCountdown.java on lines 19..25

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 60.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Severity
Category
Status
Source
Language