Start work on improving the formatting system. May switch to Kashike's as Bukkit is shit

This commit is contained in:
Matthew Miller
2019-04-14 19:33:44 +10:00
parent b5e1f3dbc3
commit 3e4004ad9e
10 changed files with 173 additions and 36 deletions

View File

@ -23,6 +23,7 @@ import com.sk89q.worldedit.internal.cui.CUIEvent;
import com.sk89q.worldedit.session.SessionOwner;
import com.sk89q.worldedit.util.Identifiable;
import com.sk89q.worldedit.util.auth.Subject;
import com.sk89q.worldedit.util.formatting.Fragment;
import java.io.File;
@ -75,6 +76,13 @@ public interface Actor extends Identifiable, SessionOwner, Subject {
*/
void printError(String msg);
/**
* Print a {@link Fragment}.
*
* @param fragment The fragment to print
*/
void print(Fragment fragment);
/**
* Returns true if the actor can destroy bedrock.
*

View File

@ -31,6 +31,7 @@ import com.sk89q.worldedit.math.Vector3;
import com.sk89q.worldedit.session.SessionKey;
import com.sk89q.worldedit.util.HandSide;
import com.sk89q.worldedit.util.Location;
import com.sk89q.worldedit.util.formatting.Fragment;
import com.sk89q.worldedit.world.World;
import com.sk89q.worldedit.world.block.BlockStateHolder;
import com.sk89q.worldedit.world.gamemode.GameMode;
@ -132,6 +133,11 @@ class PlayerProxy extends AbstractPlayerActor {
basePlayer.printError(msg);
}
@Override
public void print(Fragment fragment) {
basePlayer.print(fragment);
}
@Override
public String[] getGroups() {
return permActor.getGroups();