pick 97420a31d The big reformat of 2020
This commit is contained in:
@@ -18,7 +18,6 @@
|
||||
|
||||
package appeng.me.helpers;
|
||||
|
||||
|
||||
import java.util.Optional;
|
||||
|
||||
import com.google.common.base.Preconditions;
|
||||
@@ -28,35 +27,29 @@ import net.minecraft.entity.player.PlayerEntity;
|
||||
import appeng.api.networking.security.IActionHost;
|
||||
import appeng.api.networking.security.IActionSource;
|
||||
|
||||
public class PlayerSource implements IActionSource {
|
||||
|
||||
public class PlayerSource implements IActionSource
|
||||
{
|
||||
private final PlayerEntity player;
|
||||
private final IActionHost via;
|
||||
|
||||
private final PlayerEntity player;
|
||||
private final IActionHost via;
|
||||
public PlayerSource(final PlayerEntity p, final IActionHost v) {
|
||||
Preconditions.checkNotNull(p);
|
||||
this.player = p;
|
||||
this.via = v;
|
||||
}
|
||||
|
||||
public PlayerSource( final PlayerEntity p, final IActionHost v )
|
||||
{
|
||||
Preconditions.checkNotNull( p );
|
||||
this.player = p;
|
||||
this.via = v;
|
||||
}
|
||||
@Override
|
||||
public Optional<PlayerEntity> player() {
|
||||
return Optional.of(this.player);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Optional<PlayerEntity> player()
|
||||
{
|
||||
return Optional.of( this.player );
|
||||
}
|
||||
@Override
|
||||
public Optional<IActionHost> machine() {
|
||||
return Optional.ofNullable(this.via);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Optional<IActionHost> machine()
|
||||
{
|
||||
return Optional.ofNullable( this.via );
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T> Optional<T> context( Class<T> key )
|
||||
{
|
||||
return Optional.empty();
|
||||
}
|
||||
@Override
|
||||
public <T> Optional<T> context(Class<T> key) {
|
||||
return Optional.empty();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user