Skip to content
This repository has been archived by the owner on Mar 20, 2023. It is now read-only.

Commit

Permalink
1.3.0
Browse files Browse the repository at this point in the history
Refactoring
Party
  • Loading branch information
k-egor-smirnov committed Jul 30, 2017
1 parent 00fc8c4 commit 686fe9f
Show file tree
Hide file tree
Showing 18 changed files with 743 additions and 271 deletions.
30 changes: 23 additions & 7 deletions bin/plugin.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,35 @@
name: Detour
version: 1.2.6
version: 1.3.0
author: AlphaCH1337
main: ru.alphach1337.detour.Main
main: ru.alphach1337.detour.Detour
commands:
detour:
start:
description: Начинает обход
usage: /start
permission: detour.manage
usage: /detour start
stop:
description: Заканчивает обход
usage: /stop
permission: detour.manage
usage: /detour stop
join:
description: Присоединиться к обходу
usage: /join
permission: detour.join
usage: /detour join
next:
descrption: Следующий игрок
usage: /next
usage: /detour [start, stop, join, next]
permission: detour.manage
usage: /detour next
usage: /detour [start, stop, join, next]
permissions:
detour.*:
description: Дает доступ ко всем командам обхода
children:
detour.manage: true
detour.join: true
detour.manage:
description: Дает доступ к управлению (начать/остановить/переход) обходом
default: false
detour.join:
description: Дает доступ к присоединению к обходу
default: true
30 changes: 23 additions & 7 deletions src/plugin.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,35 @@
name: Detour
version: 1.2.6
version: 1.3.0
author: AlphaCH1337
main: ru.alphach1337.detour.Main
main: ru.alphach1337.detour.Detour
commands:
detour:
start:
description: Начинает обход
usage: /start
permission: detour.manage
usage: /detour start
stop:
description: Заканчивает обход
usage: /stop
permission: detour.manage
usage: /detour stop
join:
description: Присоединиться к обходу
usage: /join
permission: detour.join
usage: /detour join
next:
descrption: Следующий игрок
usage: /next
usage: /detour [start, stop, join, next]
permission: detour.manage
usage: /detour next
usage: /detour [start, stop, join, next]
permissions:
detour.*:
description: Дает доступ ко всем командам обхода
children:
detour.manage: true
detour.join: true
detour.manage:
description: Дает доступ к управлению (начать/остановить/переход) обходом
default: false
detour.join:
description: Дает доступ к присоединению к обходу
default: true
55 changes: 55 additions & 0 deletions src/ru/alphach1337/detour/Detour.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
package ru.alphach1337.detour;

import com.connorlinfoot.actionbarapi.ActionBarAPI;
import org.bukkit.*;
import org.bukkit.Material;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.craftbukkit.libs.jline.internal.Log;
import org.bukkit.entity.*;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.block.Action;
import org.bukkit.event.player.PlayerInteractEvent;
import org.bukkit.event.player.PlayerJoinEvent;
import org.bukkit.event.player.PlayerQuitEvent;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.meta.ItemMeta;
import org.bukkit.plugin.java.JavaPlugin;
import ru.alphach1337.detour.commands.*;
import ru.alphach1337.detour.events.EventListener;

import java.util.ArrayList;
import java.util.HashMap;


public class Detour extends JavaPlugin implements Listener {
private ArrayList<Player> party = new ArrayList<>();

private boolean isDetour = false;

@Override
public void onEnable() {
getServer().getPluginManager().registerEvents(new EventListener(), this);

this.getConfig().addDefault("allowOffline", false);
this.getConfig().addDefault("hoursToAllowDetour", 12);
this.getConfig().options().copyDefaults(true);
saveConfig();

CommandHandler cw = new CommandHandler("detour");
cw.commands.add(new Join());
cw.commands.add(new Start());
cw.commands.add(new Stop());
cw.commands.add(new Next());
cw.commands.add(new Party());
cw.commands.add(new Stick());
this.getCommand("detour").setExecutor(cw);
}

@Override
public void onDisable() {

}
}
Loading

0 comments on commit 686fe9f

Please sign in to comment.