mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-07-12 15:38:35 +00:00
Add and apply .editorconfig from P2 (#1195)
* Consistenty use javax annotations. - Unfortunately jetbrains annotations seem to be exposed transitively via core somewhere, but with the correct IDE settings, annotations can be defaulted to javax - Cleaning up of import order in #1195 - Must be merged before #1195 * Add and apply .editorconfig from P2 - Does not rearrange entries * Address some comments * add back some javadoc comments * Address final comments Co-authored-by: NotMyFault <mc.cache@web.de>
This commit is contained in:
@ -55,8 +55,8 @@ public class ClipboardHolder {
|
||||
* not contain its effect.
|
||||
* </p>
|
||||
*
|
||||
* @deprecated FAWE supports multiple loaded schematics {@link #getClipboards()}
|
||||
* @return the clipboard
|
||||
* @deprecated FAWE supports multiple loaded schematics {@link #getClipboards()}
|
||||
*/
|
||||
@Deprecated
|
||||
public Clipboard getClipboard() {
|
||||
@ -64,8 +64,10 @@ public class ClipboardHolder {
|
||||
}
|
||||
|
||||
//FAWE start
|
||||
|
||||
/**
|
||||
* Gets all currently held clipboards.
|
||||
*
|
||||
* @return all clipboards being held.
|
||||
*/
|
||||
public List<Clipboard> getClipboards() {
|
||||
@ -78,8 +80,9 @@ public class ClipboardHolder {
|
||||
|
||||
/**
|
||||
* Gets all end ClipboardHolders<br/>
|
||||
* - Usually this will return itself.<br/>
|
||||
* - If this is a multi clipboard, it will return the children
|
||||
* - Usually this will return itself.<br/>
|
||||
* - If this is a multi clipboard, it will return the children
|
||||
*
|
||||
* @return a List of end ClipboardHolders
|
||||
*/
|
||||
public List<ClipboardHolder> getHolders() {
|
||||
@ -123,5 +126,4 @@ public class ClipboardHolder {
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
@ -56,7 +56,7 @@ public class PasteBuilder {
|
||||
/**
|
||||
* Create a new instance.
|
||||
*
|
||||
* @param holder the clipboard holder
|
||||
* @param holder the clipboard holder
|
||||
* @param targetExtent an extent
|
||||
*/
|
||||
PasteBuilder(ClipboardHolder holder, Extent targetExtent) {
|
||||
|
@ -44,6 +44,7 @@ import com.sk89q.worldedit.world.item.ItemType;
|
||||
import com.sk89q.worldedit.world.item.ItemTypes;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.HashMap;
|
||||
@ -53,7 +54,6 @@ import java.util.Timer;
|
||||
import java.util.TimerTask;
|
||||
import java.util.UUID;
|
||||
import java.util.concurrent.Callable;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import static com.google.common.base.Preconditions.checkNotNull;
|
||||
|
||||
@ -221,7 +221,8 @@ public class SessionManager {
|
||||
return false;
|
||||
}
|
||||
|
||||
private void setDefaultWand(String sessionItem, String configItem, LocalSession session, Tool wand) throws InvalidToolBindException {
|
||||
private void setDefaultWand(String sessionItem, String configItem, LocalSession session, Tool wand) throws
|
||||
InvalidToolBindException {
|
||||
ItemType wandItem = null;
|
||||
if (sessionItem != null) {
|
||||
wandItem = ItemTypes.get(sessionItem);
|
||||
@ -373,6 +374,7 @@ public class SessionManager {
|
||||
* Stores the owner of a session, the session, and the last active time.
|
||||
*/
|
||||
private static final class SessionHolder {
|
||||
|
||||
private final SessionKey key;
|
||||
private final LocalSession session;
|
||||
private long lastActive = System.currentTimeMillis();
|
||||
@ -382,6 +384,7 @@ public class SessionManager {
|
||||
this.key = key;
|
||||
this.session = session;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@ -389,12 +392,14 @@ public class SessionManager {
|
||||
* of time. Commits them as well.
|
||||
*/
|
||||
private class SessionTracker extends TimerTask {
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
synchronized (SessionManager.this) {
|
||||
saveChangedSessions();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -39,4 +39,5 @@ public class TransientSessionException extends Exception {
|
||||
public TransientSessionException(Throwable cause) {
|
||||
super(cause);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -124,6 +124,7 @@ public final class Request {
|
||||
}
|
||||
|
||||
//FAWE start
|
||||
|
||||
/**
|
||||
* Get the request session.
|
||||
*
|
||||
@ -185,4 +186,5 @@ public final class Request {
|
||||
private void invalidate() {
|
||||
valid = false;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -34,8 +34,8 @@ import com.sk89q.worldedit.world.block.BaseBlock;
|
||||
import com.sk89q.worldedit.world.block.BlockState;
|
||||
import com.sk89q.worldedit.world.block.BlockStateHolder;
|
||||
|
||||
import java.util.List;
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.List;
|
||||
|
||||
public class RequestExtent implements Extent {
|
||||
|
||||
@ -99,7 +99,7 @@ public class RequestExtent implements Extent {
|
||||
|
||||
@Override
|
||||
public <T extends BlockStateHolder<T>> boolean setBlock(int x, int y, int z, T block)
|
||||
throws WorldEditException {
|
||||
throws WorldEditException {
|
||||
return getExtent().setBlock(x, y, z, block);
|
||||
}
|
||||
|
||||
@ -132,4 +132,5 @@ public class RequestExtent implements Extent {
|
||||
request = null;
|
||||
return commit;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -48,7 +48,7 @@ public interface SessionStore {
|
||||
/**
|
||||
* Save the given session identified by the given UUID.
|
||||
*
|
||||
* @param id the UUID
|
||||
* @param id the UUID
|
||||
* @param session a session
|
||||
* @throws IOException thrown on read error
|
||||
*/
|
||||
|
Reference in New Issue
Block a user