-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3dfd7ff
commit e272db9
Showing
23 changed files
with
319 additions
and
504 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
name: Atlas | ||
main: cc.funkemunky.api.Atlas | ||
version: 1.1.3.1 | ||
version: 1.1.3.2 | ||
author: funkemunky | ||
commands: | ||
atlas: |
Binary file not shown.
Binary file modified
BIN
+394 Bytes
(120%)
API/out/production/API/cc/funkemunky/api/commands/ancmd/CommandAdapter.class
Binary file not shown.
Binary file modified
BIN
+1.17 KB
(110%)
API/out/production/API/cc/funkemunky/api/commands/ancmd/CommandManager.class
Binary file not shown.
Binary file modified
BIN
+43 Bytes
(100%)
API/out/production/API/cc/funkemunky/api/commands/ancmd/SpigotCompleter.class
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
API/out/production/API/cc/funkemunky/api/updater/Updater.class
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
name: Atlas | ||
main: cc.funkemunky.api.Atlas | ||
version: 1.1.3.1 | ||
version: 1.1.3.2 | ||
author: funkemunky | ||
commands: | ||
atlas: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<module type="JAVA_MODULE" version="4"> | ||
<component name="NewModuleRootManager" inherit-compiler-output="true"> | ||
<exclude-output /> | ||
<content url="file://$MODULE_DIR$"> | ||
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" /> | ||
<sourceFolder url="file://$MODULE_DIR$/resources" type="java-resource" /> | ||
</content> | ||
<orderEntry type="inheritedJdk" /> | ||
<orderEntry type="sourceFolder" forTests="false" /> | ||
<orderEntry type="library" name="lombok-1.18.0" level="project" /> | ||
<orderEntry type="library" name="spigot-1.8.8-R0.1-SNAPSHOT" level="project" /> | ||
<orderEntry type="library" name="Atlas" level="project" /> | ||
</component> | ||
</module> |
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+1.72 KB
Example/out/production/Example/cc/funkemunky/example/commands/ExampleCommand.class
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
name: ExamplePlugin | ||
main: cc.funkemunky.example.Example | ||
description: An Atlas example plugin. | ||
version: 1.0 | ||
author: funkemunky |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
name: ExamplePlugin | ||
main: cc.funkemunky.example.Example | ||
description: An Atlas example plugin. | ||
version: 1.0 | ||
author: funkemunky |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package cc.funkemunky.example; | ||
|
||
import cc.funkemunky.api.Atlas; | ||
import org.bukkit.plugin.java.JavaPlugin; | ||
|
||
public class Example extends JavaPlugin { | ||
|
||
public void onEnable() { | ||
Atlas.getInstance().initializeScanner(getClass(), this, Atlas.getInstance().getCommandManager()); | ||
} | ||
} |
22 changes: 22 additions & 0 deletions
22
Example/src/cc/funkemunky/example/commands/ExampleCommand.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package cc.funkemunky.example.commands; | ||
|
||
import cc.funkemunky.api.Atlas; | ||
import cc.funkemunky.api.commands.ancmd.Command; | ||
import cc.funkemunky.api.commands.ancmd.CommandAdapter; | ||
import cc.funkemunky.api.utils.Init; | ||
|
||
@Init(commands = true) //This is needed to signify to the class scanner we implemented in the main class that there are commands to register here. | ||
public class ExampleCommand { | ||
|
||
//Runs the help message for the main commmand "/command". | ||
@Command(name = "command", display = "Example Command", description = "show the help page.", permission = "cmd.perm", aliases = "aCommand") | ||
public void onCommand(CommandAdapter command) { | ||
Atlas.getInstance().getCommandManager().runHelpMessage(command, command.getSender(), Atlas.getInstance().getCommandManager().getDefaultScheme()); | ||
} | ||
|
||
//One of the arguments for "/command". Run as "/command arg1". | ||
@Command(name = "command.arg1", display = "arg1", permission = "cmd.perm.arg1", description = "view a test argument in action.") | ||
public void onCommandArg(CommandAdapter command) { | ||
command.getSender().sendMessage("You can an argument of the example command."); | ||
} | ||
} |
22 changes: 22 additions & 0 deletions
22
Example/src/cc/funkemunky/example/event/CustomMoveEvent.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package cc.funkemunky.example.event; | ||
|
||
import cc.funkemunky.api.event.system.Cancellable; | ||
import cc.funkemunky.api.event.system.Event; | ||
import lombok.Getter; | ||
import lombok.Setter; | ||
import org.bukkit.Location; | ||
import org.bukkit.entity.Player; | ||
|
||
@Getter | ||
@Setter | ||
public class CustomMoveEvent extends Event implements Cancellable { | ||
private Player player; | ||
private Location to, from; | ||
private boolean cancelled; | ||
|
||
public CustomMoveEvent(Player player, Location to, Location from) { | ||
this.player = player; | ||
this.to = to; | ||
this.from = from; | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
Example/src/cc/funkemunky/example/listeners/atlas/CustomMoveListeners.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package cc.funkemunky.example.listeners.atlas; | ||
|
||
import cc.funkemunky.api.event.system.EventMethod; | ||
import cc.funkemunky.api.event.system.Listener; | ||
import cc.funkemunky.api.utils.Init; | ||
import cc.funkemunky.example.event.CustomMoveEvent; | ||
|
||
@Init | ||
public class CustomMoveListeners implements Listener { | ||
|
||
@EventMethod | ||
public void onEvent(CustomMoveEvent event) { | ||
event.getPlayer().sendMessage("Custom move event."); | ||
} | ||
} |
21 changes: 21 additions & 0 deletions
21
Example/src/cc/funkemunky/example/listeners/bukkit/MoveListeners.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package cc.funkemunky.example.listeners.bukkit; | ||
|
||
import cc.funkemunky.api.event.system.EventManager; | ||
import cc.funkemunky.api.utils.Init; | ||
import cc.funkemunky.example.event.CustomMoveEvent; | ||
import org.bukkit.event.EventHandler; | ||
import org.bukkit.event.Listener; | ||
import org.bukkit.event.player.PlayerMoveEvent; | ||
|
||
@Init | ||
public class MoveListeners implements Listener { | ||
|
||
|
||
@EventHandler | ||
public void onEvent(PlayerMoveEvent event) { | ||
CustomMoveEvent move = new CustomMoveEvent(event.getPlayer(), event.getTo(), event.getFrom()); | ||
EventManager.callEvent(move); | ||
|
||
event.setCancelled(move.isCancelled()); | ||
} | ||
} |