mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-04-10 01:36:19 +00:00
improve CommandSender API
This commit is contained in:
@@ -5,11 +5,19 @@
|
||||
* reference the LICENSE file in the common/api directory.
|
||||
*/
|
||||
|
||||
package com.dfsek.terra.api.entity;
|
||||
package com.dfsek.terra.api.command;
|
||||
|
||||
import com.dfsek.terra.api.Handle;
|
||||
import com.dfsek.terra.api.entity.Entity;
|
||||
import com.dfsek.terra.api.entity.Player;
|
||||
|
||||
import java.util.Optional;
|
||||
|
||||
|
||||
public interface CommandSender extends Handle {
|
||||
void sendMessage(String message);
|
||||
|
||||
Optional<Entity> getEntity();
|
||||
|
||||
Optional<Player> getPlayer();
|
||||
}
|
||||
@@ -7,11 +7,12 @@
|
||||
|
||||
package com.dfsek.terra.api.entity;
|
||||
|
||||
import com.dfsek.terra.api.Handle;
|
||||
import com.dfsek.terra.api.util.vector.Vector3;
|
||||
import com.dfsek.terra.api.world.ServerWorld;
|
||||
|
||||
|
||||
public interface Entity extends CommandSender {
|
||||
public interface Entity extends Handle {
|
||||
Vector3 position();
|
||||
|
||||
void position(Vector3 position);
|
||||
|
||||
@@ -2,7 +2,7 @@ package com.dfsek.terra.api.event.events.platform;
|
||||
|
||||
import cloud.commandframework.CommandManager;
|
||||
|
||||
import com.dfsek.terra.api.entity.CommandSender;
|
||||
import com.dfsek.terra.api.command.CommandSender;
|
||||
import com.dfsek.terra.api.event.events.Event;
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user