commit
30b6948d42
@ -0,0 +1,7 @@ |
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<classpath> |
||||
<classpathentry kind="src" path="src"/> |
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/> |
||||
<classpathentry kind="lib" path="C:/Users/sigon/Downloads/vogog/spigot-1.9.2-R0.1-SNAPSHOT.jar"/> |
||||
<classpathentry kind="output" path="bin"/> |
||||
</classpath> |
@ -0,0 +1 @@ |
||||
/bin/ |
@ -0,0 +1,17 @@ |
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<projectDescription> |
||||
<name>TwosideKeeper4</name> |
||||
<comment></comment> |
||||
<projects> |
||||
</projects> |
||||
<buildSpec> |
||||
<buildCommand> |
||||
<name>org.eclipse.jdt.core.javabuilder</name> |
||||
<arguments> |
||||
</arguments> |
||||
</buildCommand> |
||||
</buildSpec> |
||||
<natures> |
||||
<nature>org.eclipse.jdt.core.javanature</nature> |
||||
</natures> |
||||
</projectDescription> |
@ -0,0 +1,11 @@ |
||||
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.codegen.unusedLocal=preserve |
||||
org.eclipse.jdt.core.compiler.compliance=1.8 |
||||
org.eclipse.jdt.core.compiler.debug.lineNumber=generate |
||||
org.eclipse.jdt.core.compiler.debug.localVariable=generate |
||||
org.eclipse.jdt.core.compiler.debug.sourceFile=generate |
||||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error |
||||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error |
||||
org.eclipse.jdt.core.compiler.source=1.8 |
@ -0,0 +1,10 @@ |
||||
name: TwosideKeeper4 |
||||
main: sig.plugin.TwosideKeeper.TwosideKeeper4.main |
||||
version: 3.99a |
||||
loadbefore: [aPlugin] |
||||
commands: |
||||
scan: |
||||
description: Analyzes the item found above the block you are looking at. |
||||
usage: /scan |
||||
permission: TwosideKeeper.admin |
||||
permission-message: You don't have permission to scan a block. |
@ -0,0 +1,21 @@ |
||||
package sig.plugin.TwosideKeeper.TwosideKeeper4.advanced; |
||||
|
||||
import org.bukkit.block.Block; |
||||
import org.bukkit.entity.Item; |
||||
|
||||
public class AdvancedBlock{ |
||||
Block b; |
||||
Item holdingitem; |
||||
|
||||
public AdvancedBlock(Block b) { |
||||
this.b = b; |
||||
this.holdingitem = getItemAboveBlock(); |
||||
} |
||||
|
||||
private Item getItemAboveBlock() { |
||||
Entity[] ents = getNearbyEntities(1); |
||||
return null; |
||||
} |
||||
|
||||
|
||||
} |
@ -0,0 +1,29 @@ |
||||
package sig.plugin.TwosideKeeper.TwosideKeeper4.advanced; |
||||
|
||||
import java.util.Collection; |
||||
import java.util.function.Predicate; |
||||
|
||||
import org.bukkit.Location; |
||||
import org.bukkit.block.Block; |
||||
import org.bukkit.entity.Entity; |
||||
|
||||
public class AdvancedLocation { |
||||
Location l; |
||||
|
||||
public AdvancedLocation(Block b) { |
||||
this(b.getLocation()); |
||||
} |
||||
|
||||
public AdvancedLocation(Entity e) { |
||||
this(e.getLocation()); |
||||
} |
||||
|
||||
public AdvancedLocation(Location l) { |
||||
this.l = l; |
||||
} |
||||
|
||||
public Collection<Entity> getNearbyEntities(double distance) { |
||||
return l.getWorld().getNearbyEntities(l, distance, distance, distance).removeIf()) |
||||
} |
||||
|
||||
} |
@ -0,0 +1,22 @@ |
||||
package sig.plugin.TwosideKeeper.TwosideKeeper4.commands; |
||||
|
||||
import org.bukkit.command.Command; |
||||
import org.bukkit.command.CommandSender; |
||||
|
||||
public class CommandHandler { |
||||
CommandSender sender; |
||||
Command cmd; |
||||
String label; |
||||
String[] args; |
||||
|
||||
public CommandHandler(CommandSender sender, Command command, String label, String[] args) { |
||||
this.sender = sender; |
||||
this.cmd = command; |
||||
this.label = label; |
||||
this.args = args; |
||||
} |
||||
|
||||
public boolean runCommand() { |
||||
|
||||
} |
||||
} |
@ -0,0 +1,12 @@ |
||||
package sig.plugin.TwosideKeeper.TwosideKeeper4.commands; |
||||
|
||||
public enum CommandResult { |
||||
OKAY("Command executed with no issues."), |
||||
NOTAPLAYER("This command can only be issued by a player!"); |
||||
|
||||
String response; |
||||
|
||||
CommandResult(String response) { |
||||
this.response = response; |
||||
} |
||||
} |
@ -0,0 +1,22 @@ |
||||
package sig.plugin.TwosideKeeper.TwosideKeeper4.commands; |
||||
|
||||
import org.bukkit.command.CommandSender; |
||||
import org.bukkit.entity.Player; |
||||
|
||||
public class ScanCommand { |
||||
CommandSender p; |
||||
|
||||
public ScanCommand(CommandSender sender) { |
||||
this.p = sender; |
||||
} |
||||
|
||||
public CommandResult runCommand() { |
||||
if (p instanceof Player) { |
||||
//Get block looking at and get item.
|
||||
Item i = |
||||
return CommandResult.OKAY; |
||||
} else { |
||||
return CommandResult.NOTAPLAYER; |
||||
} |
||||
} |
||||
} |
@ -0,0 +1,15 @@ |
||||
package sig.plugin.TwosideKeeper.TwosideKeeper4; |
||||
|
||||
import org.bukkit.command.Command; |
||||
import org.bukkit.command.CommandSender; |
||||
import org.bukkit.plugin.java.JavaPlugin; |
||||
|
||||
import sig.plugin.TwosideKeeper.TwosideKeeper4.commands.CommandHandler; |
||||
|
||||
public class main extends JavaPlugin{ |
||||
|
||||
@Override |
||||
public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) { |
||||
return (new CommandHandler(sender,cmd,label,args)).runCommand(); |
||||
} |
||||
} |
Loading…
Reference in new issue