mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2025-07-18 10:12:53 +00:00
Cleanup sources
This commit is contained in:
parent
18c70002cb
commit
160bdf5472
@ -24,7 +24,6 @@ import com.volmit.iris.core.command.PermissionIris;
|
|||||||
import com.volmit.iris.core.command.world.CommandLocate;
|
import com.volmit.iris.core.command.world.CommandLocate;
|
||||||
import com.volmit.iris.core.link.IrisPapiExpansion;
|
import com.volmit.iris.core.link.IrisPapiExpansion;
|
||||||
import com.volmit.iris.core.link.MultiverseCoreLink;
|
import com.volmit.iris.core.link.MultiverseCoreLink;
|
||||||
import com.volmit.iris.core.link.MythicMobsLink;
|
|
||||||
import com.volmit.iris.core.link.OraxenLink;
|
import com.volmit.iris.core.link.OraxenLink;
|
||||||
import com.volmit.iris.core.nms.INMS;
|
import com.volmit.iris.core.nms.INMS;
|
||||||
import com.volmit.iris.core.project.loader.IrisData;
|
import com.volmit.iris.core.project.loader.IrisData;
|
||||||
@ -62,7 +61,6 @@ import org.bukkit.event.HandlerList;
|
|||||||
import org.bukkit.event.Listener;
|
import org.bukkit.event.Listener;
|
||||||
import org.bukkit.generator.ChunkGenerator;
|
import org.bukkit.generator.ChunkGenerator;
|
||||||
import org.bukkit.plugin.Plugin;
|
import org.bukkit.plugin.Plugin;
|
||||||
import org.jetbrains.annotations.NotNull;
|
|
||||||
|
|
||||||
import java.io.*;
|
import java.io.*;
|
||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
@ -78,7 +76,6 @@ public class Iris extends VolmitPlugin implements Listener {
|
|||||||
public static EditManager edit;
|
public static EditManager edit;
|
||||||
public static IrisBoardManager board;
|
public static IrisBoardManager board;
|
||||||
public static MultiverseCoreLink linkMultiverseCore;
|
public static MultiverseCoreLink linkMultiverseCore;
|
||||||
public static MythicMobsLink linkMythicMobs;
|
|
||||||
public static OraxenLink linkOraxen;
|
public static OraxenLink linkOraxen;
|
||||||
public static TreeManager saplingManager;
|
public static TreeManager saplingManager;
|
||||||
private static final Queue<Runnable> syncJobs = new ShurikenQueue<>();
|
private static final Queue<Runnable> syncJobs = new ShurikenQueue<>();
|
||||||
@ -101,17 +98,12 @@ public class Iris extends VolmitPlugin implements Listener {
|
|||||||
|
|
||||||
public void onEnable() {
|
public void onEnable() {
|
||||||
instance = this;
|
instance = this;
|
||||||
try {
|
|
||||||
compat = IrisCompat.configured(getDataFile("compat.json"));
|
compat = IrisCompat.configured(getDataFile("compat.json"));
|
||||||
} catch (IOException e) {
|
|
||||||
Iris.reportError(e);
|
|
||||||
}
|
|
||||||
proj = new ProjectManager();
|
proj = new ProjectManager();
|
||||||
convert = new ConversionManager();
|
convert = new ConversionManager();
|
||||||
wand = new WandManager();
|
wand = new WandManager();
|
||||||
board = new IrisBoardManager();
|
board = new IrisBoardManager();
|
||||||
linkMultiverseCore = new MultiverseCoreLink();
|
linkMultiverseCore = new MultiverseCoreLink();
|
||||||
linkMythicMobs = new MythicMobsLink();
|
|
||||||
linkOraxen = new OraxenLink();
|
linkOraxen = new OraxenLink();
|
||||||
saplingManager = new TreeManager();
|
saplingManager = new TreeManager();
|
||||||
edit = new EditManager();
|
edit = new EditManager();
|
||||||
@ -390,7 +382,7 @@ public class Iris extends VolmitPlugin implements Listener {
|
|||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ChunkGenerator getDefaultWorldGenerator(@NotNull String worldName, String id) {
|
public ChunkGenerator getDefaultWorldGenerator(String worldName, String id) {
|
||||||
String dimension = IrisSettings.get().getGenerator().getDefaultWorldType();
|
String dimension = IrisSettings.get().getGenerator().getDefaultWorldType();
|
||||||
|
|
||||||
if (id != null && !id.isEmpty()) {
|
if (id != null && !id.isEmpty()) {
|
||||||
|
@ -21,10 +21,8 @@ package com.volmit.iris.core;
|
|||||||
import com.volmit.iris.Iris;
|
import com.volmit.iris.Iris;
|
||||||
import com.volmit.iris.core.edit.BlockEditor;
|
import com.volmit.iris.core.edit.BlockEditor;
|
||||||
import com.volmit.iris.core.edit.BukkitBlockEditor;
|
import com.volmit.iris.core.edit.BukkitBlockEditor;
|
||||||
import com.volmit.iris.core.edit.WEBlockEditor;
|
|
||||||
import com.volmit.iris.util.collection.KMap;
|
import com.volmit.iris.util.collection.KMap;
|
||||||
import com.volmit.iris.util.math.M;
|
import com.volmit.iris.util.math.M;
|
||||||
import io.papermc.lib.PaperLib;
|
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.World;
|
import org.bukkit.World;
|
||||||
import org.bukkit.block.Biome;
|
import org.bukkit.block.Biome;
|
||||||
@ -93,17 +91,7 @@ public class EditManager implements Listener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
BlockEditor e = null;
|
BlockEditor e = null;
|
||||||
|
|
||||||
if (Bukkit.getPluginManager().isPluginEnabled("WorldEdit") && !PaperLib.isPaper() && !IrisSettings.get().getGeneral().isIgnoreWorldEdit()) {
|
|
||||||
try {
|
|
||||||
e = new WEBlockEditor(world);
|
|
||||||
} catch (Throwable ex) {
|
|
||||||
Iris.reportError(ex);
|
|
||||||
e = new BukkitBlockEditor(world);
|
e = new BukkitBlockEditor(world);
|
||||||
}
|
|
||||||
} else {
|
|
||||||
e = new BukkitBlockEditor(world);
|
|
||||||
}
|
|
||||||
|
|
||||||
editors.put(world, e);
|
editors.put(world, e);
|
||||||
|
|
||||||
|
@ -1,82 +0,0 @@
|
|||||||
/*
|
|
||||||
* Iris is a World Generator for Minecraft Bukkit Servers
|
|
||||||
* Copyright (c) 2021 Arcane Arts (Volmit Software)
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package com.volmit.iris.core.edit;
|
|
||||||
|
|
||||||
import com.sk89q.worldedit.EditSession;
|
|
||||||
import com.sk89q.worldedit.WorldEdit;
|
|
||||||
import com.sk89q.worldedit.bukkit.BukkitAdapter;
|
|
||||||
import com.sk89q.worldedit.math.BlockVector2;
|
|
||||||
import com.sk89q.worldedit.math.BlockVector3;
|
|
||||||
import com.sk89q.worldedit.world.biome.BiomeTypes;
|
|
||||||
import com.volmit.iris.util.math.M;
|
|
||||||
import org.bukkit.World;
|
|
||||||
import org.bukkit.block.Biome;
|
|
||||||
import org.bukkit.block.data.BlockData;
|
|
||||||
|
|
||||||
public class WEBlockEditor implements BlockEditor {
|
|
||||||
private final World world;
|
|
||||||
private final EditSession es;
|
|
||||||
private final long last;
|
|
||||||
|
|
||||||
public WEBlockEditor(World world) {
|
|
||||||
last = M.ms();
|
|
||||||
this.world = world;
|
|
||||||
es = WorldEdit.getInstance().newEditSessionBuilder().world(BukkitAdapter.adapt(world)).build();
|
|
||||||
}
|
|
||||||
|
|
||||||
@SuppressWarnings("deprecation")
|
|
||||||
public void setBiome(int x, int z, Biome b) {
|
|
||||||
es.setBiome(BlockVector2.at(x, z), BiomeTypes.get("minecraft:" + b.name().toLowerCase()));
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setBiome(int x, int y, int z, Biome b) {
|
|
||||||
es.setBiome(BlockVector3.at(x, y, z), BiomeTypes.get("minecraft:" + b.name().toLowerCase()));
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void set(int x, int y, int z, BlockData d) {
|
|
||||||
es.rawSetBlock(BlockVector3.at(x, y, z), BukkitAdapter.adapt(d));
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public BlockData get(int x, int y, int z) {
|
|
||||||
return world.getBlockAt(x, y, z).getBlockData();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void close() {
|
|
||||||
es.close();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public long last() {
|
|
||||||
return last;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Biome getBiome(int x, int y, int z) {
|
|
||||||
return world.getBiome(x, y, z);
|
|
||||||
}
|
|
||||||
|
|
||||||
@SuppressWarnings("deprecation")
|
|
||||||
@Override
|
|
||||||
public Biome getBiome(int x, int z) {
|
|
||||||
return world.getBiome(x, z);
|
|
||||||
}
|
|
||||||
}
|
|
@ -25,25 +25,21 @@ import com.volmit.iris.engine.framework.IrisAccess;
|
|||||||
import me.clip.placeholderapi.expansion.PlaceholderExpansion;
|
import me.clip.placeholderapi.expansion.PlaceholderExpansion;
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
import org.bukkit.OfflinePlayer;
|
import org.bukkit.OfflinePlayer;
|
||||||
import org.jetbrains.annotations.NotNull;
|
|
||||||
|
|
||||||
// See/update https://app.gitbook.com/@volmitsoftware/s/iris/compatability/papi/
|
// See/update https://app.gitbook.com/@volmitsoftware/s/iris/compatability/papi/
|
||||||
public class IrisPapiExpansion extends PlaceholderExpansion {
|
public class IrisPapiExpansion extends PlaceholderExpansion {
|
||||||
@Override
|
@Override
|
||||||
public @NotNull
|
public String getIdentifier() {
|
||||||
String getIdentifier() {
|
|
||||||
return "iris";
|
return "iris";
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public @NotNull
|
public String getAuthor() {
|
||||||
String getAuthor() {
|
|
||||||
return "Volmit Software";
|
return "Volmit Software";
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public @NotNull
|
public String getVersion() {
|
||||||
String getVersion() {
|
|
||||||
return Iris.instance.getDescription().getVersion();
|
return Iris.instance.getDescription().getVersion();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,65 +0,0 @@
|
|||||||
/*
|
|
||||||
* Iris is a World Generator for Minecraft Bukkit Servers
|
|
||||||
* Copyright (c) 2021 Arcane Arts (Volmit Software)
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package com.volmit.iris.core.link;
|
|
||||||
|
|
||||||
import com.volmit.iris.util.collection.KList;
|
|
||||||
import io.lumine.xikage.mythicmobs.MythicMobs;
|
|
||||||
import io.lumine.xikage.mythicmobs.mobs.MythicMob;
|
|
||||||
import org.bukkit.Bukkit;
|
|
||||||
import org.bukkit.Location;
|
|
||||||
import org.bukkit.entity.Entity;
|
|
||||||
import org.bukkit.plugin.Plugin;
|
|
||||||
|
|
||||||
public class MythicMobsLink {
|
|
||||||
public MythicMobsLink() {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean supported() {
|
|
||||||
return getMythicMobs() != null;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Entity spawn(String name, Location a) {
|
|
||||||
if (!supported()) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
MythicMobs m = (MythicMobs) getMythicMobs();
|
|
||||||
return m.getMobManager().spawnMob(name, a).getEntity().getBukkitEntity();
|
|
||||||
}
|
|
||||||
|
|
||||||
public String[] getMythicMobTypes() {
|
|
||||||
KList<String> v = new KList<>();
|
|
||||||
|
|
||||||
if (supported()) {
|
|
||||||
MythicMobs m = (MythicMobs) getMythicMobs();
|
|
||||||
|
|
||||||
for (MythicMob i : m.getMobManager().getMobTypes()) {
|
|
||||||
v.add(i.getInternalName());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return v.toArray(new String[0]);
|
|
||||||
}
|
|
||||||
|
|
||||||
public Plugin getMythicMobs() {
|
|
||||||
|
|
||||||
return Bukkit.getPluginManager().getPlugin("MythicMobs");
|
|
||||||
}
|
|
||||||
}
|
|
@ -185,18 +185,6 @@ public class SchemaBuilder {
|
|||||||
} else {
|
} else {
|
||||||
Iris.error("Cannot find Registry Loader for type " + rr.value() + " used in " + k.getDeclaringClass().getCanonicalName() + " in field " + k.getName());
|
Iris.error("Cannot find Registry Loader for type " + rr.value() + " used in " + k.getDeclaringClass().getCanonicalName() + " in field " + k.getName());
|
||||||
}
|
}
|
||||||
} else if (k.isAnnotationPresent(RegistryListMythical.class)) {
|
|
||||||
String key = "enum-reg-mythical";
|
|
||||||
|
|
||||||
if (!definitions.containsKey(key)) {
|
|
||||||
JSONObject j = new JSONObject();
|
|
||||||
j.put("enum", new JSONArray(Iris.linkMythicMobs.getMythicMobTypes()));
|
|
||||||
definitions.put(key, j);
|
|
||||||
}
|
|
||||||
|
|
||||||
fancyType = "Mythic Mob Type";
|
|
||||||
prop.put("$ref", "#/definitions/" + key);
|
|
||||||
description.add(SYMBOL_TYPE__N + " Must be a valid Mythic Mob Type (use ctrl+space for auto complete!) Define mythic mobs with the mythic mobs plugin configuration files.");
|
|
||||||
} else if (k.isAnnotationPresent(RegistryListBlockType.class)) {
|
} else if (k.isAnnotationPresent(RegistryListBlockType.class)) {
|
||||||
String key = "enum-block-type";
|
String key = "enum-block-type";
|
||||||
|
|
||||||
@ -368,26 +356,6 @@ public class SchemaBuilder {
|
|||||||
} else {
|
} else {
|
||||||
Iris.error("Cannot find Registry Loader for type (list schema) " + rr.value() + " used in " + k.getDeclaringClass().getCanonicalName() + " in field " + k.getName());
|
Iris.error("Cannot find Registry Loader for type (list schema) " + rr.value() + " used in " + k.getDeclaringClass().getCanonicalName() + " in field " + k.getName());
|
||||||
}
|
}
|
||||||
} else if (k.isAnnotationPresent(RegistryListMythical.class)) {
|
|
||||||
fancyType = "List of Mythic Mob Types";
|
|
||||||
String key = "enum-reg-mythical";
|
|
||||||
|
|
||||||
if (!definitions.containsKey(key)) {
|
|
||||||
JSONObject j = new JSONObject();
|
|
||||||
JSONArray ja = new JSONArray();
|
|
||||||
|
|
||||||
for (String i : Iris.linkMythicMobs.getMythicMobTypes()) {
|
|
||||||
ja.put(i);
|
|
||||||
}
|
|
||||||
|
|
||||||
j.put("enum", ja);
|
|
||||||
definitions.put(key, j);
|
|
||||||
}
|
|
||||||
|
|
||||||
JSONObject items = new JSONObject();
|
|
||||||
items.put("$ref", "#/definitions/" + key);
|
|
||||||
prop.put("items", items);
|
|
||||||
description.add(SYMBOL_TYPE__N + " Must be a valid Mythic Mob Type (use ctrl+space for auto complete!) Configure mob types in the mythic mobs plugin configuration files.");
|
|
||||||
} else if (k.isAnnotationPresent(RegistryListBlockType.class)) {
|
} else if (k.isAnnotationPresent(RegistryListBlockType.class)) {
|
||||||
fancyType = "List of Block Types";
|
fancyType = "List of Block Types";
|
||||||
String key = "enum-block-type";
|
String key = "enum-block-type";
|
||||||
|
@ -46,7 +46,6 @@ import org.bukkit.World;
|
|||||||
import org.bukkit.block.Biome;
|
import org.bukkit.block.Biome;
|
||||||
import org.bukkit.block.data.BlockData;
|
import org.bukkit.block.data.BlockData;
|
||||||
import org.bukkit.generator.BlockPopulator;
|
import org.bukkit.generator.BlockPopulator;
|
||||||
import org.jetbrains.annotations.NotNull;
|
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
@ -266,7 +265,7 @@ public class IrisEngine extends BlockPopulator implements Engine {
|
|||||||
|
|
||||||
@ChunkCoordinates
|
@ChunkCoordinates
|
||||||
@Override
|
@Override
|
||||||
public void populate(@NotNull World world, @NotNull Random random, @NotNull Chunk c) {
|
public void populate(World world, Random random, Chunk c) {
|
||||||
updateChunk(c);
|
updateChunk(c);
|
||||||
placeTiles(c);
|
placeTiles(c);
|
||||||
}
|
}
|
||||||
|
@ -29,7 +29,6 @@ import org.bukkit.block.data.BlockData;
|
|||||||
import org.bukkit.generator.ChunkGenerator.BiomeGrid;
|
import org.bukkit.generator.ChunkGenerator.BiomeGrid;
|
||||||
import org.bukkit.generator.ChunkGenerator.ChunkData;
|
import org.bukkit.generator.ChunkGenerator.ChunkData;
|
||||||
import org.bukkit.material.MaterialData;
|
import org.bukkit.material.MaterialData;
|
||||||
import org.jetbrains.annotations.NotNull;
|
|
||||||
|
|
||||||
@SuppressWarnings("deprecation")
|
@SuppressWarnings("deprecation")
|
||||||
public class LinkedTerrainChunk implements TerrainChunk {
|
public class LinkedTerrainChunk implements TerrainChunk {
|
||||||
@ -56,7 +55,7 @@ public class LinkedTerrainChunk implements TerrainChunk {
|
|||||||
return (x, y, z, bb) -> INMS.get().forceBiomeInto(x, y, z, bb, storage);
|
return (x, y, z, bb) -> INMS.get().forceBiomeInto(x, y, z, bb, storage);
|
||||||
}
|
}
|
||||||
|
|
||||||
@NotNull
|
|
||||||
@Override
|
@Override
|
||||||
public Biome getBiome(int x, int z) {
|
public Biome getBiome(int x, int z) {
|
||||||
if (storage != null) {
|
if (storage != null) {
|
||||||
@ -66,7 +65,7 @@ public class LinkedTerrainChunk implements TerrainChunk {
|
|||||||
return biome3D.getBiome(x, 0, z);
|
return biome3D.getBiome(x, 0, z);
|
||||||
}
|
}
|
||||||
|
|
||||||
@NotNull
|
|
||||||
@Override
|
@Override
|
||||||
public Biome getBiome(int x, int y, int z) {
|
public Biome getBiome(int x, int y, int z) {
|
||||||
if (storage != null) {
|
if (storage != null) {
|
||||||
@ -115,7 +114,7 @@ public class LinkedTerrainChunk implements TerrainChunk {
|
|||||||
rawChunkData.setBlock(x, y, z, blockData);
|
rawChunkData.setBlock(x, y, z, blockData);
|
||||||
}
|
}
|
||||||
|
|
||||||
@NotNull
|
|
||||||
@Override
|
@Override
|
||||||
public BlockData getBlockData(int x, int y, int z) {
|
public BlockData getBlockData(int x, int y, int z) {
|
||||||
return rawChunkData.getBlockData(x, y, z);
|
return rawChunkData.getBlockData(x, y, z);
|
||||||
@ -123,41 +122,41 @@ public class LinkedTerrainChunk implements TerrainChunk {
|
|||||||
|
|
||||||
@Deprecated
|
@Deprecated
|
||||||
@Override
|
@Override
|
||||||
public synchronized void setBlock(int x, int y, int z, @NotNull Material material) {
|
public synchronized void setBlock(int x, int y, int z, Material material) {
|
||||||
rawChunkData.setBlock(x, y, z, material);
|
rawChunkData.setBlock(x, y, z, material);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Deprecated
|
@Deprecated
|
||||||
@Override
|
@Override
|
||||||
public synchronized void setBlock(int x, int y, int z, @NotNull MaterialData material) {
|
public synchronized void setBlock(int x, int y, int z, MaterialData material) {
|
||||||
rawChunkData.setBlock(x, y, z, material);
|
rawChunkData.setBlock(x, y, z, material);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Deprecated
|
@Deprecated
|
||||||
@Override
|
@Override
|
||||||
public synchronized void setRegion(int xMin, int yMin, int zMin, int xMax, int yMax, int zMax, @NotNull Material material) {
|
public synchronized void setRegion(int xMin, int yMin, int zMin, int xMax, int yMax, int zMax, Material material) {
|
||||||
rawChunkData.setRegion(xMin, yMin, zMin, xMax, yMax, zMax, material);
|
rawChunkData.setRegion(xMin, yMin, zMin, xMax, yMax, zMax, material);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Deprecated
|
@Deprecated
|
||||||
@Override
|
@Override
|
||||||
public synchronized void setRegion(int xMin, int yMin, int zMin, int xMax, int yMax, int zMax, @NotNull MaterialData material) {
|
public synchronized void setRegion(int xMin, int yMin, int zMin, int xMax, int yMax, int zMax, MaterialData material) {
|
||||||
rawChunkData.setRegion(xMin, yMin, zMin, xMax, yMax, zMax, material);
|
rawChunkData.setRegion(xMin, yMin, zMin, xMax, yMax, zMax, material);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public synchronized void setRegion(int xMin, int yMin, int zMin, int xMax, int yMax, int zMax, @NotNull BlockData blockData) {
|
public synchronized void setRegion(int xMin, int yMin, int zMin, int xMax, int yMax, int zMax, BlockData blockData) {
|
||||||
rawChunkData.setRegion(xMin, yMin, zMin, xMax, yMax, zMax, blockData);
|
rawChunkData.setRegion(xMin, yMin, zMin, xMax, yMax, zMax, blockData);
|
||||||
}
|
}
|
||||||
|
|
||||||
@NotNull
|
|
||||||
@Deprecated
|
@Deprecated
|
||||||
@Override
|
@Override
|
||||||
public synchronized Material getType(int x, int y, int z) {
|
public synchronized Material getType(int x, int y, int z) {
|
||||||
return rawChunkData.getType(x, y, z);
|
return rawChunkData.getType(x, y, z);
|
||||||
}
|
}
|
||||||
|
|
||||||
@NotNull
|
|
||||||
@Deprecated
|
@Deprecated
|
||||||
@Override
|
@Override
|
||||||
public MaterialData getTypeAndData(int x, int y, int z) {
|
public MaterialData getTypeAndData(int x, int y, int z) {
|
||||||
|
@ -28,7 +28,6 @@ import org.bukkit.block.Biome;
|
|||||||
import org.bukkit.block.data.BlockData;
|
import org.bukkit.block.data.BlockData;
|
||||||
import org.bukkit.generator.ChunkGenerator;
|
import org.bukkit.generator.ChunkGenerator;
|
||||||
import org.bukkit.material.MaterialData;
|
import org.bukkit.material.MaterialData;
|
||||||
import org.jetbrains.annotations.NotNull;
|
|
||||||
|
|
||||||
@Builder
|
@Builder
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@ -51,13 +50,13 @@ public class MCATerrainChunk implements TerrainChunk {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@NotNull
|
|
||||||
@Override
|
@Override
|
||||||
public Biome getBiome(int x, int z) {
|
public Biome getBiome(int x, int z) {
|
||||||
return Biome.THE_VOID;
|
return Biome.THE_VOID;
|
||||||
}
|
}
|
||||||
|
|
||||||
@NotNull
|
|
||||||
@Override
|
@Override
|
||||||
public Biome getBiome(int x, int y, int z) {
|
public Biome getBiome(int x, int y, int z) {
|
||||||
return Biome.THE_VOID;
|
return Biome.THE_VOID;
|
||||||
@ -95,7 +94,7 @@ public class MCATerrainChunk implements TerrainChunk {
|
|||||||
mcaChunk.setBlockStateAt(xx, y, zz, NBTWorld.getCompound(blockData), false);
|
mcaChunk.setBlockStateAt(xx, y, zz, NBTWorld.getCompound(blockData), false);
|
||||||
}
|
}
|
||||||
|
|
||||||
@NotNull
|
|
||||||
@Override
|
@Override
|
||||||
public org.bukkit.block.data.BlockData getBlockData(int x, int y, int z) {
|
public org.bukkit.block.data.BlockData getBlockData(int x, int y, int z) {
|
||||||
if (y > getMaxHeight()) {
|
if (y > getMaxHeight()) {
|
||||||
@ -120,37 +119,37 @@ public class MCATerrainChunk implements TerrainChunk {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setBlock(int x, int y, int z, @NotNull Material material) {
|
public void setBlock(int x, int y, int z, Material material) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setBlock(int x, int y, int z, @NotNull MaterialData material) {
|
public void setBlock(int x, int y, int z, MaterialData material) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setRegion(int xMin, int yMin, int zMin, int xMax, int yMax, int zMax, @NotNull Material material) {
|
public void setRegion(int xMin, int yMin, int zMin, int xMax, int yMax, int zMax, Material material) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setRegion(int xMin, int yMin, int zMin, int xMax, int yMax, int zMax, @NotNull MaterialData material) {
|
public void setRegion(int xMin, int yMin, int zMin, int xMax, int yMax, int zMax, MaterialData material) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setRegion(int xMin, int yMin, int zMin, int xMax, int yMax, int zMax, @NotNull BlockData blockData) {
|
public void setRegion(int xMin, int yMin, int zMin, int xMax, int yMax, int zMax, BlockData blockData) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@NotNull
|
|
||||||
@Override
|
@Override
|
||||||
public Material getType(int x, int y, int z) {
|
public Material getType(int x, int y, int z) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@NotNull
|
|
||||||
@Override
|
@Override
|
||||||
public MaterialData getTypeAndData(int x, int y, int z) {
|
public MaterialData getTypeAndData(int x, int y, int z) {
|
||||||
return null;
|
return null;
|
||||||
|
@ -24,7 +24,6 @@ import org.bukkit.block.Biome;
|
|||||||
import org.bukkit.block.data.BlockData;
|
import org.bukkit.block.data.BlockData;
|
||||||
import org.bukkit.generator.ChunkGenerator.BiomeGrid;
|
import org.bukkit.generator.ChunkGenerator.BiomeGrid;
|
||||||
import org.bukkit.generator.ChunkGenerator.ChunkData;
|
import org.bukkit.generator.ChunkGenerator.ChunkData;
|
||||||
import org.jetbrains.annotations.NotNull;
|
|
||||||
|
|
||||||
public interface TerrainChunk extends BiomeGrid, ChunkData {
|
public interface TerrainChunk extends BiomeGrid, ChunkData {
|
||||||
static TerrainChunk create(World world) {
|
static TerrainChunk create(World world) {
|
||||||
@ -51,7 +50,7 @@ public interface TerrainChunk extends BiomeGrid, ChunkData {
|
|||||||
* @return Biome value
|
* @return Biome value
|
||||||
* @deprecated biomes are now 3-dimensional
|
* @deprecated biomes are now 3-dimensional
|
||||||
*/
|
*/
|
||||||
@NotNull
|
|
||||||
@Deprecated
|
@Deprecated
|
||||||
Biome getBiome(int x, int z);
|
Biome getBiome(int x, int z);
|
||||||
|
|
||||||
@ -63,7 +62,6 @@ public interface TerrainChunk extends BiomeGrid, ChunkData {
|
|||||||
* @param z - 0-15
|
* @param z - 0-15
|
||||||
* @return Biome value
|
* @return Biome value
|
||||||
*/
|
*/
|
||||||
@NotNull
|
|
||||||
Biome getBiome(int x, int y, int z);
|
Biome getBiome(int x, int y, int z);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -75,7 +73,7 @@ public interface TerrainChunk extends BiomeGrid, ChunkData {
|
|||||||
* @deprecated biomes are now 3-dimensional
|
* @deprecated biomes are now 3-dimensional
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
void setBiome(int x, int z, @NotNull Biome bio);
|
void setBiome(int x, int z, Biome bio);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set biome at x, z within chunk being generated
|
* Set biome at x, z within chunk being generated
|
||||||
@ -85,7 +83,7 @@ public interface TerrainChunk extends BiomeGrid, ChunkData {
|
|||||||
* @param z - 0-15
|
* @param z - 0-15
|
||||||
* @param bio - Biome value
|
* @param bio - Biome value
|
||||||
*/
|
*/
|
||||||
void setBiome(int x, int y, int z, @NotNull Biome bio);
|
void setBiome(int x, int y, int z, Biome bio);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the maximum height for the chunk.
|
* Get the maximum height for the chunk.
|
||||||
@ -107,7 +105,7 @@ public interface TerrainChunk extends BiomeGrid, ChunkData {
|
|||||||
* @param z the z location in the chunk from 0-15 inclusive
|
* @param z the z location in the chunk from 0-15 inclusive
|
||||||
* @param blockData the type to set the block to
|
* @param blockData the type to set the block to
|
||||||
*/
|
*/
|
||||||
void setBlock(int x, int y, int z, @NotNull BlockData blockData);
|
void setBlock(int x, int y, int z, BlockData blockData);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the type and data of the block at x, y, z.
|
* Get the type and data of the block at x, y, z.
|
||||||
@ -121,7 +119,6 @@ public interface TerrainChunk extends BiomeGrid, ChunkData {
|
|||||||
* @return the data of the block or the BlockData for air if x, y or z are
|
* @return the data of the block or the BlockData for air if x, y or z are
|
||||||
* outside the chunk's bounds
|
* outside the chunk's bounds
|
||||||
*/
|
*/
|
||||||
@NotNull
|
|
||||||
BlockData getBlockData(int x, int y, int z);
|
BlockData getBlockData(int x, int y, int z);
|
||||||
|
|
||||||
ChunkData getRaw();
|
ChunkData getRaw();
|
||||||
|
@ -18,8 +18,6 @@
|
|||||||
|
|
||||||
package com.volmit.iris.engine.data.nbt.tag;
|
package com.volmit.iris.engine.data.nbt.tag;
|
||||||
|
|
||||||
import org.jetbrains.annotations.NotNull;
|
|
||||||
|
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
@ -64,7 +62,7 @@ class NonNullEntrySet<K, V> implements Set<Map.Entry<K, V>> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public <T> T[] toArray(@NotNull T[] a) {
|
public <T> T[] toArray(T[] a) {
|
||||||
return set.toArray(a);
|
return set.toArray(a);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -79,22 +77,22 @@ class NonNullEntrySet<K, V> implements Set<Map.Entry<K, V>> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean containsAll(@NotNull Collection<?> c) {
|
public boolean containsAll(Collection<?> c) {
|
||||||
return set.containsAll(c);
|
return set.containsAll(c);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean addAll(@NotNull Collection<? extends Map.Entry<K, V>> c) {
|
public boolean addAll(Collection<? extends Map.Entry<K, V>> c) {
|
||||||
return set.addAll(c);
|
return set.addAll(c);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean retainAll(@NotNull Collection<?> c) {
|
public boolean retainAll(Collection<?> c) {
|
||||||
return set.retainAll(c);
|
return set.retainAll(c);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean removeAll(@NotNull Collection<?> c) {
|
public boolean removeAll(Collection<?> c) {
|
||||||
return set.removeAll(c);
|
return set.removeAll(c);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -58,8 +58,6 @@ import org.bukkit.command.CommandSender;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.generator.BlockPopulator;
|
import org.bukkit.generator.BlockPopulator;
|
||||||
import org.bukkit.generator.ChunkGenerator;
|
import org.bukkit.generator.ChunkGenerator;
|
||||||
import org.jetbrains.annotations.NotNull;
|
|
||||||
import org.jetbrains.annotations.Nullable;
|
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.lang.reflect.Constructor;
|
import java.lang.reflect.Constructor;
|
||||||
@ -103,7 +101,7 @@ public class EngineCompositeGenerator extends ChunkGenerator implements IrisAcce
|
|||||||
art = J.ar(this::tick, 40);
|
art = J.ar(this::tick, 40);
|
||||||
populators = new KList<BlockPopulator>().qadd(new BlockPopulator() {
|
populators = new KList<BlockPopulator>().qadd(new BlockPopulator() {
|
||||||
@Override
|
@Override
|
||||||
public void populate(@NotNull World world, @NotNull Random random, @NotNull Chunk chunk) {
|
public void populate(World world, Random random, Chunk chunk) {
|
||||||
if (compound.get() != null) {
|
if (compound.get() != null) {
|
||||||
for (BlockPopulator i : compound.get().getPopulators()) {
|
for (BlockPopulator i : compound.get().getPopulators()) {
|
||||||
i.populate(world, random, chunk);
|
i.populate(world, random, chunk);
|
||||||
@ -456,9 +454,9 @@ public class EngineCompositeGenerator extends ChunkGenerator implements IrisAcce
|
|||||||
return new File(world + "/iris/pack");
|
return new File(world + "/iris/pack");
|
||||||
}
|
}
|
||||||
|
|
||||||
@NotNull
|
|
||||||
@Override
|
@Override
|
||||||
public ChunkData generateChunkData(@NotNull World world, @NotNull Random ignored, int x, int z, @NotNull BiomeGrid biome) {
|
public ChunkData generateChunkData(World world, Random ignored, int x, int z, BiomeGrid biome) {
|
||||||
try {
|
try {
|
||||||
PrecisionStopwatch ps = PrecisionStopwatch.start();
|
PrecisionStopwatch ps = PrecisionStopwatch.start();
|
||||||
TerrainChunk tc = TerrainChunk.create(world, biome);
|
TerrainChunk tc = TerrainChunk.create(world, biome);
|
||||||
@ -573,19 +571,19 @@ public class EngineCompositeGenerator extends ChunkGenerator implements IrisAcce
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean canSpawn(@NotNull World world, int x, int z) {
|
public boolean canSpawn(World world, int x, int z) {
|
||||||
return super.canSpawn(world, x, z);
|
return super.canSpawn(world, x, z);
|
||||||
}
|
}
|
||||||
|
|
||||||
@NotNull
|
|
||||||
@Override
|
@Override
|
||||||
public List<BlockPopulator> getDefaultPopulators(@NotNull World world) {
|
public List<BlockPopulator> getDefaultPopulators(World world) {
|
||||||
return populators;
|
return populators;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Nullable
|
|
||||||
@Override
|
@Override
|
||||||
public Location getFixedSpawnLocation(@NotNull World world, @NotNull Random random) {
|
public Location getFixedSpawnLocation(World world, Random random) {
|
||||||
return super.getFixedSpawnLocation(world, random);
|
return super.getFixedSpawnLocation(world, random);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -19,7 +19,6 @@
|
|||||||
package com.volmit.iris.engine.object;
|
package com.volmit.iris.engine.object;
|
||||||
|
|
||||||
import com.google.gson.Gson;
|
import com.google.gson.Gson;
|
||||||
import com.google.gson.JsonSyntaxException;
|
|
||||||
import com.volmit.iris.Iris;
|
import com.volmit.iris.Iris;
|
||||||
import com.volmit.iris.engine.data.B;
|
import com.volmit.iris.engine.data.B;
|
||||||
import com.volmit.iris.util.collection.KList;
|
import com.volmit.iris.util.collection.KList;
|
||||||
@ -31,7 +30,6 @@ import org.bukkit.Material;
|
|||||||
import org.bukkit.block.data.BlockData;
|
import org.bukkit.block.data.BlockData;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.IOException;
|
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
public class IrisCompat {
|
public class IrisCompat {
|
||||||
@ -151,7 +149,7 @@ public class IrisCompat {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static IrisCompat configured(File f) throws IOException {
|
public static IrisCompat configured(File f) {
|
||||||
IrisCompat def = new IrisCompat();
|
IrisCompat def = new IrisCompat();
|
||||||
String defa = new JSONObject(new Gson().toJson(def)).toString(4);
|
String defa = new JSONObject(new Gson().toJson(def)).toString(4);
|
||||||
J.attemptAsync(() -> IO.writeAll(new File(f.getParentFile(), "compat.default.json"), defa));
|
J.attemptAsync(() -> IO.writeAll(new File(f.getParentFile(), "compat.default.json"), defa));
|
||||||
@ -170,7 +168,7 @@ public class IrisCompat {
|
|||||||
for (IrisCompatabilityItemFilter i : rea.getItemFilters()) {
|
for (IrisCompatabilityItemFilter i : rea.getItemFilters()) {
|
||||||
def.getItemFilters().add(i);
|
def.getItemFilters().add(i);
|
||||||
}
|
}
|
||||||
} catch (JsonSyntaxException e) {
|
} catch (Throwable e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
Iris.reportError(e);
|
Iris.reportError(e);
|
||||||
}
|
}
|
||||||
|
@ -22,7 +22,6 @@ import com.volmit.iris.Iris;
|
|||||||
import com.volmit.iris.engine.framework.Engine;
|
import com.volmit.iris.engine.framework.Engine;
|
||||||
import com.volmit.iris.engine.object.annotations.ArrayType;
|
import com.volmit.iris.engine.object.annotations.ArrayType;
|
||||||
import com.volmit.iris.engine.object.annotations.Desc;
|
import com.volmit.iris.engine.object.annotations.Desc;
|
||||||
import com.volmit.iris.engine.object.annotations.RegistryListMythical;
|
|
||||||
import com.volmit.iris.engine.object.annotations.Required;
|
import com.volmit.iris.engine.object.annotations.Required;
|
||||||
import com.volmit.iris.util.collection.KList;
|
import com.volmit.iris.util.collection.KList;
|
||||||
import com.volmit.iris.util.format.C;
|
import com.volmit.iris.util.format.C;
|
||||||
@ -63,10 +62,6 @@ public class IrisEntity extends IrisRegistrant {
|
|||||||
@Desc("The type of entity to spawn. To spawn a mythic mob, set this type to unknown and define mythic type.")
|
@Desc("The type of entity to spawn. To spawn a mythic mob, set this type to unknown and define mythic type.")
|
||||||
private EntityType type = EntityType.UNKNOWN;
|
private EntityType type = EntityType.UNKNOWN;
|
||||||
|
|
||||||
@RegistryListMythical
|
|
||||||
@Desc("The type of mythic mob (if mythic mobs is installed). If this is set, make sure to set 'type' to UNKNOWN")
|
|
||||||
private String mythicalType = "";
|
|
||||||
|
|
||||||
@Desc("The custom name of this entity")
|
@Desc("The custom name of this entity")
|
||||||
private String customName = "";
|
private String customName = "";
|
||||||
|
|
||||||
@ -281,17 +276,10 @@ public class IrisEntity extends IrisRegistrant {
|
|||||||
return ae.get();
|
return ae.get();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isMythical()) {
|
|
||||||
return Iris.linkMythicMobs.spawn(getMythicalType(), at);
|
|
||||||
}
|
|
||||||
|
|
||||||
return at.getWorld().spawnEntity(at, getType());
|
return at.getWorld().spawnEntity(at, getType());
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isMythical() {
|
|
||||||
return Iris.linkMythicMobs.supported() && !getMythicalType().trim().isEmpty();
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean isCitizens() {
|
public boolean isCitizens() {
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
@ -1,31 +0,0 @@
|
|||||||
/*
|
|
||||||
* Iris is a World Generator for Minecraft Bukkit Servers
|
|
||||||
* Copyright (c) 2021 Arcane Arts (Volmit Software)
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package com.volmit.iris.engine.object.annotations;
|
|
||||||
|
|
||||||
import java.lang.annotation.Retention;
|
|
||||||
import java.lang.annotation.Target;
|
|
||||||
|
|
||||||
import static java.lang.annotation.ElementType.*;
|
|
||||||
import static java.lang.annotation.RetentionPolicy.RUNTIME;
|
|
||||||
|
|
||||||
@Retention(RUNTIME)
|
|
||||||
@Target({PARAMETER, TYPE, FIELD})
|
|
||||||
public @interface RegistryListMythical {
|
|
||||||
|
|
||||||
}
|
|
@ -24,7 +24,6 @@ import org.bukkit.*;
|
|||||||
import org.bukkit.block.Block;
|
import org.bukkit.block.Block;
|
||||||
import org.bukkit.configuration.serialization.ConfigurationSerializable;
|
import org.bukkit.configuration.serialization.ConfigurationSerializable;
|
||||||
import org.bukkit.entity.Entity;
|
import org.bukkit.entity.Entity;
|
||||||
import org.jetbrains.annotations.NotNull;
|
|
||||||
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
@ -158,7 +157,6 @@ public class Cuboid implements Iterable<Block>, Cloneable, ConfigurationSerializ
|
|||||||
z2 = (Integer) map.get("z2");
|
z2 = (Integer) map.get("z2");
|
||||||
}
|
}
|
||||||
|
|
||||||
@NotNull
|
|
||||||
@Override
|
@Override
|
||||||
public Map<String, Object> serialize() {
|
public Map<String, Object> serialize() {
|
||||||
Map<String, Object> map = new HashMap<>();
|
Map<String, Object> map = new HashMap<>();
|
||||||
|
@ -20,7 +20,6 @@ package com.volmit.iris.util.data;
|
|||||||
|
|
||||||
import org.bukkit.block.Biome;
|
import org.bukkit.block.Biome;
|
||||||
import org.bukkit.generator.ChunkGenerator.BiomeGrid;
|
import org.bukkit.generator.ChunkGenerator.BiomeGrid;
|
||||||
import org.jetbrains.annotations.NotNull;
|
|
||||||
|
|
||||||
public class InvertedBiomeGrid implements BiomeGrid {
|
public class InvertedBiomeGrid implements BiomeGrid {
|
||||||
private final BiomeGrid grid;
|
private final BiomeGrid grid;
|
||||||
@ -29,14 +28,14 @@ public class InvertedBiomeGrid implements BiomeGrid {
|
|||||||
this.grid = real;
|
this.grid = real;
|
||||||
}
|
}
|
||||||
|
|
||||||
@NotNull
|
|
||||||
@SuppressWarnings("deprecation")
|
@SuppressWarnings("deprecation")
|
||||||
@Override
|
@Override
|
||||||
public Biome getBiome(int arg0, int arg1) {
|
public Biome getBiome(int arg0, int arg1) {
|
||||||
return grid.getBiome(arg0, arg1);
|
return grid.getBiome(arg0, arg1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@NotNull
|
|
||||||
@Override
|
@Override
|
||||||
public Biome getBiome(int arg0, int arg1, int arg2) {
|
public Biome getBiome(int arg0, int arg1, int arg2) {
|
||||||
return grid.getBiome(arg0, 255 - arg1, arg2);
|
return grid.getBiome(arg0, 255 - arg1, arg2);
|
||||||
@ -44,12 +43,12 @@ public class InvertedBiomeGrid implements BiomeGrid {
|
|||||||
|
|
||||||
@SuppressWarnings("deprecation")
|
@SuppressWarnings("deprecation")
|
||||||
@Override
|
@Override
|
||||||
public void setBiome(int arg0, int arg1, @NotNull Biome arg2) {
|
public void setBiome(int arg0, int arg1, Biome arg2) {
|
||||||
grid.setBiome(arg0, arg1, arg2);
|
grid.setBiome(arg0, arg1, arg2);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setBiome(int arg0, int arg1, int arg2, @NotNull Biome arg3) {
|
public void setBiome(int arg0, int arg1, int arg2, Biome arg3) {
|
||||||
grid.setBiome(arg0, 255 - arg1, arg2, arg3);
|
grid.setBiome(arg0, 255 - arg1, arg2, arg3);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -21,7 +21,6 @@ package com.volmit.iris.util.plugin;
|
|||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandExecutor;
|
import org.bukkit.command.CommandExecutor;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.jetbrains.annotations.NotNull;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Assistive command router
|
* Assistive command router
|
||||||
@ -45,21 +44,21 @@ public class RouterCommand extends org.bukkit.command.Command {
|
|||||||
this.ex = ex;
|
this.ex = ex;
|
||||||
}
|
}
|
||||||
|
|
||||||
@NotNull
|
|
||||||
@Override
|
@Override
|
||||||
public Command setUsage(@NotNull String u) {
|
public Command setUsage(String u) {
|
||||||
this.usage = u;
|
this.usage = u;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@NotNull
|
|
||||||
@Override
|
@Override
|
||||||
public String getUsage() {
|
public String getUsage() {
|
||||||
return usage;
|
return usage;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean execute(@NotNull CommandSender sender, @NotNull String commandLabel, @NotNull String[] args) {
|
public boolean execute(CommandSender sender, String commandLabel, String[] args) {
|
||||||
return ex.onCommand(sender, this, commandLabel, args);
|
return ex.onCommand(sender, this, commandLabel, args);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -37,8 +37,6 @@ import org.bukkit.permissions.PermissionDefault;
|
|||||||
import org.bukkit.plugin.Plugin;
|
import org.bukkit.plugin.Plugin;
|
||||||
import org.bukkit.plugin.RegisteredListener;
|
import org.bukkit.plugin.RegisteredListener;
|
||||||
import org.bukkit.plugin.java.JavaPlugin;
|
import org.bukkit.plugin.java.JavaPlugin;
|
||||||
import org.jetbrains.annotations.NotNull;
|
|
||||||
import org.jetbrains.annotations.Nullable;
|
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
@ -501,10 +499,10 @@ public abstract class VolmitPlugin extends JavaPlugin implements Listener {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Nullable
|
|
||||||
@Override
|
@Override
|
||||||
public List<String> onTabComplete(@NotNull CommandSender sender, @NotNull Command command,
|
public List<String> onTabComplete(CommandSender sender, Command command,
|
||||||
@NotNull String alias, @NotNull String[] args) {
|
String alias, String[] args) {
|
||||||
KList<String> chain = new KList<>();
|
KList<String> chain = new KList<>();
|
||||||
|
|
||||||
for (String i : args) {
|
for (String i : args) {
|
||||||
@ -532,7 +530,7 @@ public abstract class VolmitPlugin extends JavaPlugin implements Listener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onCommand(@NotNull CommandSender sender, @NotNull org.bukkit.command.Command command, @NotNull String label, @NotNull String[] args) {
|
public boolean onCommand(CommandSender sender, org.bukkit.command.Command command, String label, String[] args) {
|
||||||
if (bad) {
|
if (bad) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -28,8 +28,6 @@ import org.bukkit.permissions.Permission;
|
|||||||
import org.bukkit.permissions.PermissionAttachment;
|
import org.bukkit.permissions.PermissionAttachment;
|
||||||
import org.bukkit.permissions.PermissionAttachmentInfo;
|
import org.bukkit.permissions.PermissionAttachmentInfo;
|
||||||
import org.bukkit.plugin.Plugin;
|
import org.bukkit.plugin.Plugin;
|
||||||
import org.jetbrains.annotations.NotNull;
|
|
||||||
import org.jetbrains.annotations.Nullable;
|
|
||||||
|
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
@ -108,49 +106,49 @@ public class VolmitSender implements CommandSender {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isPermissionSet(@NotNull String name) {
|
public boolean isPermissionSet(String name) {
|
||||||
return s.isPermissionSet(name);
|
return s.isPermissionSet(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isPermissionSet(@NotNull Permission perm) {
|
public boolean isPermissionSet(Permission perm) {
|
||||||
return s.isPermissionSet(perm);
|
return s.isPermissionSet(perm);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean hasPermission(@NotNull String name) {
|
public boolean hasPermission(String name) {
|
||||||
return s.hasPermission(name);
|
return s.hasPermission(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean hasPermission(@NotNull Permission perm) {
|
public boolean hasPermission(Permission perm) {
|
||||||
return s.hasPermission(perm);
|
return s.hasPermission(perm);
|
||||||
}
|
}
|
||||||
|
|
||||||
@NotNull
|
|
||||||
@Override
|
@Override
|
||||||
public PermissionAttachment addAttachment(@NotNull Plugin plugin, @NotNull String name, boolean value) {
|
public PermissionAttachment addAttachment(Plugin plugin, String name, boolean value) {
|
||||||
return s.addAttachment(plugin, name, value);
|
return s.addAttachment(plugin, name, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
@NotNull
|
|
||||||
@Override
|
@Override
|
||||||
public PermissionAttachment addAttachment(@NotNull Plugin plugin) {
|
public PermissionAttachment addAttachment(Plugin plugin) {
|
||||||
return s.addAttachment(plugin);
|
return s.addAttachment(plugin);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public PermissionAttachment addAttachment(@NotNull Plugin plugin, @NotNull String name, boolean value, int ticks) {
|
public PermissionAttachment addAttachment(Plugin plugin, String name, boolean value, int ticks) {
|
||||||
return s.addAttachment(plugin, name, value, ticks);
|
return s.addAttachment(plugin, name, value, ticks);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public PermissionAttachment addAttachment(@NotNull Plugin plugin, int ticks) {
|
public PermissionAttachment addAttachment(Plugin plugin, int ticks) {
|
||||||
return s.addAttachment(plugin, ticks);
|
return s.addAttachment(plugin, ticks);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void removeAttachment(@NotNull PermissionAttachment attachment) {
|
public void removeAttachment(PermissionAttachment attachment) {
|
||||||
s.removeAttachment(attachment);
|
s.removeAttachment(attachment);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -159,7 +157,7 @@ public class VolmitSender implements CommandSender {
|
|||||||
s.recalculatePermissions();
|
s.recalculatePermissions();
|
||||||
}
|
}
|
||||||
|
|
||||||
@NotNull
|
|
||||||
@Override
|
@Override
|
||||||
public Set<PermissionAttachmentInfo> getEffectivePermissions() {
|
public Set<PermissionAttachmentInfo> getEffectivePermissions() {
|
||||||
return s.getEffectivePermissions();
|
return s.getEffectivePermissions();
|
||||||
@ -180,7 +178,7 @@ public class VolmitSender implements CommandSender {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void sendMessage(@NotNull String message) {
|
public void sendMessage(String message) {
|
||||||
s.sendMessage(C.translateAlternateColorCodes('&', getTag()) + message);
|
s.sendMessage(C.translateAlternateColorCodes('&', getTag()) + message);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -191,28 +189,28 @@ public class VolmitSender implements CommandSender {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void sendMessage(@Nullable UUID uuid, @NotNull String message) {
|
public void sendMessage(UUID uuid, String message) {
|
||||||
sendMessage(message);
|
sendMessage(message);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void sendMessage(@Nullable UUID uuid, @NotNull String[] messages) {
|
public void sendMessage(UUID uuid, String[] messages) {
|
||||||
sendMessage(messages);
|
sendMessage(messages);
|
||||||
}
|
}
|
||||||
|
|
||||||
@NotNull
|
|
||||||
@Override
|
@Override
|
||||||
public Server getServer() {
|
public Server getServer() {
|
||||||
return s.getServer();
|
return s.getServer();
|
||||||
}
|
}
|
||||||
|
|
||||||
@NotNull
|
|
||||||
@Override
|
@Override
|
||||||
public String getName() {
|
public String getName() {
|
||||||
return s.getName();
|
return s.getName();
|
||||||
}
|
}
|
||||||
|
|
||||||
@NotNull
|
|
||||||
@Override
|
@Override
|
||||||
public Spigot spigot() {
|
public Spigot spigot() {
|
||||||
return s.spigot();
|
return s.spigot();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user