parent
fc862a670e
commit
30122d23d8
44 changed files with 1437 additions and 1558 deletions
|
@ -1,39 +1,38 @@
|
||||||
package alisolarflare.components.flairdoor.commands;
|
package alisolarflare.components.flairdoor;
|
||||||
|
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
|
|
||||||
import alisolarflare.components.flairdoor.listeners.PortalListener;
|
import buttondevteam.lib.chat.TBMCCommandBase;
|
||||||
import buttondevteam.lib.chat.TBMCCommandBase;
|
|
||||||
|
public class Command_FlairMe extends TBMCCommandBase {
|
||||||
public class FlairMe extends TBMCCommandBase {
|
|
||||||
|
@Override
|
||||||
@Override
|
public boolean OnCommand(CommandSender sender, String label, String[] args) {
|
||||||
public boolean OnCommand(CommandSender sender, String label, String[] args) {
|
Listener_Portal.playersToBeFlaired.add(sender.getName());
|
||||||
PortalListener.playersToBeFlaired.add(sender.getName());
|
sender.sendMessage("Setup Successful! Walk through a portal to get your flair");
|
||||||
sender.sendMessage("Setup Successful! Walk through a portal to get your flair");
|
|
||||||
|
return false;
|
||||||
return false;
|
}
|
||||||
}
|
|
||||||
|
@Override
|
||||||
@Override
|
public String[] GetHelpText(String alias) {
|
||||||
public String[] GetHelpText(String alias) {
|
// TODO Auto-generated method stub
|
||||||
// TODO Auto-generated method stub
|
return new String[] { "" };
|
||||||
return new String[] { "" };
|
}
|
||||||
}
|
|
||||||
|
@Override
|
||||||
@Override
|
public String GetCommandPath() {
|
||||||
public String GetCommandPath() {
|
return "flairme";
|
||||||
return "flairme";
|
}
|
||||||
}
|
|
||||||
|
@Override
|
||||||
@Override
|
public boolean GetPlayerOnly() {
|
||||||
public boolean GetPlayerOnly() {
|
return true;
|
||||||
return true;
|
}
|
||||||
}
|
|
||||||
|
@Override
|
||||||
@Override
|
public boolean GetModOnly() {
|
||||||
public boolean GetModOnly() {
|
return false;
|
||||||
return false;
|
}
|
||||||
}
|
|
||||||
|
}
|
||||||
}
|
|
|
@ -1,15 +0,0 @@
|
||||||
package alisolarflare.components.flairdoor;
|
|
||||||
|
|
||||||
import org.bukkit.plugin.java.JavaPlugin;
|
|
||||||
|
|
||||||
import alisolarflare.Module;
|
|
||||||
import alisolarflare.components.flairdoor.commands.FlairMe;
|
|
||||||
import alisolarflare.components.flairdoor.listeners.PortalListener;
|
|
||||||
|
|
||||||
public class FlairDoorModule extends Module {
|
|
||||||
@Override
|
|
||||||
public void register(JavaPlugin plugin) {
|
|
||||||
registerCommand(plugin, new FlairMe());
|
|
||||||
registerListener(plugin, new PortalListener(plugin));
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,138 +1,138 @@
|
||||||
package alisolarflare.components.flairdoor.listeners;
|
package alisolarflare.components.flairdoor;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.DyeColor;
|
import org.bukkit.DyeColor;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.block.Block;
|
import org.bukkit.block.Block;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.event.EventHandler;
|
import org.bukkit.event.EventHandler;
|
||||||
import org.bukkit.event.Listener;
|
import org.bukkit.event.Listener;
|
||||||
import org.bukkit.event.player.PlayerPortalEvent;
|
import org.bukkit.event.player.PlayerPortalEvent;
|
||||||
import org.bukkit.material.MaterialData;
|
import org.bukkit.material.MaterialData;
|
||||||
import org.bukkit.material.Wool;
|
import org.bukkit.material.Wool;
|
||||||
import org.bukkit.plugin.java.JavaPlugin;
|
import org.bukkit.plugin.java.JavaPlugin;
|
||||||
|
|
||||||
import com.earth2me.essentials.Essentials;
|
import com.earth2me.essentials.Essentials;
|
||||||
import com.earth2me.essentials.User;
|
import com.earth2me.essentials.User;
|
||||||
|
|
||||||
public class PortalListener implements Listener{
|
public class Listener_Portal implements Listener{
|
||||||
public static List<String> playersToBeFlaired = new ArrayList<String>();
|
public static List<String> playersToBeFlaired = new ArrayList<String>();
|
||||||
public JavaPlugin plugin;
|
public JavaPlugin plugin;
|
||||||
|
|
||||||
Essentials essentials;
|
Essentials essentials;
|
||||||
|
|
||||||
public PortalListener(JavaPlugin plugin) {
|
public Listener_Portal(JavaPlugin plugin) {
|
||||||
this.plugin = plugin;
|
this.plugin = plugin;
|
||||||
this.essentials = ((Essentials) Bukkit.getPluginManager().getPlugin("Essentials"));
|
this.essentials = ((Essentials) Bukkit.getPluginManager().getPlugin("Essentials"));
|
||||||
}
|
}
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void onPortalEnter(PlayerPortalEvent event){
|
public void onPortalEnter(PlayerPortalEvent event){
|
||||||
//SANITATION - Player
|
//SANITATION - Player
|
||||||
if(!(event.getPlayer() instanceof Player)){
|
if(!(event.getPlayer() instanceof Player)){
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
//INIT - Player
|
//INIT - Player
|
||||||
Player player = event.getPlayer();
|
Player player = event.getPlayer();
|
||||||
|
|
||||||
//SANITATION - PlayersToBeFlaired
|
//SANITATION - PlayersToBeFlaired
|
||||||
if(!(playersToBeFlaired.contains(player.getName()))){
|
if(!(playersToBeFlaired.contains(player.getName()))){
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
player.sendMessage("-MAY THE FLAIRING COMMENCE-");
|
player.sendMessage("-MAY THE FLAIRING COMMENCE-");
|
||||||
event.setTo(player.getLocation());
|
event.setTo(player.getLocation());
|
||||||
|
|
||||||
//INIT - x,y,z
|
//INIT - x,y,z
|
||||||
int x = player.getLocation().getBlockX();
|
int x = player.getLocation().getBlockX();
|
||||||
int y = player.getLocation().getBlockY();
|
int y = player.getLocation().getBlockY();
|
||||||
int z = player.getLocation().getBlockZ();
|
int z = player.getLocation().getBlockZ();
|
||||||
|
|
||||||
//INIT - Blocks Under Portal
|
//INIT - Blocks Under Portal
|
||||||
Block HigherBlock = player.getWorld().getBlockAt(x,y-2,z);
|
Block HigherBlock = player.getWorld().getBlockAt(x,y-2,z);
|
||||||
Block MiddleBlock = player.getWorld().getBlockAt(x,y-3,z);
|
Block MiddleBlock = player.getWorld().getBlockAt(x,y-3,z);
|
||||||
Block BottomBlock = player.getWorld().getBlockAt(x,y-4,z);
|
Block BottomBlock = player.getWorld().getBlockAt(x,y-4,z);
|
||||||
|
|
||||||
//RECOLOUR PLAYER
|
//RECOLOUR PLAYER
|
||||||
if(HigherBlock.getType() == Material.STONE){
|
if(HigherBlock.getType() == Material.STONE){
|
||||||
recolourPlayer(player, DyeColor.GRAY);
|
recolourPlayer(player, DyeColor.GRAY);
|
||||||
|
|
||||||
//TOP BLOCK IS WOOL?
|
//TOP BLOCK IS WOOL?
|
||||||
}else if(HigherBlock.getType() == Material.WOOL){
|
}else if(HigherBlock.getType() == Material.WOOL){
|
||||||
Wool wool = (Wool) HigherBlock.getState().getData();
|
Wool wool = (Wool) HigherBlock.getState().getData();
|
||||||
recolourPlayer(player, wool.getColor());
|
recolourPlayer(player, wool.getColor());
|
||||||
|
|
||||||
//MIDDLE BLOCK IS WOOL?
|
//MIDDLE BLOCK IS WOOL?
|
||||||
}else if(MiddleBlock.getType() == Material.WOOL){
|
}else if(MiddleBlock.getType() == Material.WOOL){
|
||||||
MaterialData mData = MiddleBlock.getState().getData();
|
MaterialData mData = MiddleBlock.getState().getData();
|
||||||
Wool wool = (Wool) mData;
|
Wool wool = (Wool) mData;
|
||||||
|
|
||||||
recolourPlayer(player, wool.getColor());
|
recolourPlayer(player, wool.getColor());
|
||||||
|
|
||||||
//BOTTOM BLOCK IS WOOL?
|
//BOTTOM BLOCK IS WOOL?
|
||||||
}else if (BottomBlock.getType() == Material.WOOL){
|
}else if (BottomBlock.getType() == Material.WOOL){
|
||||||
Wool wool = (Wool) BottomBlock.getState().getData();
|
Wool wool = (Wool) BottomBlock.getState().getData();
|
||||||
recolourPlayer(player, wool.getColor());
|
recolourPlayer(player, wool.getColor());
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
public void recolourPlayer(Player player, DyeColor dyecolour){
|
public void recolourPlayer(Player player, DyeColor dyecolour){
|
||||||
User user = essentials.getUser(player);
|
User user = essentials.getUser(player);
|
||||||
|
|
||||||
String name = user._getNickname();
|
String name = user._getNickname();
|
||||||
String tempName = "";
|
String tempName = "";
|
||||||
for(int i = 0; i < name.length(); i++){
|
for(int i = 0; i < name.length(); i++){
|
||||||
if (name.charAt(i) != '§'){
|
if (name.charAt(i) != '§'){
|
||||||
tempName += name.charAt(i);
|
tempName += name.charAt(i);
|
||||||
}else{
|
}else{
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
name = tempName;
|
name = tempName;
|
||||||
|
|
||||||
switch(dyecolour){
|
switch(dyecolour){
|
||||||
case GRAY:
|
case GRAY:
|
||||||
player.sendMessage("Adding §7GRAY!§f");
|
player.sendMessage("Adding §7GRAY!§f");
|
||||||
name = "§7" + name;
|
name = "§7" + name;
|
||||||
break;
|
break;
|
||||||
case RED:
|
case RED:
|
||||||
player.sendMessage("Adding §4RED!§f");
|
player.sendMessage("Adding §4RED!§f");
|
||||||
name = "§4" + name;
|
name = "§4" + name;
|
||||||
break;
|
break;
|
||||||
case ORANGE:
|
case ORANGE:
|
||||||
player.sendMessage("Adding §6ORANGE!§f");
|
player.sendMessage("Adding §6ORANGE!§f");
|
||||||
name = "§6" + name;
|
name = "§6" + name;
|
||||||
break;
|
break;
|
||||||
case YELLOW:
|
case YELLOW:
|
||||||
player.sendMessage("Adding §eYELLOW!§f");
|
player.sendMessage("Adding §eYELLOW!§f");
|
||||||
name = "§e" + name;
|
name = "§e" + name;
|
||||||
break;
|
break;
|
||||||
case LIME:
|
case LIME:
|
||||||
case GREEN:
|
case GREEN:
|
||||||
player.sendMessage("Adding §aGREEN!§f");
|
player.sendMessage("Adding §aGREEN!§f");
|
||||||
name = "§a" + name;
|
name = "§a" + name;
|
||||||
break;
|
break;
|
||||||
case CYAN:
|
case CYAN:
|
||||||
case LIGHT_BLUE:
|
case LIGHT_BLUE:
|
||||||
case BLUE:
|
case BLUE:
|
||||||
player.sendMessage("Adding §9BLUE!§f");
|
player.sendMessage("Adding §9BLUE!§f");
|
||||||
name = "§9" + name;
|
name = "§9" + name;
|
||||||
break;
|
break;
|
||||||
case PURPLE:
|
case PURPLE:
|
||||||
player.sendMessage("Adding §5PURPLE!§f");
|
player.sendMessage("Adding §5PURPLE!§f");
|
||||||
name = "§5" + name;
|
name = "§5" + name;
|
||||||
break;
|
break;
|
||||||
case WHITE:
|
case WHITE:
|
||||||
player.sendMessage("Adding §fWHITE!§f");
|
player.sendMessage("Adding §fWHITE!§f");
|
||||||
name = "§f" + name;
|
name = "§f" + name;
|
||||||
default:
|
default:
|
||||||
player.sendMessage("ERROR, PORTAL HAS INVALID UNDER-BLOCK");
|
player.sendMessage("ERROR, PORTAL HAS INVALID UNDER-BLOCK");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
user.setNickname(name);
|
user.setNickname(name);
|
||||||
player.sendMessage("Your name is now: " + user.getNickname() +"!");
|
player.sendMessage("Your name is now: " + user.getNickname() +"!");
|
||||||
playersToBeFlaired.remove(player.getName());
|
playersToBeFlaired.remove(player.getName());
|
||||||
}
|
}
|
||||||
}
|
}
|
13
src/alisolarflare/components/flairdoor/Module_FlairDoor.java
Normal file
13
src/alisolarflare/components/flairdoor/Module_FlairDoor.java
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
package alisolarflare.components.flairdoor;
|
||||||
|
|
||||||
|
import org.bukkit.plugin.java.JavaPlugin;
|
||||||
|
|
||||||
|
import alisolarflare.Module;
|
||||||
|
|
||||||
|
public class Module_FlairDoor extends Module {
|
||||||
|
@Override
|
||||||
|
public void register(JavaPlugin plugin) {
|
||||||
|
registerCommand(plugin, new Command_FlairMe());
|
||||||
|
registerListener(plugin, new Listener_Portal(plugin));
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,76 +1,75 @@
|
||||||
package alisolarflare.components.gpowers.commands;
|
package alisolarflare.components.gpowers;
|
||||||
|
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
import alisolarflare.components.gpowers.GPowerMemory;
|
import buttondevteam.lib.chat.TBMCCommandBase;
|
||||||
import buttondevteam.lib.chat.TBMCCommandBase;
|
|
||||||
|
public class Command_GPower extends TBMCCommandBase {
|
||||||
public class GPower extends TBMCCommandBase {
|
|
||||||
|
private Memory_GPower gPowerMemory;
|
||||||
private GPowerMemory gPowerMemory;
|
|
||||||
|
public Command_GPower(Memory_GPower gPowerMemory) {
|
||||||
public GPower(GPowerMemory gPowerMemory) {
|
this.gPowerMemory = gPowerMemory;
|
||||||
this.gPowerMemory = gPowerMemory;
|
}
|
||||||
}
|
|
||||||
|
@Override
|
||||||
@Override
|
public boolean OnCommand(CommandSender sender, String label, String[] args) {
|
||||||
public boolean OnCommand(CommandSender sender, String label, String[] args) {
|
sender.sendMessage("G power activate!");
|
||||||
sender.sendMessage("G power activate!");
|
if (!(sender instanceof Player)){
|
||||||
if (!(sender instanceof Player)){
|
sender.sendMessage("You must be a player to use this command! Talk to a dev/ali if you think this is wrong");
|
||||||
sender.sendMessage("You must be a player to use this command! Talk to a dev/ali if you think this is wrong");
|
}
|
||||||
}
|
Player player = (Player) sender;
|
||||||
Player player = (Player) sender;
|
if (args.length < 2) {
|
||||||
if (args.length < 2) {
|
player.sendMessage("Proper Usage to test G-Powers:");
|
||||||
player.sendMessage("Proper Usage to test G-Powers:");
|
player.sendMessage("/gpowertest [colour=red,orange,yellow,green,blue,purple] [active=true/false]");
|
||||||
player.sendMessage("/gpowertest [colour=red,orange,yellow,green,blue,purple] [active=true/false]");
|
return false;
|
||||||
return false;
|
}
|
||||||
}
|
String colour;
|
||||||
String colour;
|
if (args[0].startsWith("r") || args[0].startsWith("o") || args[0].startsWith("y") || args[0].startsWith("g")
|
||||||
if (args[0].startsWith("r") || args[0].startsWith("o") || args[0].startsWith("y") || args[0].startsWith("g")
|
|| args[0].startsWith("b") || args[0].startsWith("p")) {
|
||||||
|| args[0].startsWith("b") || args[0].startsWith("p")) {
|
colour = args[0];
|
||||||
colour = args[0];
|
} else {
|
||||||
} else {
|
player.sendMessage("error: colour. Proper Usage to configure G-Powers:");
|
||||||
player.sendMessage("error: colour. Proper Usage to configure G-Powers:");
|
player.sendMessage("/gpowertest [colour=red,orange,yellow,green,blue,purple,grey] [active=true/false]");
|
||||||
player.sendMessage("/gpowertest [colour=red,orange,yellow,green,blue,purple,grey] [active=true/false]");
|
return false;
|
||||||
return false;
|
}
|
||||||
}
|
boolean isActive;
|
||||||
boolean isActive;
|
if (args[1].startsWith("t")) {
|
||||||
if (args[1].startsWith("t")) {
|
isActive = true;
|
||||||
isActive = true;
|
} else if (args[1].startsWith("f")) {
|
||||||
} else if (args[1].startsWith("f")) {
|
isActive = false;
|
||||||
isActive = false;
|
} else {
|
||||||
} else {
|
player.sendMessage("error: active. Proper Usage to configure G-Powers:");
|
||||||
player.sendMessage("error: active. Proper Usage to configure G-Powers:");
|
player.sendMessage("/gpowertest [colour=red,orange,yellow,green,blue,purple] [active=true/false]");
|
||||||
player.sendMessage("/gpowertest [colour=red,orange,yellow,green,blue,purple] [active=true/false]");
|
return false;
|
||||||
return false;
|
}
|
||||||
}
|
player.sendMessage("Terms Vaild!");
|
||||||
player.sendMessage("Terms Vaild!");
|
player.sendMessage("Saving Data: "+ player.getName() + "|" + colour + "|" + isActive);
|
||||||
player.sendMessage("Saving Data: "+ player.getName() + "|" + colour + "|" + isActive);
|
gPowerMemory.configurePlayer(player, colour, isActive);
|
||||||
gPowerMemory.configurePlayer(player, colour, isActive);
|
|
||||||
|
return false;
|
||||||
return false;
|
}
|
||||||
}
|
|
||||||
|
@Override
|
||||||
@Override
|
public String[] GetHelpText(String alias) {
|
||||||
public String[] GetHelpText(String alias) {
|
// TODO Auto-generated method stub
|
||||||
// TODO Auto-generated method stub
|
return new String[] { "" };
|
||||||
return new String[] { "" };
|
}
|
||||||
}
|
|
||||||
|
@Override
|
||||||
@Override
|
public String GetCommandPath() {
|
||||||
public String GetCommandPath() {
|
return "gpower";
|
||||||
return "gpower";
|
}
|
||||||
}
|
|
||||||
|
@Override
|
||||||
@Override
|
public boolean GetPlayerOnly() {
|
||||||
public boolean GetPlayerOnly() {
|
return true;
|
||||||
return true;
|
}
|
||||||
}
|
|
||||||
|
@Override
|
||||||
@Override
|
public boolean GetModOnly() {
|
||||||
public boolean GetModOnly() {
|
return false;
|
||||||
return false;
|
}
|
||||||
}
|
|
||||||
|
}
|
||||||
}
|
|
|
@ -1,49 +1,48 @@
|
||||||
package alisolarflare.components.gpowers.commands;
|
package alisolarflare.components.gpowers;
|
||||||
|
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
import alisolarflare.components.gpowers.GPowerMemory;
|
import buttondevteam.lib.chat.TBMCCommandBase;
|
||||||
import buttondevteam.lib.chat.TBMCCommandBase;
|
|
||||||
|
public class Command_PowerDown extends TBMCCommandBase {
|
||||||
public class PowerDown extends TBMCCommandBase {
|
|
||||||
|
private Memory_GPower gPowerMemory;
|
||||||
private GPowerMemory gPowerMemory;
|
|
||||||
|
public Command_PowerDown(Memory_GPower gPowerMemory) {
|
||||||
public PowerDown(GPowerMemory gPowerMemory) {
|
this.gPowerMemory = gPowerMemory;
|
||||||
this.gPowerMemory = gPowerMemory;
|
}
|
||||||
}
|
|
||||||
|
@Override
|
||||||
@Override
|
public boolean OnCommand(CommandSender sender, String label, String[] args) {
|
||||||
public boolean OnCommand(CommandSender sender, String label, String[] args) {
|
if (!(sender instanceof Player))
|
||||||
if (!(sender instanceof Player))
|
sender.sendMessage("You must be a player to use this command! Contact dev/ali if you think this is wrong");
|
||||||
sender.sendMessage("You must be a player to use this command! Contact dev/ali if you think this is wrong");
|
Player player = (Player) sender;
|
||||||
Player player = (Player) sender;
|
gPowerMemory.PowerDownPlayer(player);
|
||||||
gPowerMemory.PowerDownPlayer(player);
|
return false;
|
||||||
return false;
|
}
|
||||||
}
|
|
||||||
|
@Override
|
||||||
@Override
|
public String[] GetHelpText(String alias) {
|
||||||
public String[] GetHelpText(String alias) {
|
// TODO Auto-generated method stub
|
||||||
// TODO Auto-generated method stub
|
return null;
|
||||||
return null;
|
}
|
||||||
}
|
|
||||||
|
@Override
|
||||||
@Override
|
public String GetCommandPath() {
|
||||||
public String GetCommandPath() {
|
return "powerdown";
|
||||||
return "powerdown";
|
}
|
||||||
}
|
|
||||||
|
@Override
|
||||||
@Override
|
public boolean GetPlayerOnly() {
|
||||||
public boolean GetPlayerOnly() {
|
// TODO Auto-generated method stub
|
||||||
// TODO Auto-generated method stub
|
return false;
|
||||||
return false;
|
}
|
||||||
}
|
|
||||||
|
@Override
|
||||||
@Override
|
public boolean GetModOnly() {
|
||||||
public boolean GetModOnly() {
|
// TODO Auto-generated method stub
|
||||||
// TODO Auto-generated method stub
|
return false;
|
||||||
return false;
|
}
|
||||||
}
|
|
||||||
|
}
|
||||||
}
|
|
|
@ -1,49 +1,48 @@
|
||||||
package alisolarflare.components.gpowers.commands;
|
package alisolarflare.components.gpowers;
|
||||||
|
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
import alisolarflare.components.gpowers.GPowerMemory;
|
import buttondevteam.lib.chat.TBMCCommandBase;
|
||||||
import buttondevteam.lib.chat.TBMCCommandBase;
|
|
||||||
|
public class Command_PowerUp extends TBMCCommandBase {
|
||||||
public class PowerUp extends TBMCCommandBase {
|
|
||||||
|
private Memory_GPower gPowerMemory;
|
||||||
private GPowerMemory gPowerMemory;
|
|
||||||
|
public Command_PowerUp(Memory_GPower gPowerMemory) {
|
||||||
public PowerUp(GPowerMemory gPowerMemory) {
|
this.gPowerMemory = gPowerMemory;
|
||||||
this.gPowerMemory = gPowerMemory;
|
}
|
||||||
}
|
|
||||||
|
@Override
|
||||||
@Override
|
public boolean OnCommand(CommandSender sender, String label, String[] args) {
|
||||||
public boolean OnCommand(CommandSender sender, String label, String[] args) {
|
if (!(sender instanceof Player))
|
||||||
if (!(sender instanceof Player))
|
sender.sendMessage("You must be a player to use this command! Contact a dev/ali if you think this is wrong");
|
||||||
sender.sendMessage("You must be a player to use this command! Contact a dev/ali if you think this is wrong");
|
|
||||||
|
Player player = (Player) sender;
|
||||||
Player player = (Player) sender;
|
gPowerMemory.PowerUpPlayer(player);
|
||||||
gPowerMemory.PowerUpPlayer(player);
|
return false;
|
||||||
return false;
|
}
|
||||||
}
|
|
||||||
|
@Override
|
||||||
@Override
|
public String[] GetHelpText(String alias) {
|
||||||
public String[] GetHelpText(String alias) {
|
// TODO Auto-generated method stub
|
||||||
// TODO Auto-generated method stub
|
return null;
|
||||||
return null;
|
}
|
||||||
}
|
|
||||||
|
@Override
|
||||||
@Override
|
public String GetCommandPath() {
|
||||||
public String GetCommandPath() {
|
return "powerup";
|
||||||
return "powerup";
|
}
|
||||||
}
|
|
||||||
|
@Override
|
||||||
@Override
|
public boolean GetPlayerOnly() {
|
||||||
public boolean GetPlayerOnly() {
|
return true;
|
||||||
return true;
|
}
|
||||||
}
|
|
||||||
|
@Override
|
||||||
@Override
|
public boolean GetModOnly() {
|
||||||
public boolean GetModOnly() {
|
// TODO Auto-generated method stub
|
||||||
// TODO Auto-generated method stub
|
return false;
|
||||||
return false;
|
}
|
||||||
}
|
|
||||||
|
}
|
||||||
}
|
|
|
@ -1,23 +0,0 @@
|
||||||
package alisolarflare.components.gpowers;
|
|
||||||
|
|
||||||
import org.bukkit.plugin.java.JavaPlugin;
|
|
||||||
|
|
||||||
import alisolarflare.Module;
|
|
||||||
import alisolarflare.components.gpowers.commands.GPower;
|
|
||||||
import alisolarflare.components.gpowers.commands.PowerDown;
|
|
||||||
import alisolarflare.components.gpowers.commands.PowerUp;
|
|
||||||
import alisolarflare.components.gpowers.listeners.gPowerListener;
|
|
||||||
|
|
||||||
public class GPowerModule extends Module {
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void register(JavaPlugin plugin) {
|
|
||||||
GPowerMemory gPowerMemory = new GPowerMemory();
|
|
||||||
registerCommand(plugin, new GPower(gPowerMemory));
|
|
||||||
registerCommand(plugin, new PowerUp(gPowerMemory));
|
|
||||||
registerCommand(plugin, new PowerDown(gPowerMemory));
|
|
||||||
|
|
||||||
registerListener(plugin, new gPowerListener(plugin, gPowerMemory));
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
|
@ -0,0 +1,11 @@
|
||||||
|
package alisolarflare.components.gpowers;
|
||||||
|
|
||||||
|
import org.bukkit.event.Listener;
|
||||||
|
import org.bukkit.plugin.java.JavaPlugin;
|
||||||
|
|
||||||
|
public class Listener_PowerLooper implements Listener{
|
||||||
|
|
||||||
|
public Listener_PowerLooper(JavaPlugin plugin, Memory_GPower gPowerMemory){
|
||||||
|
new Task_PowerApplier(plugin.getServer(), gPowerMemory.poweredPlayerList).runTaskTimer(plugin, 190, 190);
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,52 +1,52 @@
|
||||||
package alisolarflare.components.gpowers;
|
package alisolarflare.components.gpowers;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
public class GPowerMemory{
|
public class Memory_GPower{
|
||||||
public Map<UUID, poweredPlayer> poweredPlayerList = new HashMap<UUID, poweredPlayer>();
|
public Map<UUID, poweredPlayer> poweredPlayerList = new HashMap<UUID, poweredPlayer>();
|
||||||
|
|
||||||
public void configurePlayer(Player player, String colour, boolean powerIsActive){
|
public void configurePlayer(Player player, String colour, boolean powerIsActive){
|
||||||
poweredPlayerList.put(player.getUniqueId(), new poweredPlayer(player.getUniqueId(), colour, true));
|
poweredPlayerList.put(player.getUniqueId(), new poweredPlayer(player.getUniqueId(), colour, true));
|
||||||
}
|
}
|
||||||
public void PowerUpPlayer(Player player){
|
public void PowerUpPlayer(Player player){
|
||||||
player.sendMessage("Powering up!");
|
player.sendMessage("Powering up!");
|
||||||
if(poweredPlayerList.containsKey(player.getUniqueId())){
|
if(poweredPlayerList.containsKey(player.getUniqueId())){
|
||||||
poweredPlayerList.get(player.getUniqueId()).isPowersActive = true;
|
poweredPlayerList.get(player.getUniqueId()).isPowersActive = true;
|
||||||
player.sendMessage("Powered up!");
|
player.sendMessage("Powered up!");
|
||||||
}else{
|
}else{
|
||||||
player.sendMessage("You must instantiate your power settings using /GPower");
|
player.sendMessage("You must instantiate your power settings using /GPower");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void PowerDownPlayer(Player player){
|
public void PowerDownPlayer(Player player){
|
||||||
player.sendMessage("Powering down!");
|
player.sendMessage("Powering down!");
|
||||||
if (poweredPlayerList.containsKey(player.getUniqueId())){
|
if (poweredPlayerList.containsKey(player.getUniqueId())){
|
||||||
player.sendMessage("Powered down!");
|
player.sendMessage("Powered down!");
|
||||||
poweredPlayerList.get(player.getUniqueId()).isPowersActive = false;
|
poweredPlayerList.get(player.getUniqueId()).isPowersActive = false;
|
||||||
}else{
|
}else{
|
||||||
player.sendMessage("P down!");
|
player.sendMessage("P down!");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public class poweredPlayer{
|
public class poweredPlayer{
|
||||||
public UUID uuid;
|
public UUID uuid;
|
||||||
public String colour;
|
public String colour;
|
||||||
public Boolean isPowersActive;
|
public Boolean isPowersActive;
|
||||||
|
|
||||||
public poweredPlayer(UUID uuid, String colour, Boolean activated){
|
public poweredPlayer(UUID uuid, String colour, Boolean activated){
|
||||||
this.uuid = (uuid);
|
this.uuid = (uuid);
|
||||||
this.colour = (colour);
|
this.colour = (colour);
|
||||||
this.isPowersActive = (activated);
|
this.isPowersActive = (activated);
|
||||||
}
|
}
|
||||||
public String toString(){
|
public String toString(){
|
||||||
return "[UUID: "+ uuid.toString() + ", Colour: "+ colour+", IsActivated: "+isPowersActive + "]";
|
return "[UUID: "+ uuid.toString() + ", Colour: "+ colour+", IsActivated: "+isPowersActive + "]";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
19
src/alisolarflare/components/gpowers/Module_GPower.java
Normal file
19
src/alisolarflare/components/gpowers/Module_GPower.java
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
package alisolarflare.components.gpowers;
|
||||||
|
|
||||||
|
import org.bukkit.plugin.java.JavaPlugin;
|
||||||
|
|
||||||
|
import alisolarflare.Module;
|
||||||
|
|
||||||
|
public class Module_GPower extends Module {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void register(JavaPlugin plugin) {
|
||||||
|
Memory_GPower gPowerMemory = new Memory_GPower();
|
||||||
|
registerCommand(plugin, new Command_GPower(gPowerMemory));
|
||||||
|
registerCommand(plugin, new Command_PowerUp(gPowerMemory));
|
||||||
|
registerCommand(plugin, new Command_PowerDown(gPowerMemory));
|
||||||
|
|
||||||
|
registerListener(plugin, new Listener_PowerLooper(plugin, gPowerMemory));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -1,66 +1,66 @@
|
||||||
package alisolarflare.components.gpowers.listeners;
|
package alisolarflare.components.gpowers;
|
||||||
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
import org.bukkit.Color;
|
import org.bukkit.Color;
|
||||||
import org.bukkit.Server;
|
import org.bukkit.Server;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.potion.PotionEffect;
|
import org.bukkit.potion.PotionEffect;
|
||||||
import org.bukkit.potion.PotionEffectType;
|
import org.bukkit.potion.PotionEffectType;
|
||||||
import org.bukkit.scheduler.BukkitRunnable;
|
import org.bukkit.scheduler.BukkitRunnable;
|
||||||
|
|
||||||
import alisolarflare.components.gpowers.GPowerMemory.poweredPlayer;
|
import alisolarflare.components.gpowers.Memory_GPower.poweredPlayer;
|
||||||
|
|
||||||
public class gPowerApplyingTask extends BukkitRunnable{
|
public class Task_PowerApplier extends BukkitRunnable{
|
||||||
|
|
||||||
private Server server;
|
private Server server;
|
||||||
private Map<UUID, poweredPlayer> poweredPlayerList;
|
private Map<UUID, poweredPlayer> poweredPlayerList;
|
||||||
|
|
||||||
public gPowerApplyingTask(Server server, Map<UUID, poweredPlayer> poweredPlayerList) {
|
public Task_PowerApplier(Server server, Map<UUID, poweredPlayer> poweredPlayerList) {
|
||||||
this.server = server;
|
this.server = server;
|
||||||
this.poweredPlayerList = poweredPlayerList;
|
this.poweredPlayerList = poweredPlayerList;
|
||||||
}
|
}
|
||||||
|
|
||||||
//REPEATS EVERY 5 SECONDS
|
//REPEATS EVERY 5 SECONDS
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
for (Player player : server.getOnlinePlayers()){
|
for (Player player : server.getOnlinePlayers()){
|
||||||
if(poweredPlayerList.containsKey(player.getUniqueId())){
|
if(poweredPlayerList.containsKey(player.getUniqueId())){
|
||||||
activatePower(player, poweredPlayerList.get(player.getUniqueId()).colour);
|
activatePower(player, poweredPlayerList.get(player.getUniqueId()).colour);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void activatePower(Player player, String colour) {
|
private void activatePower(Player player, String colour) {
|
||||||
//GREY
|
//GREY
|
||||||
if ((colour.startsWith("grey") || colour.startsWith("gra")) && (player.getWorld().getTime() > 12575 && player.getWorld().getTime() < 22925)){
|
if ((colour.startsWith("grey") || colour.startsWith("gra")) && (player.getWorld().getTime() > 12575 && player.getWorld().getTime() < 22925)){
|
||||||
player.addPotionEffect(new PotionEffect(PotionEffectType.REGENERATION, 200, 0, true, false, Color.GRAY));
|
player.addPotionEffect(new PotionEffect(PotionEffectType.REGENERATION, 200, 0, true, false, Color.GRAY));
|
||||||
player.addPotionEffect(new PotionEffect(PotionEffectType.NIGHT_VISION, 300, 0, true, false, Color.GRAY));
|
player.addPotionEffect(new PotionEffect(PotionEffectType.NIGHT_VISION, 300, 0, true, false, Color.GRAY));
|
||||||
//RED
|
//RED
|
||||||
}else if (colour.startsWith("r")){
|
}else if (colour.startsWith("r")){
|
||||||
player.addPotionEffect(new PotionEffect(PotionEffectType.INCREASE_DAMAGE, 200, 0, true, false, Color.RED));
|
player.addPotionEffect(new PotionEffect(PotionEffectType.INCREASE_DAMAGE, 200, 0, true, false, Color.RED));
|
||||||
//ORANGE
|
//ORANGE
|
||||||
}else if (colour.startsWith("o")){
|
}else if (colour.startsWith("o")){
|
||||||
player.addPotionEffect(new PotionEffect(PotionEffectType.FIRE_RESISTANCE, 200, 0, true, false, Color.ORANGE));
|
player.addPotionEffect(new PotionEffect(PotionEffectType.FIRE_RESISTANCE, 200, 0, true, false, Color.ORANGE));
|
||||||
player.addPotionEffect(new PotionEffect(PotionEffectType.DAMAGE_RESISTANCE, 200, 0, true, false, Color.ORANGE));
|
player.addPotionEffect(new PotionEffect(PotionEffectType.DAMAGE_RESISTANCE, 200, 0, true, false, Color.ORANGE));
|
||||||
//YELLOW
|
//YELLOW
|
||||||
}else if (colour.startsWith("y") && player.getLocation().getBlock().getLightFromSky() == 15 && player.getLocation().getBlock().getLightFromBlocks() == 15){
|
}else if (colour.startsWith("y") && player.getLocation().getBlock().getLightFromSky() == 15 && player.getLocation().getBlock().getLightFromBlocks() == 15){
|
||||||
player.addPotionEffect(new PotionEffect(PotionEffectType.REGENERATION, 200, 0, true, false, Color.YELLOW));
|
player.addPotionEffect(new PotionEffect(PotionEffectType.REGENERATION, 200, 0, true, false, Color.YELLOW));
|
||||||
//GREEN
|
//GREEN
|
||||||
}else if (colour.startsWith("g") && !colour.startsWith("gra") && !colour.startsWith("grey")){
|
}else if (colour.startsWith("g") && !colour.startsWith("gra") && !colour.startsWith("grey")){
|
||||||
player.addPotionEffect(new PotionEffect(PotionEffectType.LUCK, 200, 1, true, false, Color.GREEN));
|
player.addPotionEffect(new PotionEffect(PotionEffectType.LUCK, 200, 1, true, false, Color.GREEN));
|
||||||
player.addPotionEffect(new PotionEffect(PotionEffectType.FAST_DIGGING, 200, 0, true, false, Color.GREEN));
|
player.addPotionEffect(new PotionEffect(PotionEffectType.FAST_DIGGING, 200, 0, true, false, Color.GREEN));
|
||||||
//BLUE
|
//BLUE
|
||||||
}else if (colour.startsWith("b")){
|
}else if (colour.startsWith("b")){
|
||||||
player.addPotionEffect(new PotionEffect(PotionEffectType.SPEED, 200, 1, true, false, Color.BLUE));
|
player.addPotionEffect(new PotionEffect(PotionEffectType.SPEED, 200, 1, true, false, Color.BLUE));
|
||||||
player.addPotionEffect(new PotionEffect(PotionEffectType.WATER_BREATHING, 200, 0, true, false, Color.BLUE));
|
player.addPotionEffect(new PotionEffect(PotionEffectType.WATER_BREATHING, 200, 0, true, false, Color.BLUE));
|
||||||
//PURPLE
|
//PURPLE
|
||||||
}else if (colour.startsWith("p")){
|
}else if (colour.startsWith("p")){
|
||||||
player.addPotionEffect(new PotionEffect(PotionEffectType.HEALTH_BOOST, 200, 0, true, false, Color.PURPLE));
|
player.addPotionEffect(new PotionEffect(PotionEffectType.HEALTH_BOOST, 200, 0, true, false, Color.PURPLE));
|
||||||
//NULL
|
//NULL
|
||||||
}else{
|
}else{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
|
@ -1,13 +0,0 @@
|
||||||
package alisolarflare.components.gpowers.listeners;
|
|
||||||
|
|
||||||
import org.bukkit.event.Listener;
|
|
||||||
import org.bukkit.plugin.java.JavaPlugin;
|
|
||||||
|
|
||||||
import alisolarflare.components.gpowers.GPowerMemory;
|
|
||||||
|
|
||||||
public class gPowerListener implements Listener{
|
|
||||||
|
|
||||||
public gPowerListener(JavaPlugin plugin, GPowerMemory gPowerMemory){
|
|
||||||
new gPowerApplyingTask(plugin.getServer(), gPowerMemory.poweredPlayerList).runTaskTimer(plugin, 190, 190);
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,33 +0,0 @@
|
||||||
package alisolarflare.components.links;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import org.bukkit.plugin.java.JavaPlugin;
|
|
||||||
|
|
||||||
import alisolarflare.Module;
|
|
||||||
import alisolarflare.components.links.commands.PressAliLink;
|
|
||||||
import alisolarflare.components.links.commands.SetAliLink;
|
|
||||||
import alisolarflare.components.links.entities.Link;
|
|
||||||
|
|
||||||
public class AliLinkModule extends Module {
|
|
||||||
private SetAliLink setAliLink;
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void register(JavaPlugin plugin) {
|
|
||||||
setAliLink = new SetAliLink(plugin);
|
|
||||||
|
|
||||||
registerCommand(plugin, new PressAliLink(plugin, setAliLink));
|
|
||||||
registerCommand(plugin, setAliLink);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public void saveLinkList(JavaPlugin plugin) {
|
|
||||||
plugin.getConfig().set("aliLinkList", setAliLink.linkList);
|
|
||||||
}
|
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
|
||||||
public List<Link> loadLinkList(JavaPlugin plugin) {
|
|
||||||
return (List<Link>) plugin.getConfig().getList("aliLinkList");
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,60 +1,59 @@
|
||||||
package alisolarflare.components.links.commands;
|
package alisolarflare.components.links;
|
||||||
|
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.plugin.java.JavaPlugin;
|
import org.bukkit.plugin.java.JavaPlugin;
|
||||||
|
|
||||||
import alisolarflare.components.links.entities.Link;
|
import buttondevteam.lib.chat.TBMCCommandBase;
|
||||||
import buttondevteam.lib.chat.TBMCCommandBase;
|
|
||||||
|
public class Command_PressAliLink extends TBMCCommandBase {
|
||||||
public class PressAliLink extends TBMCCommandBase {
|
private JavaPlugin plugin;
|
||||||
private JavaPlugin plugin;
|
private Command_SetAliLink setAliLink;
|
||||||
private SetAliLink setAliLink;
|
|
||||||
|
public Command_PressAliLink(JavaPlugin plugin, Command_SetAliLink setAliLink) {
|
||||||
public PressAliLink(JavaPlugin plugin, SetAliLink setAliLink) {
|
this.plugin = plugin;
|
||||||
this.plugin = plugin;
|
this.setAliLink = setAliLink;
|
||||||
this.setAliLink = setAliLink;
|
}
|
||||||
}
|
|
||||||
|
@Override
|
||||||
@Override
|
public boolean OnCommand(CommandSender sender, String label, String[] args) {
|
||||||
public boolean OnCommand(CommandSender sender, String label, String[] args) {
|
|
||||||
|
sender.getServer().broadcastMessage(setAliLink.linkList.toString() + "over.");
|
||||||
sender.getServer().broadcastMessage(setAliLink.linkList.toString() + "over.");
|
|
||||||
|
if (args.length < 1) {
|
||||||
if (args.length < 1) {
|
sender.sendMessage("You must specify a link frequency");
|
||||||
sender.sendMessage("You must specify a link frequency");
|
sender.sendMessage("/pressalilink [frequency]");
|
||||||
sender.sendMessage("/pressalilink [frequency]");
|
}
|
||||||
}
|
for (Memory_Link link : setAliLink.linkList) {
|
||||||
for (Link link : setAliLink.linkList) {
|
for (String inputlink : args) {
|
||||||
for (String inputlink : args) {
|
if (inputlink.equals(link.frequency)) {
|
||||||
if (inputlink.equals(link.frequency)) {
|
link.press(plugin);
|
||||||
link.press(plugin);
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
return false;
|
||||||
return false;
|
}
|
||||||
}
|
|
||||||
|
@Override
|
||||||
@Override
|
public String[] GetHelpText(String alias) {
|
||||||
public String[] GetHelpText(String alias) {
|
// TODO Auto-generated method stub
|
||||||
// TODO Auto-generated method stub
|
return null;
|
||||||
return null;
|
}
|
||||||
}
|
|
||||||
|
@Override
|
||||||
@Override
|
public String GetCommandPath() {
|
||||||
public String GetCommandPath() {
|
return "pressalilink";
|
||||||
return "pressalilink";
|
}
|
||||||
}
|
|
||||||
|
@Override
|
||||||
@Override
|
public boolean GetPlayerOnly() {
|
||||||
public boolean GetPlayerOnly() {
|
// TODO Auto-generated method stub
|
||||||
// TODO Auto-generated method stub
|
return false;
|
||||||
return false;
|
}
|
||||||
}
|
|
||||||
|
@Override
|
||||||
@Override
|
public boolean GetModOnly() {
|
||||||
public boolean GetModOnly() {
|
// TODO Auto-generated method stub
|
||||||
// TODO Auto-generated method stub
|
return false;
|
||||||
return false;
|
}
|
||||||
}
|
|
||||||
|
}
|
||||||
}
|
|
|
@ -1,140 +1,138 @@
|
||||||
package alisolarflare.components.links.commands;
|
package alisolarflare.components.links;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.plugin.java.JavaPlugin;
|
import org.bukkit.plugin.java.JavaPlugin;
|
||||||
|
|
||||||
import alisolarflare.components.links.AliLinkModule;
|
import buttondevteam.lib.chat.TBMCCommandBase;
|
||||||
import alisolarflare.components.links.entities.Link;
|
|
||||||
import buttondevteam.lib.chat.TBMCCommandBase;
|
/**
|
||||||
|
* This class manages the command /SetAliLink <frequency> [x] [y] [z]. This command creates an Ali-Link, a location in a world that when called on by {@link Command_PressAliLink}, creates a temporary redstone
|
||||||
/**
|
* block, enabling wireless redstone
|
||||||
* This class manages the command /SetAliLink <frequency> [x] [y] [z]. This command creates an Ali-Link, a location in a world that when called on by {@link PressAliLink}, creates a temporary redstone
|
*
|
||||||
* block, enabling wireless redstone
|
* @see Command_PressAliLink
|
||||||
*
|
* @author Alisolarflare
|
||||||
* @see PressAliLink
|
*
|
||||||
* @author Alisolarflare
|
*/
|
||||||
*
|
public class Command_SetAliLink extends TBMCCommandBase {
|
||||||
*/
|
public List<Memory_Link> linkList = new ArrayList<Memory_Link>();
|
||||||
public class SetAliLink extends TBMCCommandBase {
|
Module_AliLink subplugin;
|
||||||
public List<Link> linkList = new ArrayList<Link>();
|
private JavaPlugin plugin;
|
||||||
AliLinkModule subplugin;
|
|
||||||
private JavaPlugin plugin;
|
/**
|
||||||
|
* Constructs the SetAliLink class
|
||||||
/**
|
*
|
||||||
* Constructs the SetAliLink class
|
* @param plugin
|
||||||
*
|
* The plugin that contains the configuration file of SetAliLink
|
||||||
* @param plugin
|
*/
|
||||||
* The plugin that contains the configuration file of SetAliLink
|
public Command_SetAliLink(JavaPlugin plugin) {
|
||||||
*/
|
this.plugin = plugin;
|
||||||
public SetAliLink(JavaPlugin plugin) {
|
load();
|
||||||
this.plugin = plugin;
|
}
|
||||||
load();
|
|
||||||
}
|
/**
|
||||||
|
* This command creates an Ali-Link which, when activated by the command /PressAliLink, creates a temporary redstone block if and only if /PressAliLink [frequency] matches the frequency saved when
|
||||||
/**
|
* /SetAliLink [frequency] is called.
|
||||||
* This command creates an Ali-Link which, when activated by the command /PressAliLink, creates a temporary redstone block if and only if /PressAliLink [frequency] matches the frequency saved when
|
*
|
||||||
* /SetAliLink [frequency] is called.
|
* @see Class#PressAliLink
|
||||||
*
|
* @param sender
|
||||||
* @see Class#PressAliLink
|
* Player who sent the command
|
||||||
* @param sender
|
* @param command
|
||||||
* Player who sent the command
|
* Command Object created
|
||||||
* @param command
|
* @param label
|
||||||
* Command Object created
|
* Name of the command
|
||||||
* @param label
|
* @param args
|
||||||
* Name of the command
|
* Arguments: [frequency] [x-coordinate] [y-coordinate] [z-coordinate], where the coordinates point to the intended location of the Ali-Link
|
||||||
* @param args
|
*/
|
||||||
* Arguments: [frequency] [x-coordinate] [y-coordinate] [z-coordinate], where the coordinates point to the intended location of the Ali-Link
|
@Override
|
||||||
*/
|
public boolean OnCommand(CommandSender sender, String label, String[] args) {
|
||||||
@Override
|
sender.sendMessage("you pressed shit");
|
||||||
public boolean OnCommand(CommandSender sender, String label, String[] args) {
|
if (args == null || args.length < 1) {
|
||||||
sender.sendMessage("you pressed shit");
|
sender.sendMessage("You must specify a link frequency");
|
||||||
if (args == null || args.length < 1) {
|
sender.sendMessage("/pressalilink [name]");
|
||||||
sender.sendMessage("You must specify a link frequency");
|
return false;
|
||||||
sender.sendMessage("/pressalilink [name]");
|
}
|
||||||
return false;
|
Player player = (Player) sender;
|
||||||
}
|
if (args.length < 4) {
|
||||||
Player player = (Player) sender;
|
player.sendMessage("short");
|
||||||
if (args.length < 4) {
|
linkList.add(new Memory_Link(args[0], player.getLocation()));
|
||||||
player.sendMessage("short");
|
save(player);
|
||||||
linkList.add(new Link(args[0], player.getLocation()));
|
player.sendMessage("end");
|
||||||
save(player);
|
return false;
|
||||||
player.sendMessage("end");
|
}
|
||||||
return false;
|
if (StringUtils.isNumericSpace(args[1]) && StringUtils.isNumericSpace(args[2])
|
||||||
}
|
&& StringUtils.isNumericSpace(args[3])) {
|
||||||
if (StringUtils.isNumericSpace(args[1]) && StringUtils.isNumericSpace(args[2])
|
player.sendMessage("CUUUSTOM");
|
||||||
&& StringUtils.isNumericSpace(args[3])) {
|
linkList.add(new Memory_Link(args[0], new Location(player.getWorld(), Double.parseDouble(args[1]),
|
||||||
player.sendMessage("CUUUSTOM");
|
Double.parseDouble(args[2]), Double.parseDouble(args[3]))));
|
||||||
linkList.add(new Link(args[0], new Location(player.getWorld(), Double.parseDouble(args[1]),
|
save(player);
|
||||||
Double.parseDouble(args[2]), Double.parseDouble(args[3]))));
|
player.sendMessage("FINISHED");
|
||||||
save(player);
|
} else {
|
||||||
player.sendMessage("FINISHED");
|
player.sendMessage("UNCUSTOOM");
|
||||||
} else {
|
linkList.add(new Memory_Link(args[0], player.getLocation()));
|
||||||
player.sendMessage("UNCUSTOOM");
|
save(player);
|
||||||
linkList.add(new Link(args[0], player.getLocation()));
|
player.sendMessage("UNFINISHED");
|
||||||
save(player);
|
return false;
|
||||||
player.sendMessage("UNFINISHED");
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return false;
|
|
||||||
}
|
/**
|
||||||
|
* Tries to save the entire SetAliLink class into memory, which includes all of the current Ali-links saved and in use.
|
||||||
/**
|
*
|
||||||
* Tries to save the entire SetAliLink class into memory, which includes all of the current Ali-links saved and in use.
|
* @param player
|
||||||
*
|
*/
|
||||||
* @param player
|
private void save(Player player) {
|
||||||
*/
|
player.sendMessage("SAAAVING");
|
||||||
private void save(Player player) {
|
player.sendMessage("SAVE FAILED: TELL ALI TO FIX THE SAVE AND UN-COMMENT THE PARAGRAPH SHE COMMENTED");
|
||||||
player.sendMessage("SAAAVING");
|
player.sendMessage("Link will only last until next server restart");
|
||||||
player.sendMessage("SAVE FAILED: TELL ALI TO FIX THE SAVE AND UN-COMMENT THE PARAGRAPH SHE COMMENTED");
|
return;
|
||||||
player.sendMessage("Link will only last until next server restart");
|
/*
|
||||||
return;
|
* subplugin.plugin.getConfig().set("aliLinkList", subplugin.linkList); try { player.sendMessage("SAVIN"); subplugin.plugin.saveConfig(); player.sendMessage("GOOD SAVE"); } catch (Exception e)
|
||||||
/*
|
* { player.sendMessage("YOU FUCKED STUFF UP"); // TODO Auto-generated catch block e.printStackTrace(); }
|
||||||
* subplugin.plugin.getConfig().set("aliLinkList", subplugin.linkList); try { player.sendMessage("SAVIN"); subplugin.plugin.saveConfig(); player.sendMessage("GOOD SAVE"); } catch (Exception e)
|
*/
|
||||||
* { player.sendMessage("YOU FUCKED STUFF UP"); // TODO Auto-generated catch block e.printStackTrace(); }
|
}
|
||||||
*/
|
|
||||||
}
|
/**
|
||||||
|
* Attempts to load the previous saved state of AliLinks, from the plugin configuration file
|
||||||
/**
|
*/
|
||||||
* Attempts to load the previous saved state of AliLinks, from the plugin configuration file
|
@SuppressWarnings("unchecked")
|
||||||
*/
|
private void load() {
|
||||||
@SuppressWarnings("unchecked")
|
try {
|
||||||
private void load() {
|
linkList = (List<Memory_Link>) plugin.getConfig().getList("aliLinkList");
|
||||||
try {
|
if (linkList == null || linkList.isEmpty()) {
|
||||||
linkList = (List<Link>) plugin.getConfig().getList("aliLinkList");
|
linkList = new ArrayList<Memory_Link>();
|
||||||
if (linkList == null || linkList.isEmpty()) {
|
}
|
||||||
linkList = new ArrayList<Link>();
|
} catch (Exception e) {
|
||||||
}
|
e.printStackTrace();
|
||||||
} catch (Exception e) {
|
}
|
||||||
e.printStackTrace();
|
}
|
||||||
}
|
|
||||||
}
|
@Override
|
||||||
|
public String[] GetHelpText(String alias) {
|
||||||
@Override
|
// TODO Auto-generated method stub
|
||||||
public String[] GetHelpText(String alias) {
|
return null;
|
||||||
// TODO Auto-generated method stub
|
}
|
||||||
return null;
|
|
||||||
}
|
@Override
|
||||||
|
public String GetCommandPath() {
|
||||||
@Override
|
return "setalilink";
|
||||||
public String GetCommandPath() {
|
}
|
||||||
return "setalilink";
|
|
||||||
}
|
@Override
|
||||||
|
public boolean GetPlayerOnly() {
|
||||||
@Override
|
return true;
|
||||||
public boolean GetPlayerOnly() {
|
}
|
||||||
return true;
|
|
||||||
}
|
@Override
|
||||||
|
public boolean GetModOnly() {
|
||||||
@Override
|
// TODO Auto-generated method stub
|
||||||
public boolean GetModOnly() {
|
return false;
|
||||||
// TODO Auto-generated method stub
|
}
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
|
|
@ -1,41 +1,39 @@
|
||||||
package alisolarflare.components.links.entities;
|
package alisolarflare.components.links;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.plugin.java.JavaPlugin;
|
import org.bukkit.plugin.java.JavaPlugin;
|
||||||
|
|
||||||
import alisolarflare.components.links.tasks.UnpressTask;
|
public class Memory_Link implements Serializable{
|
||||||
|
/**
|
||||||
public class Link implements Serializable{
|
*
|
||||||
/**
|
*/
|
||||||
*
|
private static final long serialVersionUID = 1L;
|
||||||
*/
|
public String frequency;
|
||||||
private static final long serialVersionUID = 1L;
|
public String world;
|
||||||
public String frequency;
|
public String x;
|
||||||
public String world;
|
public String y;
|
||||||
public String x;
|
public String z;
|
||||||
public String y;
|
|
||||||
public String z;
|
|
||||||
|
public Memory_Link(String frequency, Location location){
|
||||||
|
this.frequency = frequency;
|
||||||
public Link(String frequency, Location location){
|
this.world = location.getWorld().getName();
|
||||||
this.frequency = frequency;
|
this.x = "" + location.getBlockX();
|
||||||
this.world = location.getWorld().getName();
|
this.y = "" + location.getBlockY();
|
||||||
this.x = "" + location.getBlockX();
|
this.z = "" + location.getBlockZ();
|
||||||
this.y = "" + location.getBlockY();
|
//plugin.plugin.getConfig().set("frequency", 10);
|
||||||
this.z = "" + location.getBlockZ();
|
}
|
||||||
//plugin.plugin.getConfig().set("frequency", 10);
|
/**
|
||||||
}
|
* Activates the Ali-Link
|
||||||
/**
|
* @param plugin
|
||||||
* Activates the Ali-Link
|
*/
|
||||||
* @param plugin
|
public void press(JavaPlugin plugin) {
|
||||||
*/
|
Location location = new Location(plugin.getServer().getWorld(world), Integer.parseInt(x), Integer.parseInt(y), Integer.parseInt(z));
|
||||||
public void press(JavaPlugin plugin) {
|
location.getBlock().setType(Material.REDSTONE_BLOCK);
|
||||||
Location location = new Location(plugin.getServer().getWorld(world), Integer.parseInt(x), Integer.parseInt(y), Integer.parseInt(z));
|
Task_UnpressTask unPressTask = new Task_UnpressTask(location);
|
||||||
location.getBlock().setType(Material.REDSTONE_BLOCK);
|
unPressTask.runTaskTimer(plugin, 2, 1);
|
||||||
UnpressTask unPressTask = new UnpressTask(location);
|
}
|
||||||
unPressTask.runTaskTimer(plugin, 2, 1);
|
}
|
||||||
}
|
|
||||||
}
|
|
30
src/alisolarflare/components/links/Module_AliLink.java
Normal file
30
src/alisolarflare/components/links/Module_AliLink.java
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
package alisolarflare.components.links;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.bukkit.plugin.java.JavaPlugin;
|
||||||
|
|
||||||
|
import alisolarflare.Module;
|
||||||
|
|
||||||
|
public class Module_AliLink extends Module {
|
||||||
|
private Command_SetAliLink setAliLink;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void register(JavaPlugin plugin) {
|
||||||
|
setAliLink = new Command_SetAliLink(plugin);
|
||||||
|
|
||||||
|
registerCommand(plugin, new Command_PressAliLink(plugin, setAliLink));
|
||||||
|
registerCommand(plugin, setAliLink);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public void saveLinkList(JavaPlugin plugin) {
|
||||||
|
plugin.getConfig().set("aliLinkList", setAliLink.linkList);
|
||||||
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
|
public List<Memory_Link> loadLinkList(JavaPlugin plugin) {
|
||||||
|
return (List<Memory_Link>) plugin.getConfig().getList("aliLinkList");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -1,21 +1,21 @@
|
||||||
package alisolarflare.components.links.tasks;
|
package alisolarflare.components.links;
|
||||||
|
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.scheduler.BukkitRunnable;
|
import org.bukkit.scheduler.BukkitRunnable;
|
||||||
|
|
||||||
public class UnpressTask extends BukkitRunnable {
|
public class Task_UnpressTask extends BukkitRunnable {
|
||||||
private Location location;
|
private Location location;
|
||||||
public UnpressTask(Location location){
|
public Task_UnpressTask(Location location){
|
||||||
this.location = location;
|
this.location = location;
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings("deprecation")
|
@SuppressWarnings("deprecation")
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
location.getBlock().setType(Material.STAINED_CLAY);
|
location.getBlock().setType(Material.STAINED_CLAY);
|
||||||
location.getBlock().setData((byte) 14);
|
location.getBlock().setData((byte) 14);
|
||||||
this.cancel();
|
this.cancel();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
|
@ -1,42 +0,0 @@
|
||||||
package alisolarflare.components.links.serializer;
|
|
||||||
|
|
||||||
|
|
||||||
import java.io.FileInputStream;
|
|
||||||
import java.io.ObjectInputStream;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import alisolarflare.components.links.entities.Link;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @deprecated
|
|
||||||
* @author Alisolarflare
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public class Deserializer{
|
|
||||||
|
|
||||||
public static void main (String args[]) {
|
|
||||||
|
|
||||||
//Deserializer deserializer = new Deserializer();
|
|
||||||
//List<Link> aliLink = deserializer.loadLink(aliLink);
|
|
||||||
//System.out.println(aliLink);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**@deprecated*/
|
|
||||||
@SuppressWarnings("unchecked")
|
|
||||||
public List<Link> loadLinkList(){
|
|
||||||
List<Link> aliLinkList;
|
|
||||||
try{
|
|
||||||
|
|
||||||
FileInputStream fin = new FileInputStream("AliLinkList.ser");
|
|
||||||
ObjectInputStream ois = new ObjectInputStream(fin);
|
|
||||||
aliLinkList = (List<Link>) ois.readObject();
|
|
||||||
ois.close();
|
|
||||||
|
|
||||||
return aliLinkList;
|
|
||||||
|
|
||||||
}catch(Exception ex){
|
|
||||||
ex.printStackTrace();
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,38 +0,0 @@
|
||||||
package alisolarflare.components.links.serializer;
|
|
||||||
|
|
||||||
|
|
||||||
import java.io.FileOutputStream;
|
|
||||||
import java.io.ObjectOutputStream;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import alisolarflare.components.links.entities.Link;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @deprecated
|
|
||||||
* @author Alisolarflare
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public class Serializer {
|
|
||||||
|
|
||||||
public static void main (String args[]) {
|
|
||||||
|
|
||||||
//Serializer serializer = new Serializer();
|
|
||||||
//serializer.saveLink(plugin, frequency, location)
|
|
||||||
}
|
|
||||||
/**@deprecated*/
|
|
||||||
public void saveLinkList(List<Link> aliLinkList){
|
|
||||||
//saves link
|
|
||||||
|
|
||||||
try{
|
|
||||||
|
|
||||||
FileOutputStream fout = new FileOutputStream("AliLinkList.ser");
|
|
||||||
ObjectOutputStream oos = new ObjectOutputStream(fout);
|
|
||||||
oos.writeObject(aliLinkList);
|
|
||||||
oos.close();
|
|
||||||
System.out.println("Done");
|
|
||||||
|
|
||||||
}catch(Exception ex){
|
|
||||||
ex.printStackTrace();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,49 +1,48 @@
|
||||||
package alisolarflare.creativeboundaries.commands;
|
package alisolarflare.creativeboundaries;
|
||||||
|
|
||||||
import org.bukkit.GameMode;
|
import org.bukkit.GameMode;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
import alisolarflare.creativeboundaries.CreativeBoundariesModule;
|
import buttondevteam.lib.chat.TBMCCommandBase;
|
||||||
import buttondevteam.lib.chat.TBMCCommandBase;
|
|
||||||
|
public class Command_Cbgm0 extends TBMCCommandBase{
|
||||||
public class Cbgm0 extends TBMCCommandBase{
|
|
||||||
|
private Module_CreativeBoundaries module;
|
||||||
private CreativeBoundariesModule module;
|
|
||||||
|
public Command_Cbgm0(Module_CreativeBoundaries module) {
|
||||||
public Cbgm0(CreativeBoundariesModule module) {
|
this.module = module;
|
||||||
this.module = module;
|
}
|
||||||
}
|
|
||||||
|
@Override
|
||||||
@Override
|
public boolean OnCommand(CommandSender sender, String arg2, String[] arg3) {
|
||||||
public boolean OnCommand(CommandSender sender, String arg2, String[] arg3) {
|
if (!(sender instanceof Player)){
|
||||||
if (!(sender instanceof Player)){
|
sender.sendMessage("You must be a player to use this command!");
|
||||||
sender.sendMessage("You must be a player to use this command!");
|
return false;
|
||||||
return false;
|
}
|
||||||
}
|
|
||||||
|
Player player = (Player) sender;
|
||||||
Player player = (Player) sender;
|
player.setGameMode(GameMode.SURVIVAL);
|
||||||
player.setGameMode(GameMode.SURVIVAL);
|
module.cbCreatives.remove(player);
|
||||||
module.cbCreatives.remove(player);
|
return false;
|
||||||
return false;
|
}
|
||||||
}
|
|
||||||
|
@Override
|
||||||
@Override
|
public String[] GetHelpText(String alias) {
|
||||||
public String[] GetHelpText(String alias) {
|
// TODO Auto-generated method stub
|
||||||
// TODO Auto-generated method stub
|
return null;
|
||||||
return null;
|
}
|
||||||
}
|
|
||||||
|
@Override
|
||||||
@Override
|
public boolean GetPlayerOnly() {
|
||||||
public boolean GetPlayerOnly() {
|
// TODO Auto-generated method stub
|
||||||
// TODO Auto-generated method stub
|
return false;
|
||||||
return false;
|
}
|
||||||
}
|
|
||||||
|
@Override
|
||||||
@Override
|
public boolean GetModOnly() {
|
||||||
public boolean GetModOnly() {
|
// TODO Auto-generated method stub
|
||||||
// TODO Auto-generated method stub
|
return false;
|
||||||
return false;
|
}
|
||||||
}
|
|
||||||
|
}
|
||||||
}
|
|
|
@ -1,82 +1,81 @@
|
||||||
package alisolarflare.creativeboundaries.commands;
|
package alisolarflare.creativeboundaries;
|
||||||
|
|
||||||
import org.bukkit.GameMode;
|
import org.bukkit.GameMode;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
import com.palmergames.bukkit.towny.exceptions.NotRegisteredException;
|
import com.palmergames.bukkit.towny.exceptions.NotRegisteredException;
|
||||||
import com.palmergames.bukkit.towny.object.Resident;
|
import com.palmergames.bukkit.towny.object.Resident;
|
||||||
import com.palmergames.bukkit.towny.object.Town;
|
import com.palmergames.bukkit.towny.object.Town;
|
||||||
import com.palmergames.bukkit.towny.object.TownBlock;
|
import com.palmergames.bukkit.towny.object.TownBlock;
|
||||||
import com.palmergames.bukkit.towny.object.TownyUniverse;
|
import com.palmergames.bukkit.towny.object.TownyUniverse;
|
||||||
|
|
||||||
import alisolarflare.creativeboundaries.CreativeBoundariesModule;
|
import buttondevteam.lib.chat.TBMCCommandBase;
|
||||||
import buttondevteam.lib.chat.TBMCCommandBase;
|
|
||||||
|
public class Command_Cbgm1 extends TBMCCommandBase {
|
||||||
public class Cbgm1 extends TBMCCommandBase {
|
|
||||||
|
private Module_CreativeBoundaries module;
|
||||||
private CreativeBoundariesModule module;
|
|
||||||
|
public Command_Cbgm1(Module_CreativeBoundaries module) {
|
||||||
public Cbgm1(CreativeBoundariesModule module) {
|
this.module = module;
|
||||||
this.module = module;
|
}
|
||||||
}
|
|
||||||
|
@Override
|
||||||
@Override
|
public boolean OnCommand(CommandSender sender, String arg2, String[] arg3) {
|
||||||
public boolean OnCommand(CommandSender sender, String arg2, String[] arg3) {
|
|
||||||
|
if (!(sender instanceof Player)) {
|
||||||
if (!(sender instanceof Player)) {
|
sender.sendMessage("You must be a player to use this command!");
|
||||||
sender.sendMessage("You must be a player to use this command!");
|
return false;
|
||||||
return false;
|
}
|
||||||
}
|
|
||||||
|
Player player = (Player) sender;
|
||||||
Player player = (Player) sender;
|
|
||||||
|
TownBlock tb = TownyUniverse.getTownBlock(player.getLocation());
|
||||||
TownBlock tb = TownyUniverse.getTownBlock(player.getLocation());
|
if (tb == null) {
|
||||||
if (tb == null) {
|
player.sendMessage("You aren't standing in a town or some other error occured.");
|
||||||
player.sendMessage("You aren't standing in a town or some other error occured.");
|
player.sendMessage("TownBlock is null.");
|
||||||
player.sendMessage("TownBlock is null.");
|
return false;
|
||||||
return false;
|
}
|
||||||
}
|
Town town;
|
||||||
Town town;
|
try {
|
||||||
try {
|
town = tb.getTown();
|
||||||
town = tb.getTown();
|
} catch (NotRegisteredException e) {
|
||||||
} catch (NotRegisteredException e) {
|
player.sendMessage("You aren't standing in a town or some other error occured.");
|
||||||
player.sendMessage("You aren't standing in a town or some other error occured.");
|
player.sendMessage("TownBlock's town is not registered.");
|
||||||
player.sendMessage("TownBlock's town is not registered.");
|
return false;
|
||||||
return false;
|
}
|
||||||
}
|
if (town == null) {
|
||||||
if (town == null) {
|
player.sendMessage("ERROR: The town you're standing in is Null.");
|
||||||
player.sendMessage("ERROR: The town you're standing in is Null.");
|
return false;
|
||||||
return false;
|
}
|
||||||
}
|
|
||||||
|
for(Resident res : town.getResidents()){
|
||||||
for(Resident res : town.getResidents()){
|
if (res.getName().toString().equals(player.getName().toString())){
|
||||||
if (res.getName().toString().equals(player.getName().toString())){
|
player.setGameMode(GameMode.CREATIVE);
|
||||||
player.setGameMode(GameMode.CREATIVE);
|
module.cbCreatives.add(player);
|
||||||
module.cbCreatives.add(player);
|
return true;
|
||||||
return true;
|
}
|
||||||
}
|
}
|
||||||
}
|
player.sendMessage("Sorry, you're not part of this town");
|
||||||
player.sendMessage("Sorry, you're not part of this town");
|
return false;
|
||||||
return false;
|
}
|
||||||
}
|
|
||||||
|
@Override
|
||||||
@Override
|
public String[] GetHelpText(String alias) {
|
||||||
public String[] GetHelpText(String alias) {
|
// TODO Auto-generated method stub
|
||||||
// TODO Auto-generated method stub
|
return null;
|
||||||
return null;
|
}
|
||||||
}
|
|
||||||
|
@Override
|
||||||
@Override
|
public boolean GetPlayerOnly() {
|
||||||
public boolean GetPlayerOnly() {
|
// TODO Auto-generated method stub
|
||||||
// TODO Auto-generated method stub
|
return false;
|
||||||
return false;
|
}
|
||||||
}
|
|
||||||
|
@Override
|
||||||
@Override
|
public boolean GetModOnly() {
|
||||||
public boolean GetModOnly() {
|
// TODO Auto-generated method stub
|
||||||
// TODO Auto-generated method stub
|
return false;
|
||||||
return false;
|
}
|
||||||
}
|
|
||||||
|
}
|
||||||
}
|
|
|
@ -1,54 +1,53 @@
|
||||||
package alisolarflare.creativeboundaries.commands;
|
package alisolarflare.creativeboundaries;
|
||||||
|
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
|
|
||||||
import alisolarflare.creativeboundaries.CreativeBoundariesModule;
|
import buttondevteam.lib.chat.TBMCCommandBase;
|
||||||
import buttondevteam.lib.chat.TBMCCommandBase;
|
|
||||||
|
public class Command_SetDickmode extends TBMCCommandBase{
|
||||||
public class SetDickmode extends TBMCCommandBase{
|
private Module_CreativeBoundaries module;
|
||||||
private CreativeBoundariesModule module;
|
|
||||||
|
public Command_SetDickmode(Module_CreativeBoundaries module){
|
||||||
public SetDickmode(CreativeBoundariesModule module){
|
this.module = module;
|
||||||
this.module = module;
|
}
|
||||||
}
|
|
||||||
|
@Override
|
||||||
@Override
|
public boolean OnCommand(CommandSender sender, String label, String[] args) {
|
||||||
public boolean OnCommand(CommandSender sender, String label, String[] args) {
|
if (sender.getName().equals("Alisolarflare") || sender.getName().equals("iie")){
|
||||||
if (sender.getName().equals("Alisolarflare") || sender.getName().equals("iie")){
|
if(args[0] == null){
|
||||||
if(args[0] == null){
|
sender.sendMessage("You must use True, False, 1, or 0 as arguments!");
|
||||||
sender.sendMessage("You must use True, False, 1, or 0 as arguments!");
|
return false;
|
||||||
return false;
|
}
|
||||||
}
|
if(args[0].equalsIgnoreCase("TRUE") || args[0].equalsIgnoreCase("1")){
|
||||||
if(args[0].equalsIgnoreCase("TRUE") || args[0].equalsIgnoreCase("1")){
|
sender.sendMessage("Dickmode has been turned on!");
|
||||||
sender.sendMessage("Dickmode has been turned on!");
|
module.dickmode=(true);
|
||||||
module.dickmode=(true);
|
return true;
|
||||||
return true;
|
}
|
||||||
}
|
if(args[0].equalsIgnoreCase("FALSE") || args[0].equalsIgnoreCase("0")){
|
||||||
if(args[0].equalsIgnoreCase("FALSE") || args[0].equalsIgnoreCase("0")){
|
sender.sendMessage("Dickmode has been turned off!");
|
||||||
sender.sendMessage("Dickmode has been turned off!");
|
module.dickmode=(false);
|
||||||
module.dickmode=(false);
|
return true;
|
||||||
return true;
|
}
|
||||||
}
|
return false;
|
||||||
return false;
|
}
|
||||||
}
|
return false;
|
||||||
return false;
|
}
|
||||||
}
|
|
||||||
|
@Override
|
||||||
@Override
|
public String[] GetHelpText(String alias) {
|
||||||
public String[] GetHelpText(String alias) {
|
// TODO Auto-generated method stub
|
||||||
// TODO Auto-generated method stub
|
return null;
|
||||||
return null;
|
}
|
||||||
}
|
|
||||||
|
@Override
|
||||||
@Override
|
public boolean GetPlayerOnly() {
|
||||||
public boolean GetPlayerOnly() {
|
// TODO Auto-generated method stub
|
||||||
// TODO Auto-generated method stub
|
return false;
|
||||||
return false;
|
}
|
||||||
}
|
|
||||||
|
@Override
|
||||||
@Override
|
public boolean GetModOnly() {
|
||||||
public boolean GetModOnly() {
|
// TODO Auto-generated method stub
|
||||||
// TODO Auto-generated method stub
|
return false;
|
||||||
return false;
|
}
|
||||||
}
|
}
|
||||||
}
|
|
|
@ -1,30 +0,0 @@
|
||||||
package alisolarflare.creativeboundaries;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import org.bukkit.entity.Player;
|
|
||||||
import org.bukkit.plugin.java.JavaPlugin;
|
|
||||||
|
|
||||||
import alisolarflare.Module;
|
|
||||||
import alisolarflare.creativeboundaries.commands.Cbgm0;
|
|
||||||
import alisolarflare.creativeboundaries.commands.Cbgm1;
|
|
||||||
import alisolarflare.creativeboundaries.commands.SetDickmode;
|
|
||||||
import alisolarflare.creativeboundaries.listeners.ItemRestrictionListener;
|
|
||||||
import alisolarflare.creativeboundaries.listeners.PlotChangeListener;
|
|
||||||
|
|
||||||
|
|
||||||
public class CreativeBoundariesModule extends Module{
|
|
||||||
public boolean dickmode;
|
|
||||||
public List<Player> cbCreatives = new ArrayList<Player>();
|
|
||||||
@Override
|
|
||||||
public void register(JavaPlugin plugin) {
|
|
||||||
registerCommand(plugin, new Cbgm1(this));
|
|
||||||
registerCommand(plugin, new Cbgm0(this));
|
|
||||||
registerCommand(plugin, new SetDickmode(this));
|
|
||||||
|
|
||||||
registerListener(plugin, new PlotChangeListener(this));
|
|
||||||
//registerListener(plugin, new ItemRestrictionListener(this));
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,26 +1,24 @@
|
||||||
package alisolarflare.creativeboundaries.listeners;
|
package alisolarflare.creativeboundaries;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.event.EventHandler;
|
import org.bukkit.event.EventHandler;
|
||||||
import org.bukkit.event.Listener;
|
import org.bukkit.event.Listener;
|
||||||
import org.bukkit.event.inventory.InventoryCreativeEvent;
|
import org.bukkit.event.inventory.InventoryCreativeEvent;
|
||||||
|
|
||||||
import alisolarflare.creativeboundaries.CreativeBoundariesModule;
|
public class Listener_ItemRestriction implements Listener {
|
||||||
|
|
||||||
public class ItemRestrictionListener implements Listener {
|
private Module_CreativeBoundaries module;
|
||||||
|
|
||||||
private CreativeBoundariesModule module;
|
public Listener_ItemRestriction(Module_CreativeBoundaries module) {
|
||||||
|
this.module = module;
|
||||||
public ItemRestrictionListener(CreativeBoundariesModule module) {
|
}
|
||||||
this.module = module;
|
|
||||||
}
|
@EventHandler
|
||||||
|
public void onItemTake(InventoryCreativeEvent event){
|
||||||
@EventHandler
|
List<Player> cbCreatives = module.cbCreatives;
|
||||||
public void onItemTake(InventoryCreativeEvent event){
|
|
||||||
List<Player> cbCreatives = module.cbCreatives;
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
|
|
@ -1,69 +1,67 @@
|
||||||
package alisolarflare.creativeboundaries.listeners;
|
package alisolarflare.creativeboundaries;
|
||||||
|
|
||||||
import org.bukkit.GameMode;
|
import org.bukkit.GameMode;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.event.EventHandler;
|
import org.bukkit.event.EventHandler;
|
||||||
import org.bukkit.event.Listener;
|
import org.bukkit.event.Listener;
|
||||||
|
|
||||||
import com.palmergames.bukkit.towny.event.PlayerChangePlotEvent;
|
import com.palmergames.bukkit.towny.event.PlayerChangePlotEvent;
|
||||||
import com.palmergames.bukkit.towny.exceptions.NotRegisteredException;
|
import com.palmergames.bukkit.towny.exceptions.NotRegisteredException;
|
||||||
import com.palmergames.bukkit.towny.object.Resident;
|
import com.palmergames.bukkit.towny.object.Resident;
|
||||||
import com.palmergames.bukkit.towny.object.Town;
|
import com.palmergames.bukkit.towny.object.Town;
|
||||||
import com.palmergames.bukkit.towny.object.TownBlock;
|
import com.palmergames.bukkit.towny.object.TownBlock;
|
||||||
import com.palmergames.bukkit.towny.object.TownyUniverse;
|
import com.palmergames.bukkit.towny.object.TownyUniverse;
|
||||||
|
|
||||||
import alisolarflare.creativeboundaries.CreativeBoundariesModule;
|
public class Listener_PlotChange implements Listener{
|
||||||
|
public Module_CreativeBoundaries module;
|
||||||
public class PlotChangeListener implements Listener{
|
public Listener_PlotChange(Module_CreativeBoundaries module){
|
||||||
public CreativeBoundariesModule module;
|
this.module = module;
|
||||||
public PlotChangeListener(CreativeBoundariesModule module){
|
}
|
||||||
this.module = module;
|
@EventHandler
|
||||||
}
|
public void onPlayerPlotChange(PlayerChangePlotEvent plotEvent){
|
||||||
@EventHandler
|
Player player = plotEvent.getPlayer();
|
||||||
public void onPlayerPlotChange(PlayerChangePlotEvent plotEvent){
|
if (module.dickmode == false){
|
||||||
Player player = plotEvent.getPlayer();
|
return;
|
||||||
if (module.dickmode == false){
|
}
|
||||||
return;
|
if (plotEvent.getPlayer().getGameMode() != GameMode.CREATIVE){
|
||||||
}
|
return;
|
||||||
if (plotEvent.getPlayer().getGameMode() != GameMode.CREATIVE){
|
}
|
||||||
return;
|
if (!(module.cbCreatives.contains(plotEvent.getPlayer()))){
|
||||||
}
|
return;
|
||||||
if (!(module.cbCreatives.contains(plotEvent.getPlayer()))){
|
}
|
||||||
return;
|
TownBlock tb = TownyUniverse.getTownBlock(player.getLocation());
|
||||||
}
|
if (tb == null) {
|
||||||
TownBlock tb = TownyUniverse.getTownBlock(player.getLocation());
|
player.setGameMode(GameMode.SURVIVAL);
|
||||||
if (tb == null) {
|
player.sendMessage("You have left your town boundaries!");
|
||||||
player.setGameMode(GameMode.SURVIVAL);
|
module.cbCreatives.remove(player);
|
||||||
player.sendMessage("You have left your town boundaries!");
|
return;
|
||||||
module.cbCreatives.remove(player);
|
}
|
||||||
return;
|
Town town;
|
||||||
}
|
try {
|
||||||
Town town;
|
town = tb.getTown();
|
||||||
try {
|
} catch (NotRegisteredException e) {
|
||||||
town = tb.getTown();
|
player.setGameMode(GameMode.SURVIVAL);
|
||||||
} catch (NotRegisteredException e) {
|
player.sendMessage("You have left your town boundaries!!");
|
||||||
player.setGameMode(GameMode.SURVIVAL);
|
module.cbCreatives.remove(player);
|
||||||
player.sendMessage("You have left your town boundaries!!");
|
return;
|
||||||
module.cbCreatives.remove(player);
|
}
|
||||||
return;
|
|
||||||
}
|
if (town == null) {
|
||||||
|
player.setGameMode(GameMode.SURVIVAL);
|
||||||
if (town == null) {
|
player.sendMessage("You have left your town boundaries!!!");
|
||||||
player.setGameMode(GameMode.SURVIVAL);
|
module.cbCreatives.remove(player);
|
||||||
player.sendMessage("You have left your town boundaries!!!");
|
return;
|
||||||
module.cbCreatives.remove(player);
|
}
|
||||||
return;
|
boolean townHasRes = false;
|
||||||
}
|
for(Resident res : town.getResidents()){
|
||||||
boolean townHasRes = false;
|
if (res.getName().toString().equals(player.getName().toString())){
|
||||||
for(Resident res : town.getResidents()){
|
townHasRes = true;
|
||||||
if (res.getName().toString().equals(player.getName().toString())){
|
}
|
||||||
townHasRes = true;
|
}
|
||||||
}
|
if (!townHasRes){
|
||||||
}
|
player.setGameMode(GameMode.SURVIVAL);
|
||||||
if (!townHasRes){
|
player.sendMessage("You have left your town boundaries!!!!");
|
||||||
player.setGameMode(GameMode.SURVIVAL);
|
module.cbCreatives.remove(player);
|
||||||
player.sendMessage("You have left your town boundaries!!!!");
|
}
|
||||||
module.cbCreatives.remove(player);
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
|
@ -0,0 +1,25 @@
|
||||||
|
package alisolarflare.creativeboundaries;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.bukkit.entity.Player;
|
||||||
|
import org.bukkit.plugin.java.JavaPlugin;
|
||||||
|
|
||||||
|
import alisolarflare.Module;
|
||||||
|
|
||||||
|
|
||||||
|
public class Module_CreativeBoundaries extends Module{
|
||||||
|
public boolean dickmode;
|
||||||
|
public List<Player> cbCreatives = new ArrayList<Player>();
|
||||||
|
@Override
|
||||||
|
public void register(JavaPlugin plugin) {
|
||||||
|
registerCommand(plugin, new Command_Cbgm1(this));
|
||||||
|
registerCommand(plugin, new Command_Cbgm0(this));
|
||||||
|
registerCommand(plugin, new Command_SetDickmode(this));
|
||||||
|
|
||||||
|
registerListener(plugin, new Listener_PlotChange(this));
|
||||||
|
//registerListener(plugin, new ItemRestrictionListener(this));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -1,10 +1,10 @@
|
||||||
package alisolarflare.easyuhc.commands;
|
package alisolarflare.easyuhc;
|
||||||
|
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
|
|
||||||
import buttondevteam.lib.chat.TBMCCommandBase;
|
import buttondevteam.lib.chat.TBMCCommandBase;
|
||||||
|
|
||||||
public class ActivatePowers extends TBMCCommandBase{
|
public class Command_ActivatePowers extends TBMCCommandBase{
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean OnCommand(CommandSender sender, String alias, String[] args) {
|
public boolean OnCommand(CommandSender sender, String alias, String[] args) {
|
|
@ -1,10 +1,10 @@
|
||||||
package alisolarflare.easyuhc.commands;
|
package alisolarflare.easyuhc;
|
||||||
|
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
|
|
||||||
import buttondevteam.lib.chat.TBMCCommandBase;
|
import buttondevteam.lib.chat.TBMCCommandBase;
|
||||||
|
|
||||||
public class SetupWorldBorders extends TBMCCommandBase {
|
public class Command_SetupWorldBorders extends TBMCCommandBase {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean OnCommand(CommandSender sender, String alias, String[] args) {
|
public boolean OnCommand(CommandSender sender, String alias, String[] args) {
|
|
@ -1,10 +1,10 @@
|
||||||
package alisolarflare.easyuhc.commands;
|
package alisolarflare.easyuhc;
|
||||||
|
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
|
|
||||||
import buttondevteam.lib.chat.TBMCCommandBase;
|
import buttondevteam.lib.chat.TBMCCommandBase;
|
||||||
|
|
||||||
public class ShrinkWorldBorders extends TBMCCommandBase {
|
public class Command_ShrinkWorldBorders extends TBMCCommandBase {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean OnCommand(CommandSender sender, String alias, String[] args) {
|
public boolean OnCommand(CommandSender sender, String alias, String[] args) {
|
|
@ -1,10 +1,10 @@
|
||||||
package alisolarflare.easyuhc.commands;
|
package alisolarflare.easyuhc;
|
||||||
|
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
|
|
||||||
import buttondevteam.lib.chat.TBMCCommandBase;
|
import buttondevteam.lib.chat.TBMCCommandBase;
|
||||||
|
|
||||||
public class SpreadPlayers extends TBMCCommandBase{
|
public class Command_SpreadPlayers extends TBMCCommandBase{
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean OnCommand(CommandSender sender, String alias, String[] args) {
|
public boolean OnCommand(CommandSender sender, String alias, String[] args) {
|
|
@ -1,10 +1,10 @@
|
||||||
package alisolarflare.easyuhc.commands;
|
package alisolarflare.easyuhc;
|
||||||
|
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
|
|
||||||
import buttondevteam.lib.chat.TBMCCommandBase;
|
import buttondevteam.lib.chat.TBMCCommandBase;
|
||||||
|
|
||||||
public class StartTimer extends TBMCCommandBase{
|
public class Command_StartTimer extends TBMCCommandBase{
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean OnCommand(CommandSender sender, String alias, String[] args) {
|
public boolean OnCommand(CommandSender sender, String alias, String[] args) {
|
|
@ -1,10 +1,10 @@
|
||||||
package alisolarflare.easyuhc.commands;
|
package alisolarflare.easyuhc;
|
||||||
|
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
|
|
||||||
import buttondevteam.lib.chat.TBMCCommandBase;
|
import buttondevteam.lib.chat.TBMCCommandBase;
|
||||||
|
|
||||||
public class StartUHC extends TBMCCommandBase{
|
public class Command_StartUHC extends TBMCCommandBase{
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean OnCommand(CommandSender sender, String alias, String[] args) {
|
public boolean OnCommand(CommandSender sender, String alias, String[] args) {
|
|
@ -1,10 +1,10 @@
|
||||||
package alisolarflare.easyuhc.commands;
|
package alisolarflare.easyuhc;
|
||||||
|
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
|
|
||||||
import buttondevteam.lib.chat.TBMCCommandBase;
|
import buttondevteam.lib.chat.TBMCCommandBase;
|
||||||
|
|
||||||
public class TeleportToUHC extends TBMCCommandBase{
|
public class Command_TeleportToUHC extends TBMCCommandBase{
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean OnCommand(CommandSender sender, String alias, String[] args) {
|
public boolean OnCommand(CommandSender sender, String alias, String[] args) {
|
|
@ -1,24 +0,0 @@
|
||||||
package alisolarflare.easyuhc;
|
|
||||||
|
|
||||||
import org.bukkit.plugin.java.JavaPlugin;
|
|
||||||
|
|
||||||
import alisolarflare.Module;
|
|
||||||
import alisolarflare.easyuhc.commands.ActivatePowers;
|
|
||||||
import alisolarflare.easyuhc.commands.SetupWorldBorders;
|
|
||||||
import alisolarflare.easyuhc.commands.SpreadPlayers;
|
|
||||||
import alisolarflare.easyuhc.commands.StartTimer;
|
|
||||||
import alisolarflare.easyuhc.commands.StartUHC;
|
|
||||||
import alisolarflare.easyuhc.commands.TeleportToUHC;
|
|
||||||
|
|
||||||
public class EasyUHCModule extends Module{
|
|
||||||
@Override
|
|
||||||
public void register(JavaPlugin plugin) {
|
|
||||||
registerCommand(plugin, new ActivatePowers());
|
|
||||||
registerCommand(plugin, new SetupWorldBorders());
|
|
||||||
registerCommand(plugin, new SetupWorldBorders());
|
|
||||||
registerCommand(plugin, new SpreadPlayers());
|
|
||||||
registerCommand(plugin, new StartTimer());
|
|
||||||
registerCommand(plugin, new StartUHC());
|
|
||||||
registerCommand(plugin, new TeleportToUHC());
|
|
||||||
}
|
|
||||||
}
|
|
18
src/alisolarflare/easyuhc/Module_EasyUHC.java
Normal file
18
src/alisolarflare/easyuhc/Module_EasyUHC.java
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
package alisolarflare.easyuhc;
|
||||||
|
|
||||||
|
import org.bukkit.plugin.java.JavaPlugin;
|
||||||
|
|
||||||
|
import alisolarflare.Module;
|
||||||
|
|
||||||
|
public class Module_EasyUHC extends Module{
|
||||||
|
@Override
|
||||||
|
public void register(JavaPlugin plugin) {
|
||||||
|
registerCommand(plugin, new Command_ActivatePowers());
|
||||||
|
registerCommand(plugin, new Command_SetupWorldBorders());
|
||||||
|
registerCommand(plugin, new Command_SetupWorldBorders());
|
||||||
|
registerCommand(plugin, new Command_SpreadPlayers());
|
||||||
|
registerCommand(plugin, new Command_StartTimer());
|
||||||
|
registerCommand(plugin, new Command_StartUHC());
|
||||||
|
registerCommand(plugin, new Command_TeleportToUHC());
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,39 +1,39 @@
|
||||||
package alisolarflare.magic.tricks;
|
package alisolarflare.magic;
|
||||||
|
|
||||||
import org.bukkit.entity.Arrow;
|
import org.bukkit.entity.Arrow;
|
||||||
import org.bukkit.entity.EntityType;
|
import org.bukkit.entity.EntityType;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.event.EventHandler;
|
import org.bukkit.event.EventHandler;
|
||||||
import org.bukkit.event.Listener;
|
import org.bukkit.event.Listener;
|
||||||
import org.bukkit.event.entity.ProjectileLaunchEvent;
|
import org.bukkit.event.entity.ProjectileLaunchEvent;
|
||||||
import org.bukkit.plugin.java.JavaPlugin;
|
import org.bukkit.plugin.java.JavaPlugin;
|
||||||
|
|
||||||
public class AliArrowListener implements Listener {
|
public class AliArrowListener implements Listener {
|
||||||
private final JavaPlugin plugin;
|
private final JavaPlugin plugin;
|
||||||
|
|
||||||
public AliArrowListener(JavaPlugin plugin){
|
public AliArrowListener(JavaPlugin plugin){
|
||||||
this.plugin = plugin;
|
this.plugin = plugin;
|
||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void onProjectileLaunch(ProjectileLaunchEvent event){
|
public void onProjectileLaunch(ProjectileLaunchEvent event){
|
||||||
if(event.getEntity().getType() != EntityType.ARROW){
|
if(event.getEntity().getType() != EntityType.ARROW){
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Arrow arrow = (Arrow) event.getEntity();
|
Arrow arrow = (Arrow) event.getEntity();
|
||||||
if (!(arrow.isCritical()) || !(arrow.getShooter() instanceof Player)){
|
if (!(arrow.isCritical()) || !(arrow.getShooter() instanceof Player)){
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
String user = ((Player) arrow.getShooter()).getName();
|
String user = ((Player) arrow.getShooter()).getName();
|
||||||
|
|
||||||
for (String permittedUser : AliArrowTask.permittedUsers){
|
for (String permittedUser : AliArrowTask.permittedUsers){
|
||||||
if(permittedUser.equalsIgnoreCase(user)){
|
if(permittedUser.equalsIgnoreCase(user)){
|
||||||
new AliArrowTask(arrow,user).runTaskTimer(plugin, 2, 1);
|
new AliArrowTask(arrow,user).runTaskTimer(plugin, 2, 1);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -1,40 +1,40 @@
|
||||||
package alisolarflare.magic.tricks;
|
package alisolarflare.magic;
|
||||||
|
|
||||||
import org.bukkit.Particle;
|
import org.bukkit.Particle;
|
||||||
import org.bukkit.entity.Arrow;
|
import org.bukkit.entity.Arrow;
|
||||||
import org.bukkit.scheduler.BukkitRunnable;
|
import org.bukkit.scheduler.BukkitRunnable;
|
||||||
|
|
||||||
public class AliArrowTask extends BukkitRunnable {
|
public class AliArrowTask extends BukkitRunnable {
|
||||||
static String[] permittedUsers = {"alisolarflare", "Zanthr", "NorbiPeti"};
|
static String[] permittedUsers = {"alisolarflare", "Zanthr", "NorbiPeti"};
|
||||||
String name;
|
String name;
|
||||||
Arrow arrow;
|
Arrow arrow;
|
||||||
|
|
||||||
public AliArrowTask(Arrow arrow, String name) {
|
public AliArrowTask(Arrow arrow, String name) {
|
||||||
this.name = name;
|
this.name = name;
|
||||||
this.arrow = arrow;
|
this.arrow = arrow;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
if (arrow.isOnGround() || arrow.isDead()) {
|
if (arrow.isOnGround() || arrow.isDead()) {
|
||||||
this.cancel();
|
this.cancel();
|
||||||
}
|
}
|
||||||
|
|
||||||
switch(name.toLowerCase()){
|
switch(name.toLowerCase()){
|
||||||
case "alisolarflare":
|
case "alisolarflare":
|
||||||
arrow.getWorld().spawnParticle(Particle.VILLAGER_HAPPY, arrow.getLocation(), 1);
|
arrow.getWorld().spawnParticle(Particle.VILLAGER_HAPPY, arrow.getLocation(), 1);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "zanthr":
|
case "zanthr":
|
||||||
arrow.getWorld().spawnParticle(Particle.FIREWORKS_SPARK, arrow.getLocation(), 1);
|
arrow.getWorld().spawnParticle(Particle.FIREWORKS_SPARK, arrow.getLocation(), 1);
|
||||||
arrow.getWorld().spawnParticle(Particle.FLAME, arrow.getLocation(), 1);
|
arrow.getWorld().spawnParticle(Particle.FLAME, arrow.getLocation(), 1);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "norbipeti":
|
case "norbipeti":
|
||||||
arrow.getWorld().spawnParticle(Particle.LAVA, arrow.getLocation(), 1);
|
arrow.getWorld().spawnParticle(Particle.LAVA, arrow.getLocation(), 1);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
|
@ -1,18 +1,18 @@
|
||||||
package alisolarflare.magic.tricks;
|
package alisolarflare.magic;
|
||||||
|
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.event.EventHandler;
|
import org.bukkit.event.EventHandler;
|
||||||
import org.bukkit.event.Listener;
|
import org.bukkit.event.Listener;
|
||||||
import org.bukkit.event.entity.PlayerDeathEvent;
|
import org.bukkit.event.entity.PlayerDeathEvent;
|
||||||
|
|
||||||
public class BoomBowDeathListener implements Listener{
|
public class BoomBowDeathListener implements Listener{
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void onBoomBowDeath(PlayerDeathEvent event){
|
public void onBoomBowDeath(PlayerDeathEvent event){
|
||||||
Player player = event.getEntity();
|
Player player = event.getEntity();
|
||||||
|
|
||||||
if (player.getLastDamage() > 7.42420 && player.getLastDamage() < 7.42429){
|
if (player.getLastDamage() > 7.42420 && player.getLastDamage() < 7.42429){
|
||||||
player.sendMessage("42!");
|
player.sendMessage("42!");
|
||||||
event.setDeathMessage(player.getName() + " got trigger happy with the [Boom Bow]");
|
event.setDeathMessage(player.getName() + " got trigger happy with the [Boom Bow]");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -1,107 +1,107 @@
|
||||||
package alisolarflare.magic.tricks;
|
package alisolarflare.magic;
|
||||||
|
|
||||||
import org.bukkit.GameMode;
|
import org.bukkit.GameMode;
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.Particle;
|
import org.bukkit.Particle;
|
||||||
import org.bukkit.Sound;
|
import org.bukkit.Sound;
|
||||||
import org.bukkit.enchantments.Enchantment;
|
import org.bukkit.enchantments.Enchantment;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.event.EventHandler;
|
import org.bukkit.event.EventHandler;
|
||||||
import org.bukkit.event.Listener;
|
import org.bukkit.event.Listener;
|
||||||
import org.bukkit.event.block.Action;
|
import org.bukkit.event.block.Action;
|
||||||
import org.bukkit.event.player.PlayerInteractEvent;
|
import org.bukkit.event.player.PlayerInteractEvent;
|
||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
import org.bukkit.plugin.java.JavaPlugin;
|
import org.bukkit.plugin.java.JavaPlugin;
|
||||||
import org.bukkit.potion.PotionEffect;
|
import org.bukkit.potion.PotionEffect;
|
||||||
import org.bukkit.potion.PotionEffectType;
|
import org.bukkit.potion.PotionEffectType;
|
||||||
|
|
||||||
public class BoomBowListener implements Listener {
|
public class BoomBowListener implements Listener {
|
||||||
JavaPlugin plugin;
|
JavaPlugin plugin;
|
||||||
public BoomBowListener(JavaPlugin plugin){
|
public BoomBowListener(JavaPlugin plugin){
|
||||||
this.plugin = plugin;
|
this.plugin = plugin;
|
||||||
}
|
}
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void ClickEvent(PlayerInteractEvent event){
|
public void ClickEvent(PlayerInteractEvent event){
|
||||||
FlyBowBoost(event);
|
FlyBowBoost(event);
|
||||||
|
|
||||||
}
|
}
|
||||||
public void FlyBowBoost(PlayerInteractEvent event){
|
public void FlyBowBoost(PlayerInteractEvent event){
|
||||||
|
|
||||||
//ACTION SANITATION
|
//ACTION SANITATION
|
||||||
if(!(event.getAction() == Action.LEFT_CLICK_AIR || event.getAction() == Action.LEFT_CLICK_BLOCK)) return;
|
if(!(event.getAction() == Action.LEFT_CLICK_AIR || event.getAction() == Action.LEFT_CLICK_BLOCK)) return;
|
||||||
if(!(event.getPlayer().isGliding())) return;
|
if(!(event.getPlayer().isGliding())) return;
|
||||||
if(!(event.getMaterial() == Material.BOW)) return;
|
if(!(event.getMaterial() == Material.BOW)) return;
|
||||||
|
|
||||||
//BOW SANITATION
|
//BOW SANITATION
|
||||||
ItemStack bow = event.getItem();
|
ItemStack bow = event.getItem();
|
||||||
if(!(bow.containsEnchantment(Enchantment.ARROW_KNOCKBACK))) return;
|
if(!(bow.containsEnchantment(Enchantment.ARROW_KNOCKBACK))) return;
|
||||||
if(!(bow.getEnchantmentLevel(Enchantment.ARROW_KNOCKBACK) == 3)) return;
|
if(!(bow.getEnchantmentLevel(Enchantment.ARROW_KNOCKBACK) == 3)) return;
|
||||||
if(!(bow.getItemMeta().getDisplayName().contains("BOOM BOW"))) return;
|
if(!(bow.getItemMeta().getDisplayName().contains("BOOM BOW"))) return;
|
||||||
|
|
||||||
//PLAYER SANITATION
|
//PLAYER SANITATION
|
||||||
Player player = event.getPlayer();
|
Player player = event.getPlayer();
|
||||||
if(player.getGameMode().equals(GameMode.CREATIVE))return;
|
if(player.getGameMode().equals(GameMode.CREATIVE))return;
|
||||||
|
|
||||||
if(bow.containsEnchantment(Enchantment.ARROW_INFINITE)){
|
if(bow.containsEnchantment(Enchantment.ARROW_INFINITE)){
|
||||||
//HAS INIFINITY
|
//HAS INIFINITY
|
||||||
Activate(event);
|
Activate(event);
|
||||||
|
|
||||||
}else if((player.getInventory().contains(Material.TNT))){
|
}else if((player.getInventory().contains(Material.TNT))){
|
||||||
//HAS TNT
|
//HAS TNT
|
||||||
Activate(event);
|
Activate(event);
|
||||||
|
|
||||||
//Reduce tnt by 1
|
//Reduce tnt by 1
|
||||||
int tntSlot = player.getInventory().first(Material.TNT);
|
int tntSlot = player.getInventory().first(Material.TNT);
|
||||||
ItemStack tntStack = player.getInventory().getItem(tntSlot);
|
ItemStack tntStack = player.getInventory().getItem(tntSlot);
|
||||||
if(tntStack.getAmount() > 3){
|
if(tntStack.getAmount() > 3){
|
||||||
tntStack.setAmount(tntStack.getAmount()-3);
|
tntStack.setAmount(tntStack.getAmount()-3);
|
||||||
}else{
|
}else{
|
||||||
player.getInventory().remove(tntStack);
|
player.getInventory().remove(tntStack);
|
||||||
}
|
}
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public void Activate(PlayerInteractEvent event){
|
public void Activate(PlayerInteractEvent event){
|
||||||
//INIT - Player variables
|
//INIT - Player variables
|
||||||
Player player = event.getPlayer();
|
Player player = event.getPlayer();
|
||||||
Location playerLocation = player.getLocation();
|
Location playerLocation = player.getLocation();
|
||||||
ItemStack boomBow = player.getInventory().getItemInMainHand();
|
ItemStack boomBow = player.getInventory().getItemInMainHand();
|
||||||
|
|
||||||
//TODO: NERF - boomDecay
|
//TODO: NERF - boomDecay
|
||||||
//TODO: NERF - endCrystal
|
//TODO: NERF - endCrystal
|
||||||
//TODO: NERF - healthReduction
|
//TODO: NERF - healthReduction
|
||||||
//TODO: NERF - localized
|
//TODO: NERF - localized
|
||||||
|
|
||||||
if(BoomBowRule.boomDecay)
|
if(BoomBowRule.boomDecay)
|
||||||
new BoomDecayTask(player).runTaskTimer(plugin, 1, 1);
|
new BoomDecayTask(player).runTaskTimer(plugin, 1, 1);
|
||||||
if(BoomBowRule.endCrystal){
|
if(BoomBowRule.endCrystal){
|
||||||
//BoomBowCyrstalSpawn
|
//BoomBowCyrstalSpawn
|
||||||
}
|
}
|
||||||
if(BoomBowRule.healthReduction){
|
if(BoomBowRule.healthReduction){
|
||||||
player.addPotionEffect(new PotionEffect(PotionEffectType.HEALTH_BOOST, 400, -1));
|
player.addPotionEffect(new PotionEffect(PotionEffectType.HEALTH_BOOST, 400, -1));
|
||||||
}
|
}
|
||||||
if(BoomBowRule.localized);
|
if(BoomBowRule.localized);
|
||||||
|
|
||||||
|
|
||||||
//SET - Player Velocity
|
//SET - Player Velocity
|
||||||
player.setVelocity(playerLocation.getDirection().normalize().multiply(3.0));
|
player.setVelocity(playerLocation.getDirection().normalize().multiply(3.0));
|
||||||
|
|
||||||
//CREATE - Explosion + damage
|
//CREATE - Explosion + damage
|
||||||
player.getWorld().playSound(playerLocation, Sound.ENTITY_GENERIC_EXPLODE, 10, -20);
|
player.getWorld().playSound(playerLocation, Sound.ENTITY_GENERIC_EXPLODE, 10, -20);
|
||||||
player.getWorld().spawnParticle(Particle.EXPLOSION_HUGE, playerLocation, 2);
|
player.getWorld().spawnParticle(Particle.EXPLOSION_HUGE, playerLocation, 2);
|
||||||
player.damage(7.42425, player);
|
player.damage(7.42425, player);
|
||||||
player.sendMessage(player.getLastDamage() + "");
|
player.sendMessage(player.getLastDamage() + "");
|
||||||
boomBow.setDurability((short) (boomBow.getDurability() + 3));
|
boomBow.setDurability((short) (boomBow.getDurability() + 3));
|
||||||
if(boomBow.getDurability() < 0){
|
if(boomBow.getDurability() < 0){
|
||||||
player.getInventory().setItemInMainHand(null);
|
player.getInventory().setItemInMainHand(null);
|
||||||
player.getWorld().playSound(playerLocation, Sound.ENTITY_ITEM_BREAK, 0, 0);
|
player.getWorld().playSound(playerLocation, Sound.ENTITY_ITEM_BREAK, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -1,84 +1,84 @@
|
||||||
package alisolarflare.magic.tricks;
|
package alisolarflare.magic;
|
||||||
|
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
import buttondevteam.lib.chat.TBMCCommandBase;
|
import buttondevteam.lib.chat.TBMCCommandBase;
|
||||||
//HEHEHHEHEH EAASSSTER EGGS
|
//HEHEHHEHEH EAASSSTER EGGS
|
||||||
public class BoomBowRule extends TBMCCommandBase{
|
public class BoomBowRule extends TBMCCommandBase{
|
||||||
public static boolean boomDecay;
|
public static boolean boomDecay;
|
||||||
public static boolean healthReduction;
|
public static boolean healthReduction;
|
||||||
public static boolean endCrystal;
|
public static boolean endCrystal;
|
||||||
public static boolean localized;;
|
public static boolean localized;;
|
||||||
@Override
|
@Override
|
||||||
public boolean OnCommand(CommandSender sender, String label, String[] args) {
|
public boolean OnCommand(CommandSender sender, String label, String[] args) {
|
||||||
if (sender instanceof Player == false){
|
if (sender instanceof Player == false){
|
||||||
sender.sendMessage("You must be a player to use this command");
|
sender.sendMessage("You must be a player to use this command");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
Player player = (Player) sender;
|
Player player = (Player) sender;
|
||||||
if (player.getName().equals("alisolarflare") == false){
|
if (player.getName().equals("alisolarflare") == false){
|
||||||
player.sendMessage("You must be alisolarflare to use this command");
|
player.sendMessage("You must be alisolarflare to use this command");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (args.length < 2){
|
if (args.length < 2){
|
||||||
player.sendMessage("Usage: /boomBowRule [rulename] [true/false]");
|
player.sendMessage("Usage: /boomBowRule [rulename] [true/false]");
|
||||||
player.sendMessage("Rules:");
|
player.sendMessage("Rules:");
|
||||||
player.sendMessage("boomDecay" + boomDecay);
|
player.sendMessage("boomDecay" + boomDecay);
|
||||||
player.sendMessage("healthReduction" + healthReduction);
|
player.sendMessage("healthReduction" + healthReduction);
|
||||||
player.sendMessage("endCrystal" + endCrystal);
|
player.sendMessage("endCrystal" + endCrystal);
|
||||||
player.sendMessage("localized" + localized);
|
player.sendMessage("localized" + localized);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if(!(args[1].startsWith("t")|| args[1].startsWith("f"))){
|
if(!(args[1].startsWith("t")|| args[1].startsWith("f"))){
|
||||||
player.sendMessage("Usage: /boomBowRule [rulename] [true/false]");
|
player.sendMessage("Usage: /boomBowRule [rulename] [true/false]");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
boolean gameRule = false;
|
boolean gameRule = false;
|
||||||
if(args[1].startsWith("t") || args[1].startsWith("T")){
|
if(args[1].startsWith("t") || args[1].startsWith("T")){
|
||||||
gameRule = true;
|
gameRule = true;
|
||||||
}
|
}
|
||||||
switch(args[0]){
|
switch(args[0]){
|
||||||
case "boomDecay":
|
case "boomDecay":
|
||||||
boomDecay = gameRule;
|
boomDecay = gameRule;
|
||||||
break;
|
break;
|
||||||
case "healthReduction":
|
case "healthReduction":
|
||||||
healthReduction = gameRule;
|
healthReduction = gameRule;
|
||||||
break;
|
break;
|
||||||
case "endCrystal":
|
case "endCrystal":
|
||||||
endCrystal = gameRule;
|
endCrystal = gameRule;
|
||||||
break;
|
break;
|
||||||
case "localized":
|
case "localized":
|
||||||
localized = gameRule;
|
localized = gameRule;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
player.sendMessage("Error: "+args[0]+" not defined as a rule");
|
player.sendMessage("Error: "+args[0]+" not defined as a rule");
|
||||||
player.sendMessage("Usage: /boomBowRule [rulename] [true/false]");
|
player.sendMessage("Usage: /boomBowRule [rulename] [true/false]");
|
||||||
player.sendMessage("Rule settings: boomDecay, healthReduction, endCrystal, localized");
|
player.sendMessage("Rule settings: boomDecay, healthReduction, endCrystal, localized");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
public String GetCommandPath() {
|
public String GetCommandPath() {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
public String[] GetHelpText(String arg0) {
|
public String[] GetHelpText(String arg0) {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
public boolean GetModOnly() {
|
public boolean GetModOnly() {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
public boolean GetPlayerOnly() {
|
public boolean GetPlayerOnly() {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
|
@ -1,25 +1,25 @@
|
||||||
package alisolarflare.magic.tricks;
|
package alisolarflare.magic;
|
||||||
|
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.scheduler.BukkitRunnable;
|
import org.bukkit.scheduler.BukkitRunnable;
|
||||||
|
|
||||||
public class BoomDecayTask extends BukkitRunnable{
|
public class BoomDecayTask extends BukkitRunnable{
|
||||||
Player player;
|
Player player;
|
||||||
private int ticksSinceStart = 0;
|
private int ticksSinceStart = 0;
|
||||||
private final int effectLength = 20;
|
private final int effectLength = 20;
|
||||||
public BoomDecayTask(Player player){
|
public BoomDecayTask(Player player){
|
||||||
this.player = player;
|
this.player = player;
|
||||||
}
|
}
|
||||||
//runs every tick
|
//runs every tick
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
if (ticksSinceStart > effectLength){
|
if (ticksSinceStart > effectLength){
|
||||||
this.cancel();
|
this.cancel();
|
||||||
}
|
}
|
||||||
player.sendMessage(player.getVelocity().toString());
|
player.sendMessage(player.getVelocity().toString());
|
||||||
|
|
||||||
ticksSinceStart++;
|
ticksSinceStart++;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
|
@ -3,9 +3,6 @@ package alisolarflare.magic;
|
||||||
import org.bukkit.plugin.java.JavaPlugin;
|
import org.bukkit.plugin.java.JavaPlugin;
|
||||||
|
|
||||||
import alisolarflare.Module;
|
import alisolarflare.Module;
|
||||||
import alisolarflare.magic.tricks.AliArrowListener;
|
|
||||||
import alisolarflare.magic.tricks.BoomBowDeathListener;
|
|
||||||
import alisolarflare.magic.tricks.BoomBowListener;
|
|
||||||
|
|
||||||
public class MagicModule extends Module{
|
public class MagicModule extends Module{
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue