mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-07-13 14:48:34 +00:00
Javadoc and Formatting fixes. (#619)
Javadoc and Formatting fixes. Also, extremely minor code changes which have been tested. This commit is only part one of two commits that aim to fix problems with formatting in our project. In part two I will modify the Google Java Style Guide (since it closely matches our code style) for our project so there is guidance on how to format and document. * Updated PlotSquared URL * Removed plugin acronyms * Fixed a typo * Fixed grammar * Use modern block id's * Update YouTube video URL
This commit is contained in:
@ -137,7 +137,7 @@ public class LocalSession implements TextureHolder {
|
||||
private transient final Object clipboardLock = new Object();
|
||||
private transient boolean superPickaxe = false;
|
||||
private transient BlockTool pickaxeMode = new SinglePickaxe();
|
||||
private transient final Int2ObjectOpenHashMap<Tool> tools = new Int2ObjectOpenHashMap<>(0);
|
||||
private final transient Int2ObjectOpenHashMap<Tool> tools = new Int2ObjectOpenHashMap<>(0);
|
||||
private transient int maxBlocksChanged = -1;
|
||||
private transient int maxTimeoutTime;
|
||||
private transient boolean useInventory;
|
||||
@ -245,9 +245,13 @@ public class LocalSession implements TextureHolder {
|
||||
|
||||
} else {
|
||||
int i = name.lastIndexOf('.');
|
||||
if (i != -1) val = StringMan.toInteger(name, 0, i);
|
||||
if (i != -1) {
|
||||
val = StringMan.toInteger(name, 0, i);
|
||||
}
|
||||
}
|
||||
if (val != null) {
|
||||
set.set(val);
|
||||
}
|
||||
if (val != null) set.set(val);
|
||||
return false;
|
||||
});
|
||||
}
|
||||
@ -402,7 +406,9 @@ public class LocalSession implements TextureHolder {
|
||||
checkNotNull(editSession);
|
||||
|
||||
// Don't store anything if no changes were made
|
||||
if (editSession.size() == 0) return;
|
||||
if (editSession.size() == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
Player player = editSession.getPlayer();
|
||||
int limit = player == null ? Integer.MAX_VALUE : player.getLimit().MAX_HISTORY;
|
||||
@ -721,7 +727,8 @@ public class LocalSession implements TextureHolder {
|
||||
return selector.getRegion();
|
||||
}
|
||||
|
||||
public @Nullable VirtualWorld getVirtualWorld() {
|
||||
@Nullable
|
||||
public VirtualWorld getVirtualWorld() {
|
||||
synchronized (dirty) {
|
||||
return virtual;
|
||||
}
|
||||
@ -814,8 +821,9 @@ public class LocalSession implements TextureHolder {
|
||||
*/
|
||||
public void setClipboard(@Nullable ClipboardHolder clipboard) {
|
||||
synchronized (clipboardLock) {
|
||||
if (this.clipboard == clipboard)
|
||||
if (this.clipboard == clipboard) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (this.clipboard != null) {
|
||||
if (clipboard == null || !clipboard.contains(this.clipboard.getClipboard())) {
|
||||
@ -990,7 +998,8 @@ public class LocalSession implements TextureHolder {
|
||||
*
|
||||
* @return the snapshot
|
||||
*/
|
||||
public @Nullable Snapshot getSnapshotExperimental() {
|
||||
@Nullable
|
||||
public Snapshot getSnapshotExperimental() {
|
||||
return snapshotExperimental;
|
||||
}
|
||||
|
||||
@ -1051,7 +1060,9 @@ public class LocalSession implements TextureHolder {
|
||||
public Tool getTool(BaseItem item, Player player) {
|
||||
if (Settings.IMP.EXPERIMENTAL.PERSISTENT_BRUSHES && item.getNativeItem() != null) {
|
||||
BrushTool tool = BrushCache.getTool(player, this, item);
|
||||
if (tool != null) return tool;
|
||||
if (tool != null) {
|
||||
return tool;
|
||||
}
|
||||
}
|
||||
loadDefaults(player, false);
|
||||
return getTool(item.getType());
|
||||
@ -1244,7 +1255,9 @@ public class LocalSession implements TextureHolder {
|
||||
* @param actor the actor
|
||||
*/
|
||||
public void tellVersion(Actor actor) {
|
||||
if (hasBeenToldVersion) return;
|
||||
if (hasBeenToldVersion) {
|
||||
return;
|
||||
}
|
||||
hasBeenToldVersion = true;
|
||||
actor.sendAnnouncements();
|
||||
}
|
||||
|
Reference in New Issue
Block a user