Skip to content

Оно готово#7

Open
n3sostr3l wants to merge 4 commits intoJouTak:masterfrom
n3sostr3l:master
Open

Оно готово#7
n3sostr3l wants to merge 4 commits intoJouTak:masterfrom
n3sostr3l:master

Conversation

@n3sostr3l
Copy link

И вроде даже работает

	modified:   .gitignore
	modified:   .run/build_release.run.xml
	modified:   .run/build_snapshot.run.xml
	modified:   README.md
	modified:   build.gradle.kts
	modified:   gradle.properties
	modified:   gradle/libs.versions.toml
	modified:   gradle/wrapper/gradle-wrapper.properties
	modified:   gradlew
	modified:   gradlew.bat
	modified:   settings.gradle.kts
	new file:   src/main/java/ru/joutak/someCoolPlugin/Fight.java
	new file:   src/main/java/ru/joutak/someCoolPlugin/MobDeathListener.java
	new file:   src/main/java/ru/joutak/someCoolPlugin/PlayerDeathListener.java
	new file:   src/main/java/ru/joutak/someCoolPlugin/SomeCoolPlugin.java
	new file:   src/main/java/ru/joutak/someCoolPlugin/Wave.java
	new file:   src/main/java/ru/joutak/someCoolPlugin/WaveEnding.java
	deleted:    src/main/java/ru/joutak/template/EmptyPlugin.java
	modified:   src/main/resources/plugin.yml
	modified:   src/test/java/ru/joutak/test/ExampleTest.java
import java.util.*;

public class Fight{
private static ArrayList<Wave> waves = new ArrayList<>();

Choose a reason for hiding this comment

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

Подумай что будет если два игрока выполнят твою команду

public static void clear(){
for(Wave w: waves){
w.clear(w.linkedTo.getWorld());
waves.remove(w);

Choose a reason for hiding this comment

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

что должен делать данный метод?

return false;
}

public static void endWave(){

Choose a reason for hiding this comment

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

а метод тестил?

this.endCallback = endCallback;
this.mobCap = mobCap;
BarStyle style;
switch(segments){

Choose a reason for hiding this comment

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

уверен что тебе нужен такой свитч?

World world = player.getWorld();
Location center = player.getLocation();
final int heightBoundary = 10;
final int attempts = 10;

Choose a reason for hiding this comment

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

забыл использовать

@Override
public boolean onCommand(CommandSender sender, Command command, String label, String[] args){
if(command.getName().equalsIgnoreCase("coolplugin")){
if(args.length < 3) {

Choose a reason for hiding this comment

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

точно тут?

// import Wave;


public final class SomeCoolPlugin extends JavaPlugin {

Choose a reason for hiding this comment

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

Поизучай что такое S в SOLID

Location center = player.getLocation();
final int heightBoundary = 10;
final int attempts = 10;
switch(level){

Choose a reason for hiding this comment

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

представь как приятно будет делать 10 уровней

Choose a reason for hiding this comment

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

Нарушает O в SOLID

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