Projects >> KitchenSink >>2e4752ba0d09974344ea4e9aa27d7c459540259a

Chunk
Conflicting content
=======
    public boolean SAFE_PORTALS;
    public int PEARL_DAMAGE;
    public boolean LEATHERLESS_BOOKS;
<<<<<<< HEAD
    public boolean LOCK_HORSES;
    
    public int RESTART_TIME;
    public long NEXT_RESTART;

>>>>>>> 7d630cb62449ea77b576f92746f0c7e63a2cbc2f
    public List ALLOW_ENCH_ITEMS;
    public List BLOCK_BREW;
    public List DISABLED_LEFT_ITEMS;
Solution content
package nu.nerd.kitchensink;

import java.util.List;

public class Configuration {
	private final KitchenSink plugin;

	public boolean ANIMAL_COUNT;
	public boolean LOG_ANIMAL_DEATH;
	public boolean LOG_PLAYER_DROPS;
	public int BUFF_DROPS;
	public int BUFF_SHEAR_DROPS;
	public boolean DISABLE_SNOW;
	public boolean REMOVE_ON_EXIT;
	public boolean DISABLE_DROPS;
	public boolean DISABLE_INVISIBILITY_ON_COMBAT;
	public boolean BLOCK_CAPS;
	public boolean BLOCK_VILLAGERS;
	public boolean SAFE_ICE;
	public boolean SAFE_DISPENSERS;
	public boolean SAFE_BOATS;
	public int SAFE_BOATS_DELAY;
	public boolean SAFE_BOATS_DROP;
	public boolean SAFE_MINECARTS;
	public int SAFE_MINECARTS_DELAY;
	public boolean SAFE_MINECARTS_DROP;
	public boolean SAFE_SPECIAL_CARTS;
	public boolean SAFE_PORTALS;
	public int PEARL_DAMAGE;
	public boolean LEATHERLESS_BOOKS;
	public boolean LOCK_HORSES;
	public int RESTART_TIME;
	public long NEXT_RESTART;

	public List ALLOW_ENCH_ITEMS;
	public List BLOCK_BREW;
	public List DISABLED_LEFT_ITEMS;
	public List DISABLED_RIGHT_ITEMS;
	public List DISABLE_DISPENSED;
	public List DISABLE_BUFF;

	public Configuration(KitchenSink instance) {
		plugin = instance;
	}

	public void save() {
		plugin.saveConfig();
	}

	public void load() {
		plugin.reloadConfig();

		ANIMAL_COUNT = plugin.getConfig().getBoolean("animal-count");
		LOG_ANIMAL_DEATH = plugin.getConfig().getBoolean("log-animals");
		LOG_PLAYER_DROPS = plugin.getConfig().getBoolean("log-player-drops");
		BUFF_DROPS = plugin.getConfig().getInt("buff-drops");
		BUFF_SHEAR_DROPS = plugin.getConfig().getInt("buff-shear-drops");
		DISABLE_SNOW = plugin.getConfig().getBoolean("disable-snowgrow");
		DISABLE_DROPS = plugin.getConfig().getBoolean("disable-drops");
		DISABLE_INVISIBILITY_ON_COMBAT = plugin.getConfig().getBoolean("disable-invisibility-on-combat");
		BLOCK_CAPS = plugin.getConfig().getBoolean("block-caps");
		BLOCK_VILLAGERS = plugin.getConfig().getBoolean("block-villagers");
		SAFE_ICE = plugin.getConfig().getBoolean("safe-ice");
		SAFE_DISPENSERS = plugin.getConfig().getBoolean("safe-dispensers");
		SAFE_BOATS = plugin.getConfig().getBoolean("safe-boats");
		SAFE_BOATS_DELAY = plugin.getConfig().getInt("safe-boats-delay");
		SAFE_BOATS_DROP = plugin.getConfig().getBoolean("safe-boats-drop");
		SAFE_MINECARTS = plugin.getConfig().getBoolean("safe-minecarts");
		SAFE_MINECARTS_DELAY = plugin.getConfig().getInt("safe-minecarts-delay");
		SAFE_MINECARTS_DROP = plugin.getConfig().getBoolean("safe-minecarts-drop");
		SAFE_SPECIAL_CARTS = plugin.getConfig().getBoolean("safe-special-carts");
		REMOVE_ON_EXIT = plugin.getConfig().getBoolean("remove-on-exit");
		SAFE_PORTALS = plugin.getConfig().getBoolean("safe-portals");
		PEARL_DAMAGE = plugin.getConfig().getInt("pearl-damage");
		LEATHERLESS_BOOKS = plugin.getConfig().getBoolean("leatherless-books");
		LOCK_HORSES = plugin.getConfig().getBoolean("lock-horses");
		ALLOW_ENCH_ITEMS = plugin.getConfig().getIntegerList("allow-enchant-items");
		BLOCK_BREW = plugin.getConfig().getIntegerList("block-brew");
		DISABLED_LEFT_ITEMS = plugin.getConfig().getIntegerList("disabled-items.left-click");
		DISABLED_RIGHT_ITEMS = plugin.getConfig().getIntegerList("disabled-items.right-click");
		DISABLE_DISPENSED = plugin.getConfig().getIntegerList("disabled-items.dispensed");
		DISABLE_BUFF = plugin.getConfig().getIntegerList("disable-buff");
		RESTART_TIME = plugin.getConfig().getInt("restart-time");
	}
}
File
Configuration.java
Developer's decision
Manual
Kind of conflict
Attribute
Chunk
Conflicting content
				return true;
			}			
		}
<<<<<<< HEAD
		
        if (command.getName().equalsIgnoreCase("lock-horse")) {
            setHorseLockState(sender, true);
            return true;
        } else if (command.getName().equalsIgnoreCase("unlock-horse")) {
            setHorseLockState(sender, false);
            return true;
        }
		    
=======
		if (command.getName().equalsIgnoreCase("nextrestart")){
			int time = (int)(config.NEXT_RESTART - (System.currentTimeMillis() / 1000L));
			if (time < 120) {
				sender.sendMessage("The server will restart in " + time + " second" + ((time == 1)? "" : "s"));
			} else {
				sender.sendMessage("The server will restart in " + time/60 + " minute" + ((time == 1) ? "" : "s"));
			}

			return true;
		}
>>>>>>> 7d630cb62449ea77b576f92746f0c7e63a2cbc2f
		return false;
	}
Solution content
		}

		return false;
	}
				return true;
			}
		}

		if (command.getName().equalsIgnoreCase("nextrestart")) {
			int time = (int) (config.NEXT_RESTART - (System.currentTimeMillis() / 1000L));
			if (time < 120) {
				sender.sendMessage("The server will restart in " + time + " second" + ((time == 1) ? "" : "s"));
			} else {
				sender.sendMessage("The server will restart in " + time / 60 + " minute" + ((time == 1) ? "" : "s"));
			}

			return true;
		}

		if (command.getName().equalsIgnoreCase("lock-horse")) {
			setHorseLockState(sender, true);
			return true;
		} else if (command.getName().equalsIgnoreCase("unlock-horse")) {
			setHorseLockState(sender, false);
			return true;
File
KitchenSink.java
Developer's decision
Concatenation
Kind of conflict
If statement