big push
This commit is contained in:
@@ -1,28 +0,0 @@
|
||||
package com.jslightham.plugin1;
|
||||
|
||||
import org.bukkit.command.CommandExecutor;
|
||||
import org.bukkit.command.ConsoleCommandSender;
|
||||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
|
||||
import com.jslightham.plugin1.commands.HelloCommand;
|
||||
|
||||
public class Main extends JavaPlugin{
|
||||
|
||||
public int time = 2;
|
||||
private Time t = new Time(this);
|
||||
public static void main(String[] args) {
|
||||
|
||||
|
||||
}
|
||||
@Override
|
||||
public void onEnable() {
|
||||
t.getTime();
|
||||
this.getCommand("test").setExecutor((CommandExecutor)new HelloCommand());
|
||||
this.getCommand("healme").setExecutor((CommandExecutor)new CommandClass());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDisable() {
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
package com.jslightham.plugin1;
|
||||
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandExecutor;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
public class CommandClass implements CommandExecutor{
|
||||
|
||||
@Override
|
||||
public boolean onCommand(CommandSender sender, Command command, String arg2, String[] arg3) {
|
||||
if(command.getName().equals("heal")) {
|
||||
if(sender instanceof Player) {
|
||||
Player player = (Player) sender;
|
||||
}else {
|
||||
System.out.println("Command may only be executed by players. ");
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
package com.jslightham.plugin1;
|
||||
|
||||
public class Main {
|
||||
|
||||
public static void main(String[] args) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
package com.jslightham.plugin1;
|
||||
|
||||
import org.bukkit.command.CommandExecutor;
|
||||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
|
||||
import com.jslightham.plugin1.commands.HelloCommand;
|
||||
|
||||
public class Main extends JavaPlugin{
|
||||
|
||||
public static void main(String[] args) {
|
||||
|
||||
|
||||
}
|
||||
@Override
|
||||
public void onEnable() {
|
||||
this.getCommand("test").setExecutor((CommandExecutor)new HelloCommand());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDisable() {
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,26 +0,0 @@
|
||||
package com.jslightham.plugin1;
|
||||
|
||||
import org.bukkit.command.CommandExecutor;
|
||||
import org.bukkit.command.ConsoleCommandSender;
|
||||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
|
||||
import com.jslightham.plugin1.commands.HelloCommand;
|
||||
|
||||
public class Main extends JavaPlugin{
|
||||
|
||||
public int time = 2;
|
||||
public static void main(String[] args) {
|
||||
|
||||
|
||||
}
|
||||
@Override
|
||||
public void onEnable() {
|
||||
|
||||
this.getCommand("test").setExecutor((CommandExecutor)new HelloCommand());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDisable() {
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
package com.jslightham.plugin1;
|
||||
|
||||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
|
||||
public class Main extends JavaPlugin{
|
||||
|
||||
public static void main(String[] args) {
|
||||
|
||||
|
||||
}
|
||||
|
||||
public void onEnable() {
|
||||
}
|
||||
public void onDisable() {
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
package com.jslightham.plugin1;
|
||||
|
||||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
|
||||
public class Main extends JavaPlugin{
|
||||
|
||||
public static void main(String[] args) {
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
package com.jslightham.plugin1;
|
||||
|
||||
public class Time {
|
||||
|
||||
}
|
||||
@@ -1,27 +0,0 @@
|
||||
package com.jslightham.plugin1;
|
||||
|
||||
import org.bukkit.command.CommandExecutor;
|
||||
import org.bukkit.command.ConsoleCommandSender;
|
||||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
|
||||
import com.jslightham.plugin1.commands.HelloCommand;
|
||||
|
||||
public class Main extends JavaPlugin{
|
||||
|
||||
public int time = 2;
|
||||
private Time t = new Time(this);
|
||||
public static void main(String[] args) {
|
||||
|
||||
|
||||
}
|
||||
@Override
|
||||
public void onEnable() {
|
||||
|
||||
this.getCommand("test").setExecutor((CommandExecutor)new HelloCommand());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDisable() {
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
package com.jslightham.plugin1.commands;
|
||||
|
||||
public class HelloCommand {
|
||||
|
||||
}
|
||||
@@ -1,25 +0,0 @@
|
||||
package com.jslightham.plugin1;
|
||||
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandExecutor;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
public class CommandClass implements CommandExecutor{
|
||||
|
||||
@Override
|
||||
public boolean onCommand(CommandSender sender, Command command, String arg2, String[] arg3) {
|
||||
if(command.getName().equals("heal")) {
|
||||
if(sender instanceof Player) {
|
||||
Player player = (Player) sender;
|
||||
if(arg3.length > 0 && arg3[0] instaceof Integer) {
|
||||
|
||||
}
|
||||
}else {
|
||||
System.out.println("Command may only be executed by players. ");
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
package com.jslightham.plugin1.commands;
|
||||
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandExecutor;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import com.jslightham.plugin1.Main;
|
||||
|
||||
public class HelloCommand implements CommandExecutor{
|
||||
|
||||
@Override
|
||||
public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
|
||||
Player player = (Player) sender;
|
||||
if(sender instanceof Player)
|
||||
player.sendMessage("Hello there");
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -1,27 +0,0 @@
|
||||
package com.jslightham.plugin1;
|
||||
|
||||
import org.bukkit.command.CommandExecutor;
|
||||
import org.bukkit.command.ConsoleCommandSender;
|
||||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
|
||||
import com.jslightham.plugin1.commands.HelloCommand;
|
||||
|
||||
public class Main extends JavaPlugin{
|
||||
|
||||
public int time = 2;
|
||||
private Time time = new Time(this);
|
||||
public static void main(String[] args) {
|
||||
|
||||
|
||||
}
|
||||
@Override
|
||||
public void onEnable() {
|
||||
|
||||
this.getCommand("test").setExecutor((CommandExecutor)new HelloCommand());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDisable() {
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,28 +0,0 @@
|
||||
package com.jslightham.plugin1;
|
||||
|
||||
import org.bukkit.command.CommandExecutor;
|
||||
import org.bukkit.command.ConsoleCommandSender;
|
||||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
|
||||
import com.jslightham.plugin1.commands.HelloCommand;
|
||||
|
||||
public class Main extends JavaPlugin{
|
||||
|
||||
public int time = 2;
|
||||
private Time t = new Time(this);
|
||||
public static void main(String[] args) {
|
||||
|
||||
|
||||
}
|
||||
@Override
|
||||
public void onEnable() {
|
||||
t.getTime();
|
||||
this.getCommand("test").setExecutor((CommandExecutor)new HelloCommand());
|
||||
this.getCommand("heal").setExecutor((CommandExecutor)new CommandClass());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDisable() {
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,27 +0,0 @@
|
||||
package com.jslightham.plugin1.commands;
|
||||
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandExecutor;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import com.jslightham.plugin1.Main;
|
||||
|
||||
public class HelloCommand implements CommandExecutor{
|
||||
private Main plugin;
|
||||
|
||||
public HelloCommand(Main plugin) {
|
||||
this.plugin = plugin;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
|
||||
Player player = (Player) sender;
|
||||
if(sender instanceof Player)
|
||||
player.sendMessage("Hello there");
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -1,25 +0,0 @@
|
||||
package com.jslightham.plugin1.commands;
|
||||
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandExecutor;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import com.jslightham.plugin1.Main;
|
||||
|
||||
public class HelloCommand implements CommandExecutor{
|
||||
private Main plugin;
|
||||
|
||||
public HelloCommand(Main plugin) {
|
||||
this.plugin = plugin;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
|
||||
Player player = (Player) sender;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -1,29 +0,0 @@
|
||||
package com.jslightham.plugin1;
|
||||
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandExecutor;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
public class CommandClass implements CommandExecutor{
|
||||
|
||||
@Override
|
||||
public boolean onCommand(CommandSender sender, Command command, String arg2, String[] arg3) {
|
||||
if(command.getName().equals("heal")) {
|
||||
if(sender instanceof Player) {
|
||||
Player player = (Player) sender;
|
||||
if(arg3.length > 0) {
|
||||
try {
|
||||
player.setHealth(Integer.parseInt(arg3[0]));
|
||||
}catch (Exception e) {
|
||||
player.sendMessage("That is not a valid health!");
|
||||
}
|
||||
}
|
||||
}else {
|
||||
System.out.println("Command may only be executed by players. ");
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
package com.jslightham.plugin1;
|
||||
|
||||
public class CommandClass {
|
||||
|
||||
}
|
||||
@@ -1,25 +0,0 @@
|
||||
package com.jslightham.plugin1;
|
||||
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandExecutor;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
public class CommandClass implements CommandExecutor{
|
||||
|
||||
@Override
|
||||
public boolean onCommand(CommandSender sender, Command command, String arg2, String[] arg3) {
|
||||
if(command.getName().equals("heal")) {
|
||||
if(sender instanceof Player) {
|
||||
Player player = (Player) sender;
|
||||
if(arg3.length > 0) {
|
||||
|
||||
}
|
||||
}else {
|
||||
System.out.println("Command may only be executed by players. ");
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
package com.jslightham.plugin1.commands;
|
||||
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandExecutor;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
public class HelloCommand implements CommandExecutor{
|
||||
|
||||
@Override
|
||||
public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
|
||||
Player player = (Player) sender;
|
||||
if(sender instanceof Player)
|
||||
player.sendMessage("Hello there");
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -1,27 +0,0 @@
|
||||
package com.jslightham.plugin1;
|
||||
|
||||
import org.bukkit.command.CommandExecutor;
|
||||
import org.bukkit.command.ConsoleCommandSender;
|
||||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
|
||||
import com.jslightham.plugin1.commands.HelloCommand;
|
||||
|
||||
public class Main extends JavaPlugin{
|
||||
|
||||
public int time = 2;
|
||||
private Time t = new Time(this);
|
||||
public static void main(String[] args) {
|
||||
|
||||
|
||||
}
|
||||
@Override
|
||||
public void onEnable() {
|
||||
t.getTime();
|
||||
this.getCommand("test").setExecutor((CommandExecutor)new HelloCommand());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDisable() {
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,25 +0,0 @@
|
||||
package com.jslightham.plugin1;
|
||||
|
||||
import org.bukkit.command.CommandExecutor;
|
||||
import org.bukkit.command.ConsoleCommandSender;
|
||||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
|
||||
import com.jslightham.plugin1.commands.HelloCommand;
|
||||
|
||||
public class Main extends JavaPlugin{
|
||||
|
||||
public static void main(String[] args) {
|
||||
|
||||
|
||||
}
|
||||
@Override
|
||||
public void onEnable() {
|
||||
|
||||
this.getCommand("test").setExecutor((CommandExecutor)new HelloCommand());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDisable() {
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
package com.jslightham.plugin1;
|
||||
|
||||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
|
||||
public class Main extends JavaPlugin{
|
||||
|
||||
public static void main(String[] args) {
|
||||
|
||||
|
||||
}
|
||||
@Override
|
||||
public void onEnable() {
|
||||
this.getCommand("test").setExecutor((CommandExecutor)new HelloCommand());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDisable() {
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
package com.jslightham.plugin1;
|
||||
|
||||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
|
||||
public class Main extends JavaPlugin{
|
||||
|
||||
public static void main(String[] args) {
|
||||
|
||||
|
||||
}
|
||||
@Override
|
||||
public void onEnable() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDisable() {
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
name: Plugin1
|
||||
version: 1.0
|
||||
main: com.jslightham.plugin1.Main
|
||||
description: Test1!
|
||||
|
||||
commands:
|
||||
test:
|
||||
usage: /<command>
|
||||
@@ -1,23 +0,0 @@
|
||||
package com.jslightham.plugin1;
|
||||
|
||||
import org.bukkit.command.CommandExecutor;
|
||||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
|
||||
import com.jslightham.plugin1.commands.HelloCommand;
|
||||
|
||||
public class Main extends JavaPlugin{
|
||||
|
||||
public static void main(String[] args) {
|
||||
|
||||
|
||||
}
|
||||
@Override
|
||||
public void onEnable() {
|
||||
this.getCommand("test").setExecutor((CommandExecutor)new HelloCommand());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDisable() {
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
eclipse.preferences.version=1
|
||||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
|
||||
org.eclipse.jdt.core.compiler.compliance=1.8
|
||||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.source=1.8
|
||||
@@ -1,25 +0,0 @@
|
||||
package com.jslightham.plugin1;
|
||||
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandExecutor;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
public class CommandClass implements CommandExecutor{
|
||||
|
||||
@Override
|
||||
public boolean onCommand(CommandSender sender, Command command, String arg2, String[] arg3) {
|
||||
if(command.getName().equals("heal")) {
|
||||
if(sender instanceof Player) {
|
||||
Player player = (Player) sender;
|
||||
if(arg3.length > 0 && arg3[0] instaceof int) {
|
||||
|
||||
}
|
||||
}else {
|
||||
System.out.println("Command may only be executed by players. ");
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
package com.jslightham.plugin1;
|
||||
|
||||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
|
||||
public class Main extends JavaPlugin{
|
||||
|
||||
public static void main(String[] args) {
|
||||
|
||||
|
||||
}
|
||||
|
||||
public void onEnable() {
|
||||
|
||||
}
|
||||
|
||||
public void onDisable() {
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,29 +0,0 @@
|
||||
package com.jslightham.plugin1;
|
||||
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandExecutor;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
public class CommandClass implements CommandExecutor{
|
||||
|
||||
@Override
|
||||
public boolean onCommand(CommandSender sender, Command command, String arg2, String[] arg3) {
|
||||
if(command.getName().equals("heal")) {
|
||||
if(sender instanceof Player) {
|
||||
Player player = (Player) sender;
|
||||
if(arg3.length > 0) {
|
||||
try {
|
||||
player.setHealth(Integer.parseInt(arg3[0]));
|
||||
}catch (Exception e) {
|
||||
|
||||
}
|
||||
}
|
||||
}else {
|
||||
System.out.println("Command may only be executed by players. ");
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user