mirror of
https://github.com/EssentialsX/Essentials.git
synced 2025-01-23 08:31:28 +01:00
[trunk] New config property: nether.ratio, defaults to 16.
Please update use1to1ratio to ratio: 1.0 git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1378 e251c2fe-e539-e718-e476-b85c1f46cddb
This commit is contained in:
parent
14b53db85a
commit
dae0ce78d1
@ -101,25 +101,11 @@ public class EssentialsPlayerListener extends PlayerListener
|
|||||||
double factor;
|
double factor;
|
||||||
if (user.getWorld().getEnvironment() == World.Environment.NETHER && world.getEnvironment() == World.Environment.NORMAL)
|
if (user.getWorld().getEnvironment() == World.Environment.NETHER && world.getEnvironment() == World.Environment.NORMAL)
|
||||||
{
|
{
|
||||||
if (ess.getSettings().use1to1RatioInNether())
|
factor = ess.getSettings().getNetherRatio();
|
||||||
{
|
|
||||||
factor = 1.0;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
factor = 16.0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else if (user.getWorld().getEnvironment() != world.getEnvironment())
|
else if (user.getWorld().getEnvironment() != world.getEnvironment())
|
||||||
{
|
{
|
||||||
if (ess.getSettings().use1to1RatioInNether())
|
factor = 1.0 / ess.getSettings().getNetherRatio();
|
||||||
{
|
|
||||||
factor = 1.0;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
factor = 1.0 / 16.0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -471,6 +471,14 @@ public class Settings implements IConf
|
|||||||
return config.getBoolean("nether.use-1to1-ratio", false);
|
return config.getBoolean("nether.use-1to1-ratio", false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public double getNetherRatio()
|
||||||
|
{
|
||||||
|
if (config.getBoolean("nether.use-1to1-ratio", false)) {
|
||||||
|
return 1.0;
|
||||||
|
}
|
||||||
|
return config.getDouble("nether.ratio", 16.0);
|
||||||
|
}
|
||||||
|
|
||||||
public boolean isDebug()
|
public boolean isDebug()
|
||||||
{
|
{
|
||||||
return config.getBoolean("debug", false);
|
return config.getBoolean("debug", false);
|
||||||
|
@ -53,25 +53,11 @@ public class Commandworld extends EssentialsCommand
|
|||||||
double factor;
|
double factor;
|
||||||
if (user.getWorld().getEnvironment() == World.Environment.NETHER && world.getEnvironment() == World.Environment.NORMAL)
|
if (user.getWorld().getEnvironment() == World.Environment.NETHER && world.getEnvironment() == World.Environment.NORMAL)
|
||||||
{
|
{
|
||||||
if (ess.getSettings().use1to1RatioInNether())
|
factor = ess.getSettings().getNetherRatio();
|
||||||
{
|
|
||||||
factor = 1.0;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
factor = 16.0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else if (user.getWorld().getEnvironment() != world.getEnvironment())
|
else if (user.getWorld().getEnvironment() != world.getEnvironment())
|
||||||
{
|
{
|
||||||
if (ess.getSettings().use1to1RatioInNether())
|
factor = 1.0 / ess.getSettings().getNetherRatio();
|
||||||
{
|
|
||||||
factor = 1.0;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
factor = 1.0 / 16.0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -75,7 +75,7 @@ nether:
|
|||||||
folder: nether
|
folder: nether
|
||||||
portals-enabled: false
|
portals-enabled: false
|
||||||
generate-exit-portals: false
|
generate-exit-portals: false
|
||||||
use-1to1-ratio: false
|
ratio: 16
|
||||||
|
|
||||||
# Mob limit on spawnmob
|
# Mob limit on spawnmob
|
||||||
spawnmob-limit: 10
|
spawnmob-limit: 10
|
||||||
|
Loading…
Reference in New Issue
Block a user