Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public final class RegionSelector {
- private final Object lock = new Object();
- private final long sessionLifetime;
- private final Int2ObjectMap<SelectorSession> sessions;
- private final int borderBlock;
- private final Int2ObjectMap<Set<Vector3>> borders;
- private final Field interfaz;
- private final boolean async;
- @SuppressWarnings("unchecked")
- public RegionSelector(long sessionLifetime, Block borderBlock, boolean async) {
- this.sessions = new Int2ObjectArrayMap<>();
- this.borders = new Int2ObjectArrayMap<>();
- this.borders.defaultReturnValue(Collections.EMPTY_SET);
- this.sessionLifetime = sessionLifetime;
- this.borderBlock = GlobalBlockPalette.getOrCreateRuntimeId(borderBlock.getId(), borderBlock.getDamage());
- this.async = async;
- Field interfaz = null;
- if (async) {
- try {
- interfaz = Player.class.getDeclaredField("interfaz");
- interfaz.setAccessible(true);
- } catch (NoSuchFieldException | SecurityException ignore) {
- }
- }
- this.interfaz = interfaz;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement