Mirror von
https://github.com/IntellectualSites/FastAsyncWorldEdit.git
synchronisiert 2024-12-26 02:50:06 +01:00
Show where to get help.
Dieser Commit ist enthalten in:
Ursprung
ca7bb1a3f5
Commit
e7f65e27db
@ -70,3 +70,4 @@ shell-save-type:
|
||||
no-double-slash: false
|
||||
no-op-permissions: false
|
||||
debug: false
|
||||
show-help-on-first-use: true
|
||||
|
@ -19,21 +19,17 @@
|
||||
|
||||
package com.sk89q.worldedit.forge;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
import com.sk89q.worldedit.util.PropertiesConfiguration;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
public class ForgeConfiguration extends PropertiesConfiguration {
|
||||
|
||||
public ForgeConfiguration(ForgeWorldEdit mod) {
|
||||
super(new File(mod.getWorkingDir() + File.separator + "worldedit.properties"));
|
||||
}
|
||||
|
||||
public void load() {
|
||||
super.load();
|
||||
showFirstUseVersion = false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public File getWorkingDirectory() {
|
||||
return ForgeWorldEdit.inst.getWorkingDir();
|
||||
}
|
||||
|
@ -19,14 +19,14 @@
|
||||
|
||||
package com.sk89q.worldedit;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
import com.sk89q.worldedit.blocks.BlockID;
|
||||
import com.sk89q.worldedit.blocks.ItemID;
|
||||
import com.sk89q.worldedit.world.snapshot.SnapshotRepository;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* Represents WorldEdit's configuration.
|
||||
*
|
||||
@ -108,7 +108,7 @@ public abstract class LocalConfiguration {
|
||||
public Set<Integer> allowedDataCycleBlocks = new HashSet<Integer>();
|
||||
public String saveDir = "schematics";
|
||||
public String scriptsDir = "craftscripts";
|
||||
public boolean showFirstUseVersion = true;
|
||||
public boolean showHelpInfo = true;
|
||||
public int butcherDefaultRadius = -1;
|
||||
public int butcherMaxRadius = -1;
|
||||
public boolean allowSymlinks = false;
|
||||
|
@ -40,6 +40,9 @@ import com.sk89q.worldedit.regions.RegionSelector;
|
||||
import com.sk89q.worldedit.regions.selector.CuboidRegionSelector;
|
||||
import com.sk89q.worldedit.session.ClipboardHolder;
|
||||
import com.sk89q.worldedit.session.request.Request;
|
||||
import com.sk89q.worldedit.util.formatting.ColorCodeBuilder;
|
||||
import com.sk89q.worldedit.util.formatting.Style;
|
||||
import com.sk89q.worldedit.util.formatting.StyledFragment;
|
||||
import com.sk89q.worldedit.world.World;
|
||||
import com.sk89q.worldedit.world.snapshot.Snapshot;
|
||||
|
||||
@ -582,10 +585,11 @@ public class LocalSession {
|
||||
* @param player
|
||||
*/
|
||||
public void tellVersion(Actor player) {
|
||||
if (config.showFirstUseVersion) {
|
||||
if (config.showHelpInfo) {
|
||||
if (!beenToldVersion) {
|
||||
player.printRaw("\u00A78WorldEdit ver. " + WorldEdit.getVersion()
|
||||
+ " (http://sk89q.com/projects/worldedit/)");
|
||||
StyledFragment fragment = new StyledFragment(Style.GRAY_DARK);
|
||||
fragment.append("Need help with WorldEdit? Ask us on IRC (irc.esper.net #sk89q) or on our forums @ http://forum.enginehub.org");
|
||||
player.printRaw(ColorCodeBuilder.asColorCodes(fragment));
|
||||
beenToldVersion = true;
|
||||
}
|
||||
}
|
||||
|
@ -19,15 +19,15 @@
|
||||
|
||||
package com.sk89q.worldedit.util;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.HashSet;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.sk89q.util.yaml.YAMLProcessor;
|
||||
import com.sk89q.worldedit.LocalConfiguration;
|
||||
import com.sk89q.worldedit.LocalSession;
|
||||
import com.sk89q.worldedit.world.snapshot.SnapshotRepository;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.HashSet;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
/**
|
||||
* A less simple implementation of {@link LocalConfiguration} using YAML configuration files.
|
||||
*
|
||||
@ -50,7 +50,6 @@ public class YAMLConfiguration extends LocalConfiguration {
|
||||
logger.severe("Error loading WorldEdit configuration: " + e);
|
||||
e.printStackTrace();
|
||||
}
|
||||
showFirstUseVersion = false;
|
||||
|
||||
profile = config.getBoolean("debug", profile);
|
||||
wandItem = config.getInt("wand-item", wandItem);
|
||||
@ -109,6 +108,8 @@ public class YAMLConfiguration extends LocalConfiguration {
|
||||
LocalSession.MAX_HISTORY_SIZE = Math.max(0, config.getInt("history.size", 15));
|
||||
LocalSession.EXPIRATION_GRACE = config.getInt("history.expiration", 10) * 60 * 1000;
|
||||
|
||||
showHelpInfo = config.getBoolean("show-help-on-first-use", true);
|
||||
|
||||
String snapshotsDir = config.getString("snapshots.directory", "");
|
||||
if (snapshotsDir.length() > 0) {
|
||||
snapshotRepo = new SnapshotRepository(snapshotsDir);
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren