11package eu .pb4 .placeholders .api ;
22
33import com .mojang .authlib .GameProfile ;
4- import eu .pb4 .placeholders .impl .PlaceholderContextImpl ;
4+ import eu .pb4 .placeholders .impl .ServerPlaceholderContextImpl ;
55import net .minecraft .commands .CommandSource ;
66import net .minecraft .commands .CommandSourceStack ;
77import net .minecraft .network .chat .Component ;
@@ -22,7 +22,7 @@ static ServerPlaceholderContext of(MinecraftServer server) {
2222 }
2323
2424 static ServerPlaceholderContext of (MinecraftServer server , ViewObject view ) {
25- return new PlaceholderContextImpl (server , server ::createCommandSourceStack , null , null , null , null , view );
25+ return new ServerPlaceholderContextImpl (server , server ::createCommandSourceStack , null , null , null , null , view );
2626 }
2727
2828 static ServerPlaceholderContext of (GameProfile profile , MinecraftServer server ) {
@@ -31,23 +31,23 @@ static ServerPlaceholderContext of(GameProfile profile, MinecraftServer server)
3131
3232 static ServerPlaceholderContext of (GameProfile profile , MinecraftServer server , ViewObject view ) {
3333 var name = profile .name () != null ? profile .name () : profile .id ().toString ();
34- return new PlaceholderContextImpl (server , () -> new CommandSourceStack (CommandSource .NULL , Vec3 .ZERO , Vec2 .ZERO , server .overworld (), server .getProfilePermissions (new NameAndId (profile )), name , Component .literal (name ), server , null ), null , null , null , profile , view );
34+ return new ServerPlaceholderContextImpl (server , () -> new CommandSourceStack (CommandSource .NULL , Vec3 .ZERO , Vec2 .ZERO , server .overworld (), server .getProfilePermissions (new NameAndId (profile )), name , Component .literal (name ), server , null ), null , null , null , profile , view );
3535 }
3636
3737 static ServerPlaceholderContext of (ServerPlayer player ) {
3838 return of (player , ViewObject .DEFAULT );
3939 }
4040
4141 static ServerPlaceholderContext of (ServerPlayer player , ViewObject view ) {
42- return new PlaceholderContextImpl (player .level ().getServer (), player ::createCommandSourceStack , player .level (), player , player , player .getGameProfile (), view );
42+ return new ServerPlaceholderContextImpl (player .level ().getServer (), player ::createCommandSourceStack , player .level (), player , player , player .getGameProfile (), view );
4343 }
4444
4545 static ServerPlaceholderContext of (CommandSourceStack source ) {
4646 return of (source , ViewObject .DEFAULT );
4747 }
4848
4949 static ServerPlaceholderContext of (CommandSourceStack source , ViewObject view ) {
50- return new PlaceholderContextImpl (source .getServer (), () -> source , source .getLevel (), source .getPlayer (), source .getEntity (), source .getPlayer () != null ? source .getPlayer ().getGameProfile () : null , view );
50+ return new ServerPlaceholderContextImpl (source .getServer (), () -> source , source .getLevel (), source .getPlayer (), source .getEntity (), source .getPlayer () != null ? source .getPlayer ().getGameProfile () : null , view );
5151 }
5252
5353 static ServerPlaceholderContext of (Entity entity ) {
@@ -59,7 +59,7 @@ static ServerPlaceholderContext of(Entity entity, ViewObject view) {
5959 return of (player , view );
6060 } else {
6161 var world = (ServerLevel ) entity .level ();
62- return new PlaceholderContextImpl (world .getServer (), () -> entity .createCommandSourceStackForNameResolution (world ), world , null , entity , null , view );
62+ return new ServerPlaceholderContextImpl (world .getServer (), () -> entity .createCommandSourceStackForNameResolution (world ), world , null , entity , null , view );
6363 }
6464 }
6565
0 commit comments