blob: 671117e9a21ed224706ee6a181c6d0e529b334ae [file] [log] [blame] [raw]
/* Copyright 2015-2020 Rivoreo
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/
package rivoreo.minecraft.worldmgr;
import org.bukkit.World;
// Cauldron only
public class BukkitWorldForceFreezeBlockProperty implements BukkitWorldProperty {
public String get(World world) throws Exception {
Object provider = BukkitPlugin.get_world_provider(world);
return BukkitPlugin.is_world_provider_force_freeze_block(provider) ? "on" : "off";
}
public void set(World world, String value) throws Exception {
Object provider = BukkitPlugin.get_world_provider(world);
BukkitPlugin.set_custom_world_provider_force_freeze_block(provider, BukkitPlugin.parse_off_on_value(value));
}
}