mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2025-07-18 02:03:59 +00:00
Added external block data registry.
This commit is contained in:
parent
0b332b06b6
commit
b8b9d7bf8c
@ -20,25 +20,18 @@ package com.volmit.iris;
|
||||
|
||||
import com.volmit.iris.core.IrisSettings;
|
||||
import com.volmit.iris.core.ServerConfigurator;
|
||||
import com.volmit.iris.core.link.IrisPapiExpansion;
|
||||
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.*;
|
||||
import com.volmit.iris.core.loader.IrisData;
|
||||
import com.volmit.iris.core.nms.INMS;
|
||||
import com.volmit.iris.core.service.StudioSVC;
|
||||
import com.volmit.iris.core.tools.IrisToolbelt;
|
||||
import com.volmit.iris.engine.EnginePanic;
|
||||
import com.volmit.iris.engine.object.IrisBiome;
|
||||
import com.volmit.iris.engine.object.IrisCompat;
|
||||
import com.volmit.iris.engine.object.IrisDimension;
|
||||
import com.volmit.iris.engine.object.IrisObject;
|
||||
import com.volmit.iris.engine.object.IrisWorld;
|
||||
import com.volmit.iris.engine.platform.BukkitChunkGenerator;
|
||||
import com.volmit.iris.engine.platform.DummyChunkGenerator;
|
||||
import com.volmit.iris.util.collection.KList;
|
||||
import com.volmit.iris.util.collection.KMap;
|
||||
import com.volmit.iris.util.data.B;
|
||||
import com.volmit.iris.util.exceptions.IrisException;
|
||||
import com.volmit.iris.util.format.C;
|
||||
import com.volmit.iris.util.format.Form;
|
||||
@ -46,8 +39,6 @@ import com.volmit.iris.util.function.NastyRunnable;
|
||||
import com.volmit.iris.util.io.*;
|
||||
import com.volmit.iris.util.math.M;
|
||||
import com.volmit.iris.util.math.RNG;
|
||||
import com.volmit.iris.util.matter.IrisMatter;
|
||||
import com.volmit.iris.util.matter.Matter;
|
||||
import com.volmit.iris.util.parallel.MultiBurst;
|
||||
import com.volmit.iris.util.plugin.IrisService;
|
||||
import com.volmit.iris.util.plugin.Metrics;
|
||||
@ -63,16 +54,12 @@ import net.kyori.adventure.text.serializer.ComponentSerializer;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.GameMode;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.WorldCreator;
|
||||
import org.bukkit.block.data.BlockData;
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.configuration.InvalidConfigurationException;
|
||||
import org.bukkit.configuration.file.FileConfiguration;
|
||||
import org.bukkit.configuration.file.YamlConfiguration;
|
||||
import org.bukkit.entity.EntityType;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.Event;
|
||||
import org.bukkit.event.HandlerList;
|
||||
@ -100,7 +87,6 @@ public class Iris extends VolmitPlugin implements Listener {
|
||||
public static Iris instance;
|
||||
public static BukkitAudiences audiences;
|
||||
public static MultiverseCoreLink linkMultiverseCore;
|
||||
public static OraxenLink linkOraxen;
|
||||
public static MythicMobsLink linkMythicMobs;
|
||||
public static IrisCompat compat;
|
||||
public static FileWatcher configWatcher;
|
||||
@ -405,7 +391,6 @@ public class Iris extends VolmitPlugin implements Listener {
|
||||
instance = this;
|
||||
compat = IrisCompat.configured(getDataFile("compat.json"));
|
||||
linkMultiverseCore = new MultiverseCoreLink();
|
||||
linkOraxen = new OraxenLink();
|
||||
linkMythicMobs = new MythicMobsLink();
|
||||
configWatcher = new FileWatcher(getDataFile("settings.json"));
|
||||
services.values().forEach(IrisService::onEnable);
|
||||
|
@ -0,0 +1,35 @@
|
||||
package com.volmit.iris.core.link;
|
||||
|
||||
import com.volmit.iris.util.collection.KList;
|
||||
import lombok.Getter;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.block.data.BlockData;
|
||||
import org.bukkit.plugin.Plugin;
|
||||
|
||||
import java.util.MissingResourceException;
|
||||
|
||||
@RequiredArgsConstructor
|
||||
public abstract class BlockDataProvider {
|
||||
|
||||
@Getter
|
||||
private final String pluginId, identifierPrefix;
|
||||
|
||||
public Plugin getPlugin() {
|
||||
return Bukkit.getPluginManager().getPlugin(pluginId);
|
||||
}
|
||||
|
||||
public boolean isPresent() {
|
||||
return getPlugin() != null;
|
||||
}
|
||||
|
||||
public abstract BlockData getBlockData(String blockId) throws MissingResourceException;
|
||||
|
||||
public String[] getBlockIdentifiers() {
|
||||
KList<String> names = new KList<>(getBlockTypes());
|
||||
names.rewrite(s -> identifierPrefix + ":" + s);
|
||||
return names.toArray(new String[0]);
|
||||
}
|
||||
|
||||
public abstract String[] getBlockTypes();
|
||||
}
|
22
src/main/java/com/volmit/iris/core/link/ItemAdderLink.java
Normal file
22
src/main/java/com/volmit/iris/core/link/ItemAdderLink.java
Normal file
@ -0,0 +1,22 @@
|
||||
package com.volmit.iris.core.link;
|
||||
|
||||
import org.bukkit.block.data.BlockData;
|
||||
|
||||
import java.util.MissingResourceException;
|
||||
|
||||
public class ItemAdderLink extends BlockDataProvider {
|
||||
|
||||
public ItemAdderLink() {
|
||||
super("ItemAdder", "itemadder");
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlockData getBlockData(String blockId) throws MissingResourceException {
|
||||
throw new MissingResourceException("Fuck you, not implemented yet.", getPluginId(), blockId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String[] getBlockTypes() {
|
||||
return new String[0];
|
||||
}
|
||||
}
|
@ -0,0 +1,95 @@
|
||||
/*
|
||||
* Iris is a World Generator for Minecraft Bukkit Servers
|
||||
* Copyright (c) 2022 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.Iris;
|
||||
import com.volmit.iris.util.collection.KList;
|
||||
import io.th0rgal.oraxen.items.OraxenItems;
|
||||
import io.th0rgal.oraxen.mechanics.MechanicFactory;
|
||||
import io.th0rgal.oraxen.mechanics.MechanicsManager;
|
||||
import io.th0rgal.oraxen.mechanics.provided.gameplay.block.BlockMechanic;
|
||||
import io.th0rgal.oraxen.mechanics.provided.gameplay.block.BlockMechanicFactory;
|
||||
import io.th0rgal.oraxen.mechanics.provided.gameplay.noteblock.NoteBlockMechanicFactory;
|
||||
import io.th0rgal.oraxen.utils.Utils;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.block.data.BlockData;
|
||||
import org.bukkit.block.data.MultipleFacing;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.util.Map;
|
||||
import java.util.MissingResourceException;
|
||||
|
||||
public class OraxenDataProvider extends BlockDataProvider {
|
||||
|
||||
private static final String FIELD_FACTORIES_MAP = "FACTORIES_BY_MECHANIC_ID";
|
||||
|
||||
private Map<String, MechanicFactory> factories;
|
||||
|
||||
public OraxenDataProvider() {
|
||||
super("Oraxen", "oraxen");
|
||||
|
||||
try {
|
||||
Field f = MechanicsManager.class.getDeclaredField(FIELD_FACTORIES_MAP);
|
||||
f.setAccessible(true);
|
||||
factories = (Map<String, MechanicFactory>) f.get(null);
|
||||
} catch(NoSuchFieldException | IllegalAccessException e) {
|
||||
Iris.error("Failed to set up Oraxen Link:");
|
||||
Iris.error("\t" + e.getClass().getSimpleName());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlockData getBlockData(String blockId) throws MissingResourceException {
|
||||
MechanicFactory f = getFactory(blockId);
|
||||
if(f instanceof NoteBlockMechanicFactory)
|
||||
return ((NoteBlockMechanicFactory)f).createNoteBlockData(blockId);
|
||||
else if(f instanceof BlockMechanicFactory) {
|
||||
MultipleFacing newBlockData = (MultipleFacing) Bukkit.createBlockData(Material.MUSHROOM_STEM);
|
||||
Utils.setBlockFacing(newBlockData, ((BlockMechanic)f.getMechanic(blockId)).getCustomVariation());
|
||||
return newBlockData;
|
||||
} else
|
||||
throw new MissingResourceException("Failed to find BlockData!", getIdentifierPrefix(), blockId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String[] getBlockTypes() {
|
||||
KList<String> names = new KList<>();
|
||||
for(String name : OraxenItems.getItemNames()) {
|
||||
try {
|
||||
if(getBlockData(name) != null)
|
||||
names.add(name);
|
||||
} catch(MissingResourceException ignored) { }
|
||||
}
|
||||
|
||||
return names.toArray(new String[0]);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isPresent() {
|
||||
return super.isPresent() && factories != null;
|
||||
}
|
||||
|
||||
private MechanicFactory getFactory(String blockId) throws MissingResourceException {
|
||||
return factories.values().stream()
|
||||
.filter(i -> i.getItems().contains(blockId))
|
||||
.findFirst()
|
||||
.orElseThrow(() -> new MissingResourceException("Failed to find BlockData!", getPluginId(), blockId));
|
||||
}
|
||||
}
|
@ -1,113 +0,0 @@
|
||||
/*
|
||||
* Iris is a World Generator for Minecraft Bukkit Servers
|
||||
* Copyright (c) 2022 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.th0rgal.oraxen.items.OraxenItems;
|
||||
import io.th0rgal.oraxen.mechanics.Mechanic;
|
||||
import io.th0rgal.oraxen.mechanics.MechanicFactory;
|
||||
import io.th0rgal.oraxen.mechanics.MechanicsManager;
|
||||
import io.th0rgal.oraxen.mechanics.provided.gameplay.block.BlockMechanic;
|
||||
import io.th0rgal.oraxen.mechanics.provided.gameplay.block.BlockMechanicFactory;
|
||||
import io.th0rgal.oraxen.mechanics.provided.gameplay.noteblock.NoteBlockMechanicFactory;
|
||||
import io.th0rgal.oraxen.utils.Utils;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.block.data.BlockData;
|
||||
import org.bukkit.block.data.MultipleFacing;
|
||||
import org.bukkit.plugin.Plugin;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.util.Map;
|
||||
|
||||
public class OraxenLink {
|
||||
private static final String[] EMPTY = new String[0];
|
||||
|
||||
public boolean supported() {
|
||||
return getOraxen() != null;
|
||||
}
|
||||
|
||||
public BlockData getBlockDataFor(String id) {
|
||||
if(!supported()) {
|
||||
return null;
|
||||
}
|
||||
|
||||
MechanicFactory f = getFactory(id);
|
||||
|
||||
if(f == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
Mechanic m = f.getMechanic(id);
|
||||
|
||||
// TODO: Why isnt there a simple getBlockData() function?
|
||||
if(m.getFactory() instanceof NoteBlockMechanicFactory) {
|
||||
return ((NoteBlockMechanicFactory) m.getFactory()).createNoteBlockData(id);
|
||||
} else if(m.getFactory() instanceof BlockMechanicFactory) {
|
||||
MultipleFacing newBlockData = (MultipleFacing) Bukkit.createBlockData(Material.MUSHROOM_STEM);
|
||||
Utils.setBlockFacing(newBlockData, ((BlockMechanic) m).getCustomVariation());
|
||||
return newBlockData;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public MechanicFactory getFactory(String id) {
|
||||
if(!supported()) {
|
||||
return null;
|
||||
}
|
||||
|
||||
try {
|
||||
Field f = MechanicsManager.class.getDeclaredField("FACTORIES_BY_MECHANIC_ID");
|
||||
f.setAccessible(true);
|
||||
Map<String, MechanicFactory> map = (Map<String, MechanicFactory>) f.get(null);
|
||||
|
||||
for(MechanicFactory i : map.values()) {
|
||||
if(i.getItems().contains(id)) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
} catch(Throwable e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public String[] getItemTypes() {
|
||||
if(!supported()) {
|
||||
return EMPTY;
|
||||
}
|
||||
|
||||
KList<String> v = new KList<>();
|
||||
|
||||
for(String i : OraxenItems.getItemNames()) {
|
||||
if(getBlockDataFor(i) != null) {
|
||||
v.add(i);
|
||||
}
|
||||
}
|
||||
|
||||
return v.toArray(new String[0]);
|
||||
}
|
||||
|
||||
public Plugin getOraxen() {
|
||||
|
||||
return Bukkit.getPluginManager().getPlugin("Oraxen");
|
||||
}
|
||||
}
|
@ -0,0 +1,67 @@
|
||||
/*
|
||||
* Iris is a World Generator for Minecraft Bukkit Servers
|
||||
* Copyright (c) 2022 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.service;
|
||||
|
||||
import com.volmit.iris.Iris;
|
||||
import com.volmit.iris.core.link.BlockDataProvider;
|
||||
import com.volmit.iris.core.link.ItemAdderLink;
|
||||
import com.volmit.iris.core.link.OraxenDataProvider;
|
||||
import com.volmit.iris.util.collection.KList;
|
||||
import com.volmit.iris.util.plugin.IrisService;
|
||||
import lombok.Data;
|
||||
import org.bukkit.block.data.BlockData;
|
||||
|
||||
import java.util.MissingResourceException;
|
||||
import java.util.Optional;
|
||||
|
||||
@Data
|
||||
public class CustomBlockDataSVC implements IrisService {
|
||||
|
||||
private KList<BlockDataProvider> providers = new KList<>();
|
||||
|
||||
@Override
|
||||
public void onEnable() {
|
||||
addProvider(new OraxenDataProvider(), new ItemAdderLink());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDisable() { }
|
||||
|
||||
public void addProvider(BlockDataProvider... provider) {
|
||||
providers.add(provider);
|
||||
}
|
||||
|
||||
public Optional<BlockData> getBlockData(String namespace, String key) {
|
||||
Optional<BlockDataProvider> provider = providers.stream().filter(p -> p.isPresent() && p.getIdentifierPrefix().equalsIgnoreCase(namespace)).findFirst();
|
||||
if(provider.isEmpty())
|
||||
return Optional.empty();
|
||||
try {
|
||||
return Optional.of(provider.get().getBlockData(key));
|
||||
} catch(MissingResourceException e) {
|
||||
Iris.error(e.getMessage() + " - [" + e.getClassName() + ":" + e.getKey() + "]");
|
||||
return Optional.empty();
|
||||
}
|
||||
}
|
||||
|
||||
public String[] getAllIdentifiers() {
|
||||
KList<String> names = new KList<>();
|
||||
providers.forEach(p -> names.add(p.getBlockIdentifiers()));
|
||||
return names.toArray(new String[0]);
|
||||
}
|
||||
}
|
@ -1,41 +0,0 @@
|
||||
/*
|
||||
* Iris is a World Generator for Minecraft Bukkit Servers
|
||||
* Copyright (c) 2022 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.service;
|
||||
|
||||
import com.volmit.iris.util.plugin.IrisService;
|
||||
import com.volmit.iris.util.plugin.PluginRegistryGroup;
|
||||
import lombok.Data;
|
||||
import org.bukkit.block.data.BlockData;
|
||||
|
||||
import java.util.function.Supplier;
|
||||
|
||||
@Data
|
||||
public class RegistrySVC implements IrisService {
|
||||
private PluginRegistryGroup<Supplier<BlockData>> customBlockRegistry;
|
||||
|
||||
@Override
|
||||
public void onEnable() {
|
||||
customBlockRegistry = new PluginRegistryGroup<>();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDisable() {
|
||||
|
||||
}
|
||||
}
|
@ -20,7 +20,7 @@ package com.volmit.iris.util.data;
|
||||
|
||||
import com.volmit.iris.Iris;
|
||||
import com.volmit.iris.core.IrisSettings;
|
||||
import com.volmit.iris.core.service.RegistrySVC;
|
||||
import com.volmit.iris.core.service.CustomBlockDataSVC;
|
||||
import com.volmit.iris.util.collection.KList;
|
||||
import com.volmit.iris.util.collection.KMap;
|
||||
import com.volmit.iris.util.scheduling.ChronoLatch;
|
||||
@ -35,12 +35,11 @@ import org.bukkit.block.data.BlockData;
|
||||
import org.bukkit.block.data.Waterlogged;
|
||||
import org.bukkit.block.data.type.Leaves;
|
||||
import org.bukkit.block.data.type.PointedDripstone;
|
||||
import org.checkerframework.checker.units.qual.K;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.function.Supplier;
|
||||
import java.util.Optional;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static org.bukkit.Material.*;
|
||||
@ -471,23 +470,19 @@ public class B {
|
||||
BlockData bx = null;
|
||||
|
||||
if(!ix.startsWith("minecraft:")) {
|
||||
if(ix.startsWith("oraxen:") && Iris.linkOraxen.supported()) {
|
||||
bx = Iris.linkOraxen.getBlockDataFor(ix.split("\\Q:\\E")[1]);
|
||||
}
|
||||
|
||||
if(bx == null) {
|
||||
try {
|
||||
if(ix.contains(":")) {
|
||||
String[] v = ix.toLowerCase().split("\\Q:\\E");
|
||||
Supplier<BlockData> b = Iris.service(RegistrySVC.class).getCustomBlockRegistry().resolve(v[0], v[1]);
|
||||
|
||||
if(b != null) {
|
||||
bx = b.get();
|
||||
}
|
||||
try {
|
||||
if(ix.contains(":")) {
|
||||
String[] id = ix.toLowerCase().split("\\Q:\\E");
|
||||
Optional<BlockData> bd = Iris.service(CustomBlockDataSVC.class).getBlockData(id[0], id[1]);
|
||||
if(bd.isPresent()) {
|
||||
bx = bd.get();
|
||||
} else {
|
||||
/*Supplier<BlockData> sup = Iris.service(RegistrySVC.class).getCustomBlockRegistry().resolve(id[0], id[1]);
|
||||
bx = sup == null ? null : sup.get();*/
|
||||
}
|
||||
} catch(Throwable e) {
|
||||
e.printStackTrace();// TODO: REMOVE
|
||||
}
|
||||
} catch(Throwable e) {
|
||||
e.printStackTrace();// TODO: REMOVE
|
||||
}
|
||||
}
|
||||
|
||||
@ -661,22 +656,9 @@ public class B {
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
for(String i : Iris.linkOraxen.getItemTypes()) {
|
||||
bt.add("oraxen:" + i);
|
||||
}
|
||||
} catch(Throwable e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
bt.add(Iris.service(CustomBlockDataSVC.class).getAllIdentifiers());
|
||||
bt.addAll(custom.k());
|
||||
|
||||
try {
|
||||
bt.addAll(Iris.service(RegistrySVC.class).getCustomBlockRegistry().compile());
|
||||
} catch(Throwable e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
return bt.toArray(new String[0]);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user