mirror of
https://gitlab.com/SamB440/rpgregions-2.git
synced 2025-12-29 11:49:08 +00:00
Fix constructors
This commit is contained in:
@@ -60,7 +60,8 @@ public class RPGRegionsCommand extends BaseCommand {
|
||||
int x = player.getLocation().getBlockX();
|
||||
int y = player.getLocation().getBlockY();
|
||||
int z = player.getLocation().getBlockZ();
|
||||
ConfiguredRegion configuredRegion = new ConfiguredRegion(player.getWorld(), region, region, new ArrayList<>(), x, y, z);
|
||||
ConfiguredRegion configuredRegion = new ConfiguredRegion(player.getWorld(), region, region, new ArrayList<>(),
|
||||
new ArrayList<>(), x, y, z);
|
||||
plugin.getManagers().getRegionsCache().addConfiguredRegion(configuredRegion);
|
||||
player.sendMessage(StringUtils.colour("&aAdded configured region " + region + "!"));
|
||||
//TODO add an editor <L105>
|
||||
|
||||
@@ -4,21 +4,32 @@ import net.islandearth.rpgregions.RPGRegions;
|
||||
import net.islandearth.rpgregions.api.integrations.IntegrationManager;
|
||||
import net.islandearth.rpgregions.api.integrations.IntegrationType;
|
||||
import net.islandearth.rpgregions.api.integrations.hooks.PlaceholderRegionHook;
|
||||
import net.islandearth.rpgregions.effects.PotionRegionEffect;
|
||||
import net.islandearth.rpgregions.effects.RegionEffect;
|
||||
import net.islandearth.rpgregions.managers.data.RPGRegionsCache;
|
||||
import net.islandearth.rpgregions.managers.data.StorageManager;
|
||||
import net.islandearth.rpgregions.managers.data.StorageType;
|
||||
import net.islandearth.rpgregions.managers.data.region.ConfiguredRegion;
|
||||
import net.islandearth.rpgregions.rewards.*;
|
||||
import net.islandearth.rpgregions.rewards.ConsoleCommandReward;
|
||||
import net.islandearth.rpgregions.rewards.DiscoveryReward;
|
||||
import net.islandearth.rpgregions.rewards.ExperienceReward;
|
||||
import net.islandearth.rpgregions.rewards.ItemReward;
|
||||
import net.islandearth.rpgregions.rewards.PlayerCommandReward;
|
||||
import net.islandearth.rpgregions.utils.ItemStackBuilder;
|
||||
import net.islandearth.rpgregions.utils.XMaterial;
|
||||
import net.islandearth.rpgregions.utils.XSound;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.potion.PotionEffect;
|
||||
import org.bukkit.potion.PotionEffectType;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileReader;
|
||||
import java.io.IOException;
|
||||
import java.io.Reader;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.logging.Level;
|
||||
|
||||
@@ -53,7 +64,11 @@ public class RPGRegionsManagers {
|
||||
rewards.add(new ItemReward(new ItemStack(XMaterial.IRON_BARS.parseMaterial())));
|
||||
rewards.add(new PlayerCommandReward("say I discovered a region!"));
|
||||
rewards.add(new ConsoleCommandReward("say Server sees you discovered a region!"));
|
||||
ConfiguredRegion configuredRegion = new ConfiguredRegion(null, "exampleconfig", "ExampleConfig", rewards,
|
||||
List<RegionEffect> effects = new ArrayList<>();
|
||||
effects.add(new PotionRegionEffect(
|
||||
new PotionEffect(PotionEffectType.GLOWING, 100, 1, true, true, true),
|
||||
Collections.singletonList(new ItemStackBuilder(Material.IRON_CHESTPLATE).build())));
|
||||
ConfiguredRegion configuredRegion = new ConfiguredRegion(null, "exampleconfig", "ExampleConfig", rewards, effects,
|
||||
XSound.AMBIENT_UNDERWATER_EXIT.parseSound(),
|
||||
XMaterial.WOODEN_AXE.parseMaterial(),
|
||||
0,
|
||||
|
||||
Reference in New Issue
Block a user