Merge pull request 'Anti Ice and Snow Melt' (#308) from Anti_Ice_Melt into master
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful
Reviewed-on: #308 Reviewed-by: Lixfel <lixfel@steamwar.de>
Dieser Commit ist enthalten in:
Commit
d590f52c14
@ -41,7 +41,8 @@ Arena:
|
|||||||
BorderFromSchematic: 12 # defaults to 12 if missing
|
BorderFromSchematic: 12 # defaults to 12 if missing
|
||||||
# If ground walkable, teams can walk below the lower arena border during setup
|
# If ground walkable, teams can walk below the lower arena border during setup
|
||||||
GroundWalkable: true # defaults to true if missing
|
GroundWalkable: true # defaults to true if missing
|
||||||
|
# Disable snow melt
|
||||||
|
DisableSnowMelt: false
|
||||||
Schematic:
|
Schematic:
|
||||||
# The size of the schematics
|
# The size of the schematics
|
||||||
Size:
|
Size:
|
||||||
|
@ -69,6 +69,7 @@ public class Config {
|
|||||||
public static final int PreperationArea;
|
public static final int PreperationArea;
|
||||||
public static final int WaterDepth;
|
public static final int WaterDepth;
|
||||||
public static final boolean GroundWalkable;
|
public static final boolean GroundWalkable;
|
||||||
|
public static final boolean DisableSnowMelt;
|
||||||
|
|
||||||
//schematic parameter
|
//schematic parameter
|
||||||
public static final boolean RanksEnabled;
|
public static final boolean RanksEnabled;
|
||||||
@ -164,6 +165,7 @@ public class Config {
|
|||||||
int schem2BorderZ = config.getInt("Arena.Schem2Border.z", 24);
|
int schem2BorderZ = config.getInt("Arena.Schem2Border.z", 24);
|
||||||
PreperationArea = config.getInt("Arena.BorderFromSchematic", 12);
|
PreperationArea = config.getInt("Arena.BorderFromSchematic", 12);
|
||||||
GroundWalkable = config.getBoolean("Arena.GroundWalkable", true);
|
GroundWalkable = config.getBoolean("Arena.GroundWalkable", true);
|
||||||
|
DisableSnowMelt = config.getBoolean("Arena.DisableSnowMelt", false);
|
||||||
|
|
||||||
int schemsizeX = config.getInt("Schematic.Size.x");
|
int schemsizeX = config.getInt("Schematic.Size.x");
|
||||||
int schemsizeY = config.getInt("Schematic.Size.y");
|
int schemsizeY = config.getInt("Schematic.Size.y");
|
||||||
|
@ -84,6 +84,7 @@ public class FightSystem extends JavaPlugin {
|
|||||||
new PersonalKitCreator();
|
new PersonalKitCreator();
|
||||||
new ArrowStopper();
|
new ArrowStopper();
|
||||||
new ArrowPickup();
|
new ArrowPickup();
|
||||||
|
new BlockFadeListener();
|
||||||
|
|
||||||
new EnterHandler();
|
new EnterHandler();
|
||||||
new TechHider();
|
new TechHider();
|
||||||
|
@ -0,0 +1,25 @@
|
|||||||
|
package de.steamwar.fightsystem.listener;
|
||||||
|
|
||||||
|
import de.steamwar.fightsystem.ArenaMode;
|
||||||
|
import de.steamwar.fightsystem.Config;
|
||||||
|
import de.steamwar.fightsystem.states.FightState;
|
||||||
|
import de.steamwar.fightsystem.states.StateDependentListener;
|
||||||
|
import org.bukkit.Material;
|
||||||
|
import org.bukkit.event.EventHandler;
|
||||||
|
import org.bukkit.event.Listener;
|
||||||
|
import org.bukkit.event.block.BlockFadeEvent;
|
||||||
|
|
||||||
|
public class BlockFadeListener implements Listener {
|
||||||
|
|
||||||
|
public BlockFadeListener() {
|
||||||
|
new StateDependentListener(Config.DisableSnowMelt, FightState.All, this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@EventHandler
|
||||||
|
public void onBlockFade(BlockFadeEvent event) {
|
||||||
|
if (event.getBlock().getType() == Material.SNOW_BLOCK || event.getBlock().getType() == Material.SNOW || event.getBlock().getType() == Material.ICE) {
|
||||||
|
event.setCancelled(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
In neuem Issue referenzieren
Einen Benutzer sperren