Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-18 20:40:08 +01:00
Misc checkstyle fixes
Dieser Commit ist enthalten in:
Ursprung
8bd0e9ab0e
Commit
ce66f6937b
@ -4,7 +4,6 @@ import com.google.common.base.Preconditions;
|
|||||||
import java.lang.ref.WeakReference;
|
import java.lang.ref.WeakReference;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import net.minecraft.server.BiomeBase;
|
|
||||||
import net.minecraft.server.BiomeStorage;
|
import net.minecraft.server.BiomeStorage;
|
||||||
import net.minecraft.server.BlockPosition;
|
import net.minecraft.server.BlockPosition;
|
||||||
import net.minecraft.server.Blocks;
|
import net.minecraft.server.Blocks;
|
||||||
|
@ -3,7 +3,7 @@ package org.bukkit.craftbukkit;
|
|||||||
import net.minecraft.server.RayTrace.FluidCollisionOption;
|
import net.minecraft.server.RayTrace.FluidCollisionOption;
|
||||||
import org.bukkit.FluidCollisionMode;
|
import org.bukkit.FluidCollisionMode;
|
||||||
|
|
||||||
public class CraftFluidCollisionMode {
|
public final class CraftFluidCollisionMode {
|
||||||
|
|
||||||
private CraftFluidCollisionMode() {}
|
private CraftFluidCollisionMode() {}
|
||||||
|
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
package org.bukkit.craftbukkit;
|
package org.bukkit.craftbukkit;
|
||||||
|
|
||||||
|
import com.google.common.base.Preconditions;
|
||||||
|
import com.google.common.collect.ImmutableList;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
import java.util.function.Function;
|
import java.util.function.Function;
|
||||||
import com.google.common.base.Preconditions;
|
|
||||||
import com.google.common.collect.ImmutableList;
|
|
||||||
import net.minecraft.server.BlockPosition;
|
import net.minecraft.server.BlockPosition;
|
||||||
import net.minecraft.server.EntityRaider;
|
import net.minecraft.server.EntityRaider;
|
||||||
import net.minecraft.server.World;
|
import net.minecraft.server.World;
|
||||||
|
@ -17,6 +17,7 @@ import com.mojang.brigadier.tree.LiteralCommandNode;
|
|||||||
import io.netty.buffer.ByteBuf;
|
import io.netty.buffer.ByteBuf;
|
||||||
import io.netty.buffer.ByteBufOutputStream;
|
import io.netty.buffer.ByteBufOutputStream;
|
||||||
import io.netty.buffer.Unpooled;
|
import io.netty.buffer.Unpooled;
|
||||||
|
import it.unimi.dsi.fastutil.objects.Object2ObjectLinkedOpenHashMap;
|
||||||
import java.awt.image.BufferedImage;
|
import java.awt.image.BufferedImage;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.FileInputStream;
|
import java.io.FileInputStream;
|
||||||
@ -41,7 +42,6 @@ import java.util.function.Consumer;
|
|||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
import javax.imageio.ImageIO;
|
import javax.imageio.ImageIO;
|
||||||
import it.unimi.dsi.fastutil.objects.Object2ObjectLinkedOpenHashMap;
|
|
||||||
import jline.console.ConsoleReader;
|
import jline.console.ConsoleReader;
|
||||||
import net.minecraft.server.Advancement;
|
import net.minecraft.server.Advancement;
|
||||||
import net.minecraft.server.ArgumentEntity;
|
import net.minecraft.server.ArgumentEntity;
|
||||||
|
@ -4,6 +4,7 @@ import com.google.common.base.Preconditions;
|
|||||||
import com.google.common.collect.ImmutableList;
|
import com.google.common.collect.ImmutableList;
|
||||||
import com.google.common.collect.ImmutableMap;
|
import com.google.common.collect.ImmutableMap;
|
||||||
import it.unimi.dsi.fastutil.longs.Long2ObjectLinkedOpenHashMap;
|
import it.unimi.dsi.fastutil.longs.Long2ObjectLinkedOpenHashMap;
|
||||||
|
import it.unimi.dsi.fastutil.longs.Long2ObjectMap;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
@ -20,7 +21,6 @@ import java.util.Set;
|
|||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
import java.util.function.Predicate;
|
import java.util.function.Predicate;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
import it.unimi.dsi.fastutil.longs.Long2ObjectMap;
|
|
||||||
import net.minecraft.server.ArraySetSorted;
|
import net.minecraft.server.ArraySetSorted;
|
||||||
import net.minecraft.server.AxisAlignedBB;
|
import net.minecraft.server.AxisAlignedBB;
|
||||||
import net.minecraft.server.BiomeBase;
|
import net.minecraft.server.BiomeBase;
|
||||||
@ -102,10 +102,10 @@ import org.bukkit.FluidCollisionMode;
|
|||||||
import org.bukkit.GameRule;
|
import org.bukkit.GameRule;
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
import org.bukkit.Particle;
|
import org.bukkit.Particle;
|
||||||
|
import org.bukkit.Raid;
|
||||||
import org.bukkit.Sound;
|
import org.bukkit.Sound;
|
||||||
import org.bukkit.StructureType;
|
import org.bukkit.StructureType;
|
||||||
import org.bukkit.TreeType;
|
import org.bukkit.TreeType;
|
||||||
import org.bukkit.Raid;
|
|
||||||
import org.bukkit.World;
|
import org.bukkit.World;
|
||||||
import org.bukkit.WorldBorder;
|
import org.bukkit.WorldBorder;
|
||||||
import org.bukkit.block.Biome;
|
import org.bukkit.block.Biome;
|
||||||
|
@ -173,7 +173,6 @@ public class Main {
|
|||||||
System.setProperty(jline.TerminalFactory.JLINE_TERMINAL, jline.UnsupportedTerminal.class.getName());
|
System.setProperty(jline.TerminalFactory.JLINE_TERMINAL, jline.UnsupportedTerminal.class.getName());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (options.has("noconsole")) {
|
if (options.has("noconsole")) {
|
||||||
useConsole = false;
|
useConsole = false;
|
||||||
}
|
}
|
||||||
|
@ -254,10 +254,7 @@ public class CraftBlock implements Block {
|
|||||||
BlockFace[] values = BlockFace.values();
|
BlockFace[] values = BlockFace.values();
|
||||||
|
|
||||||
for (BlockFace face : values) {
|
for (BlockFace face : values) {
|
||||||
if ((this.getX() + face.getModX() == block.getX()) &&
|
if ((this.getX() + face.getModX() == block.getX()) && (this.getY() + face.getModY() == block.getY()) && (this.getZ() + face.getModZ() == block.getZ())) {
|
||||||
(this.getY() + face.getModY() == block.getY()) &&
|
|
||||||
(this.getZ() + face.getModZ() == block.getZ())
|
|
||||||
) {
|
|
||||||
return face;
|
return face;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -215,7 +215,7 @@ public class CraftBossBar implements BossBar {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private class FlagContainer {
|
private final class FlagContainer {
|
||||||
|
|
||||||
private Supplier<Boolean> get;
|
private Supplier<Boolean> get;
|
||||||
private Consumer<Boolean> set;
|
private Consumer<Boolean> set;
|
||||||
|
@ -9,7 +9,6 @@ import net.minecraft.server.EntityEnderDragon;
|
|||||||
import org.bukkit.boss.BossBar;
|
import org.bukkit.boss.BossBar;
|
||||||
import org.bukkit.boss.DragonBattle;
|
import org.bukkit.boss.DragonBattle;
|
||||||
import org.bukkit.craftbukkit.CraftServer;
|
import org.bukkit.craftbukkit.CraftServer;
|
||||||
import org.bukkit.craftbukkit.boss.CraftBossBar;
|
|
||||||
import org.bukkit.craftbukkit.boss.CraftDragonBattle;
|
import org.bukkit.craftbukkit.boss.CraftDragonBattle;
|
||||||
import org.bukkit.entity.ComplexEntityPart;
|
import org.bukkit.entity.ComplexEntityPart;
|
||||||
import org.bukkit.entity.EnderDragon;
|
import org.bukkit.entity.EnderDragon;
|
||||||
|
@ -180,9 +180,10 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static CraftEntity getEntity(CraftServer server, Entity entity) {
|
public static CraftEntity getEntity(CraftServer server, Entity entity) {
|
||||||
/**
|
/*
|
||||||
* Order is *EXTREMELY* important -- keep it right! =D
|
* Order is *EXTREMELY* important -- keep it right! =D
|
||||||
*/
|
*/
|
||||||
|
// CHECKSTYLE:OFF
|
||||||
if (entity instanceof EntityLiving) {
|
if (entity instanceof EntityLiving) {
|
||||||
// Players
|
// Players
|
||||||
if (entity instanceof EntityHuman) {
|
if (entity instanceof EntityHuman) {
|
||||||
@ -368,6 +369,7 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
|||||||
else if (entity instanceof EntityAreaEffectCloud) { return new CraftAreaEffectCloud(server, (EntityAreaEffectCloud) entity); }
|
else if (entity instanceof EntityAreaEffectCloud) { return new CraftAreaEffectCloud(server, (EntityAreaEffectCloud) entity); }
|
||||||
else if (entity instanceof EntityEvokerFangs) { return new CraftEvokerFangs(server, (EntityEvokerFangs) entity); }
|
else if (entity instanceof EntityEvokerFangs) { return new CraftEvokerFangs(server, (EntityEvokerFangs) entity); }
|
||||||
else if (entity instanceof EntityLlamaSpit) { return new CraftLlamaSpit(server, (EntityLlamaSpit) entity); }
|
else if (entity instanceof EntityLlamaSpit) { return new CraftLlamaSpit(server, (EntityLlamaSpit) entity); }
|
||||||
|
// CHECKSTYLE:ON
|
||||||
|
|
||||||
throw new AssertionError("Unknown entity " + (entity == null ? null : entity.getClass()));
|
throw new AssertionError("Unknown entity " + (entity == null ? null : entity.getClass()));
|
||||||
}
|
}
|
||||||
|
@ -45,11 +45,11 @@ import org.bukkit.attribute.AttributeInstance;
|
|||||||
import org.bukkit.block.Block;
|
import org.bukkit.block.Block;
|
||||||
import org.bukkit.craftbukkit.CraftServer;
|
import org.bukkit.craftbukkit.CraftServer;
|
||||||
import org.bukkit.craftbukkit.CraftWorld;
|
import org.bukkit.craftbukkit.CraftWorld;
|
||||||
|
import org.bukkit.craftbukkit.entity.memory.CraftMemoryKey;
|
||||||
|
import org.bukkit.craftbukkit.entity.memory.CraftMemoryMapper;
|
||||||
import org.bukkit.craftbukkit.inventory.CraftEntityEquipment;
|
import org.bukkit.craftbukkit.inventory.CraftEntityEquipment;
|
||||||
import org.bukkit.craftbukkit.inventory.CraftItemStack;
|
import org.bukkit.craftbukkit.inventory.CraftItemStack;
|
||||||
import org.bukkit.craftbukkit.potion.CraftPotionUtil;
|
import org.bukkit.craftbukkit.potion.CraftPotionUtil;
|
||||||
import org.bukkit.craftbukkit.entity.memory.CraftMemoryKey;
|
|
||||||
import org.bukkit.craftbukkit.entity.memory.CraftMemoryMapper;
|
|
||||||
import org.bukkit.entity.AbstractArrow;
|
import org.bukkit.entity.AbstractArrow;
|
||||||
import org.bukkit.entity.DragonFireball;
|
import org.bukkit.entity.DragonFireball;
|
||||||
import org.bukkit.entity.Egg;
|
import org.bukkit.entity.Egg;
|
||||||
|
@ -2,12 +2,12 @@ package org.bukkit.craftbukkit.entity;
|
|||||||
|
|
||||||
import com.google.common.base.Preconditions;
|
import com.google.common.base.Preconditions;
|
||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
|
import net.minecraft.server.BlockBed;
|
||||||
|
import net.minecraft.server.BlockPosition;
|
||||||
import net.minecraft.server.EntityVillager;
|
import net.minecraft.server.EntityVillager;
|
||||||
|
import net.minecraft.server.IBlockData;
|
||||||
import net.minecraft.server.IRegistry;
|
import net.minecraft.server.IRegistry;
|
||||||
import net.minecraft.server.VillagerProfession;
|
import net.minecraft.server.VillagerProfession;
|
||||||
import net.minecraft.server.IBlockData;
|
|
||||||
import net.minecraft.server.BlockPosition;
|
|
||||||
import net.minecraft.server.BlockBed;
|
|
||||||
import org.apache.commons.lang.Validate;
|
import org.apache.commons.lang.Validate;
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
import org.bukkit.craftbukkit.CraftServer;
|
import org.bukkit.craftbukkit.CraftServer;
|
||||||
|
@ -37,9 +37,9 @@ import net.minecraft.server.EntityLiving;
|
|||||||
import net.minecraft.server.EntityMonster;
|
import net.minecraft.server.EntityMonster;
|
||||||
import net.minecraft.server.EntityPlayer;
|
import net.minecraft.server.EntityPlayer;
|
||||||
import net.minecraft.server.EntityPotion;
|
import net.minecraft.server.EntityPotion;
|
||||||
|
import net.minecraft.server.EntityRaider;
|
||||||
import net.minecraft.server.EntitySheep;
|
import net.minecraft.server.EntitySheep;
|
||||||
import net.minecraft.server.EntitySlime;
|
import net.minecraft.server.EntitySlime;
|
||||||
import net.minecraft.server.EntityRaider;
|
|
||||||
import net.minecraft.server.EntityTypes;
|
import net.minecraft.server.EntityTypes;
|
||||||
import net.minecraft.server.EntityVillager;
|
import net.minecraft.server.EntityVillager;
|
||||||
import net.minecraft.server.EntityWaterAnimal;
|
import net.minecraft.server.EntityWaterAnimal;
|
||||||
@ -81,8 +81,8 @@ import org.bukkit.craftbukkit.block.CraftBlockState;
|
|||||||
import org.bukkit.craftbukkit.block.data.CraftBlockData;
|
import org.bukkit.craftbukkit.block.data.CraftBlockData;
|
||||||
import org.bukkit.craftbukkit.entity.CraftEntity;
|
import org.bukkit.craftbukkit.entity.CraftEntity;
|
||||||
import org.bukkit.craftbukkit.entity.CraftLivingEntity;
|
import org.bukkit.craftbukkit.entity.CraftLivingEntity;
|
||||||
import org.bukkit.craftbukkit.entity.CraftRaider;
|
|
||||||
import org.bukkit.craftbukkit.entity.CraftPlayer;
|
import org.bukkit.craftbukkit.entity.CraftPlayer;
|
||||||
|
import org.bukkit.craftbukkit.entity.CraftRaider;
|
||||||
import org.bukkit.craftbukkit.inventory.CraftInventoryCrafting;
|
import org.bukkit.craftbukkit.inventory.CraftInventoryCrafting;
|
||||||
import org.bukkit.craftbukkit.inventory.CraftItemStack;
|
import org.bukkit.craftbukkit.inventory.CraftItemStack;
|
||||||
import org.bukkit.craftbukkit.inventory.CraftMetaBook;
|
import org.bukkit.craftbukkit.inventory.CraftMetaBook;
|
||||||
@ -192,12 +192,12 @@ import org.bukkit.event.player.PlayerLevelChangeEvent;
|
|||||||
import org.bukkit.event.player.PlayerRecipeDiscoverEvent;
|
import org.bukkit.event.player.PlayerRecipeDiscoverEvent;
|
||||||
import org.bukkit.event.player.PlayerStatisticIncrementEvent;
|
import org.bukkit.event.player.PlayerStatisticIncrementEvent;
|
||||||
import org.bukkit.event.player.PlayerUnleashEntityEvent;
|
import org.bukkit.event.player.PlayerUnleashEntityEvent;
|
||||||
|
import org.bukkit.event.raid.RaidFinishEvent;
|
||||||
|
import org.bukkit.event.raid.RaidSpawnWaveEvent;
|
||||||
|
import org.bukkit.event.raid.RaidStopEvent;
|
||||||
|
import org.bukkit.event.raid.RaidTriggerEvent;
|
||||||
import org.bukkit.event.server.ServerListPingEvent;
|
import org.bukkit.event.server.ServerListPingEvent;
|
||||||
import org.bukkit.event.vehicle.VehicleCreateEvent;
|
import org.bukkit.event.vehicle.VehicleCreateEvent;
|
||||||
import org.bukkit.event.raid.RaidTriggerEvent;
|
|
||||||
import org.bukkit.event.raid.RaidFinishEvent;
|
|
||||||
import org.bukkit.event.raid.RaidStopEvent;
|
|
||||||
import org.bukkit.event.raid.RaidSpawnWaveEvent;
|
|
||||||
import org.bukkit.inventory.EquipmentSlot;
|
import org.bukkit.inventory.EquipmentSlot;
|
||||||
import org.bukkit.inventory.InventoryView;
|
import org.bukkit.inventory.InventoryView;
|
||||||
import org.bukkit.inventory.meta.BookMeta;
|
import org.bukkit.inventory.meta.BookMeta;
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
package org.bukkit.craftbukkit.inventory;
|
package org.bukkit.craftbukkit.inventory;
|
||||||
|
|
||||||
import com.google.common.base.Strings;
|
|
||||||
import com.google.common.collect.ImmutableList;
|
import com.google.common.collect.ImmutableList;
|
||||||
import com.google.common.collect.ImmutableMap.Builder;
|
import com.google.common.collect.ImmutableMap.Builder;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
@ -85,7 +85,7 @@ import org.bukkit.persistence.PersistentDataContainer;
|
|||||||
*
|
*
|
||||||
* <li> Constructor(CraftMetaItem meta)
|
* <li> Constructor(CraftMetaItem meta)
|
||||||
* <li> Constructor(NBTTagCompound tag)
|
* <li> Constructor(NBTTagCompound tag)
|
||||||
* <li> Constructor(Map<String, Object> map)
|
* <li> Constructor(Map<String, Object> map)
|
||||||
* <br><br>
|
* <br><br>
|
||||||
* <li> void applyToItem(NBTTagCompound tag)
|
* <li> void applyToItem(NBTTagCompound tag)
|
||||||
* <li> boolean applicableTo(Material type)
|
* <li> boolean applicableTo(Material type)
|
||||||
@ -99,7 +99,7 @@ import org.bukkit.persistence.PersistentDataContainer;
|
|||||||
* <li> int applyHash()
|
* <li> int applyHash()
|
||||||
* <li> public Class clone()
|
* <li> public Class clone()
|
||||||
* <br><br>
|
* <br><br>
|
||||||
* <li> Builder<String, Object> serialize(Builder<String, Object> builder)
|
* <li> Builder<String, Object> serialize(Builder<String, Object> builder)
|
||||||
* <li> SerializableMeta.Deserializers deserializer()
|
* <li> SerializableMeta.Deserializers deserializer()
|
||||||
*/
|
*/
|
||||||
@DelegateDeserialization(CraftMetaItem.SerializableMeta.class)
|
@DelegateDeserialization(CraftMetaItem.SerializableMeta.class)
|
||||||
@ -132,7 +132,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@SerializableAs("ItemMeta")
|
@SerializableAs("ItemMeta")
|
||||||
public static class SerializableMeta implements ConfigurationSerializable {
|
public static final class SerializableMeta implements ConfigurationSerializable {
|
||||||
static final String TYPE_FIELD = "meta-type";
|
static final String TYPE_FIELD = "meta-type";
|
||||||
|
|
||||||
static final ImmutableMap<Class<? extends CraftMetaItem>, String> classMap;
|
static final ImmutableMap<Class<? extends CraftMetaItem>, String> classMap;
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
package org.bukkit.craftbukkit.inventory;
|
package org.bukkit.craftbukkit.inventory;
|
||||||
|
|
||||||
|
import com.google.common.collect.ImmutableList;
|
||||||
|
import com.google.common.collect.ImmutableMap.Builder;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import com.google.common.collect.ImmutableList;
|
|
||||||
import com.google.common.collect.ImmutableMap.Builder;
|
|
||||||
import net.minecraft.server.NBTTagCompound;
|
import net.minecraft.server.NBTTagCompound;
|
||||||
import net.minecraft.server.NBTTagList;
|
import net.minecraft.server.NBTTagList;
|
||||||
import org.apache.commons.lang.Validate;
|
import org.apache.commons.lang.Validate;
|
||||||
|
@ -98,8 +98,8 @@ public class CraftMapCanvas implements MapCanvas {
|
|||||||
color = Byte.parseByte(text.substring(i + 1, j));
|
color = Byte.parseByte(text.substring(i + 1, j));
|
||||||
i = j;
|
i = j;
|
||||||
continue;
|
continue;
|
||||||
|
} catch (NumberFormatException ex) {
|
||||||
}
|
}
|
||||||
catch (NumberFormatException ex) {}
|
|
||||||
}
|
}
|
||||||
throw new IllegalArgumentException("Text contains unterminated color string");
|
throw new IllegalArgumentException("Text contains unterminated color string");
|
||||||
}
|
}
|
||||||
|
@ -35,8 +35,7 @@ public final class CraftMapView implements MapView {
|
|||||||
if (text.startsWith("map_")) {
|
if (text.startsWith("map_")) {
|
||||||
try {
|
try {
|
||||||
return Integer.parseInt(text.substring("map_".length()));
|
return Integer.parseInt(text.substring("map_".length()));
|
||||||
}
|
} catch (NumberFormatException ex) {
|
||||||
catch (NumberFormatException ex) {
|
|
||||||
throw new IllegalStateException("Map has non-numeric ID");
|
throw new IllegalStateException("Map has non-numeric ID");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
package org.bukkit.craftbukkit.persistence;
|
package org.bukkit.craftbukkit.persistence;
|
||||||
|
|
||||||
|
import com.google.common.primitives.Primitives;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import java.util.function.Function;
|
import java.util.function.Function;
|
||||||
import com.google.common.primitives.Primitives;
|
|
||||||
import net.minecraft.server.NBTBase;
|
import net.minecraft.server.NBTBase;
|
||||||
import net.minecraft.server.NBTTagByte;
|
import net.minecraft.server.NBTTagByte;
|
||||||
import net.minecraft.server.NBTTagByteArray;
|
import net.minecraft.server.NBTTagByteArray;
|
||||||
|
@ -26,7 +26,6 @@ import org.bukkit.block.Block;
|
|||||||
import org.bukkit.craftbukkit.inventory.CraftItemStack;
|
import org.bukkit.craftbukkit.inventory.CraftItemStack;
|
||||||
import org.bukkit.craftbukkit.potion.CraftPotionUtil;
|
import org.bukkit.craftbukkit.potion.CraftPotionUtil;
|
||||||
import org.bukkit.entity.AbstractArrow;
|
import org.bukkit.entity.AbstractArrow;
|
||||||
import org.bukkit.entity.Arrow;
|
|
||||||
import org.bukkit.entity.Egg;
|
import org.bukkit.entity.Egg;
|
||||||
import org.bukkit.entity.EnderPearl;
|
import org.bukkit.entity.EnderPearl;
|
||||||
import org.bukkit.entity.Fireball;
|
import org.bukkit.entity.Fireball;
|
||||||
|
@ -2,7 +2,6 @@ package org.bukkit.craftbukkit.scheduler;
|
|||||||
|
|
||||||
import org.bukkit.plugin.Plugin;
|
import org.bukkit.plugin.Plugin;
|
||||||
|
|
||||||
|
|
||||||
class CraftAsyncDebugger {
|
class CraftAsyncDebugger {
|
||||||
private CraftAsyncDebugger next = null;
|
private CraftAsyncDebugger next = null;
|
||||||
private final int expiry;
|
private final int expiry;
|
||||||
|
@ -82,7 +82,12 @@ public class CraftScheduler implements BukkitScheduler {
|
|||||||
private volatile CraftTask currentTask = null;
|
private volatile CraftTask currentTask = null;
|
||||||
private volatile int currentTick = -1;
|
private volatile int currentTick = -1;
|
||||||
private final Executor executor = Executors.newCachedThreadPool(new ThreadFactoryBuilder().setNameFormat("Craft Scheduler Thread - %d").build());
|
private final Executor executor = Executors.newCachedThreadPool(new ThreadFactoryBuilder().setNameFormat("Craft Scheduler Thread - %d").build());
|
||||||
private CraftAsyncDebugger debugHead = new CraftAsyncDebugger(-1, null, null) {@Override StringBuilder debugTo(StringBuilder string) {return string;}};
|
private CraftAsyncDebugger debugHead = new CraftAsyncDebugger(-1, null, null) {
|
||||||
|
@Override
|
||||||
|
StringBuilder debugTo(StringBuilder string) {
|
||||||
|
return string;
|
||||||
|
}
|
||||||
|
};
|
||||||
private CraftAsyncDebugger debugTail = debugHead;
|
private CraftAsyncDebugger debugTail = debugHead;
|
||||||
private static final int RECENT_TICKS;
|
private static final int RECENT_TICKS;
|
||||||
|
|
||||||
@ -248,7 +253,8 @@ public class CraftScheduler implements BukkitScheduler {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}});
|
}
|
||||||
|
});
|
||||||
handle(task, 0L);
|
handle(task, 0L);
|
||||||
for (CraftTask taskPending = head.getNext(); taskPending != null; taskPending = taskPending.getNext()) {
|
for (CraftTask taskPending = head.getNext(); taskPending != null; taskPending = taskPending.getNext()) {
|
||||||
if (taskPending == task) {
|
if (taskPending == task) {
|
||||||
|
@ -6,7 +6,7 @@ import net.minecraft.server.Scoreboard;
|
|||||||
import org.bukkit.scoreboard.DisplaySlot;
|
import org.bukkit.scoreboard.DisplaySlot;
|
||||||
import org.bukkit.scoreboard.RenderType;
|
import org.bukkit.scoreboard.RenderType;
|
||||||
|
|
||||||
class CraftScoreboardTranslations {
|
final class CraftScoreboardTranslations {
|
||||||
static final int MAX_DISPLAY_SLOT = 3;
|
static final int MAX_DISPLAY_SLOT = 3;
|
||||||
static ImmutableBiMap<DisplaySlot, String> SLOTS = ImmutableBiMap.of(
|
static ImmutableBiMap<DisplaySlot, String> SLOTS = ImmutableBiMap.of(
|
||||||
DisplaySlot.BELOW_NAME, "belowName",
|
DisplaySlot.BELOW_NAME, "belowName",
|
||||||
|
@ -29,6 +29,7 @@ import org.objectweb.asm.Type;
|
|||||||
*
|
*
|
||||||
* @author md_5
|
* @author md_5
|
||||||
*/
|
*/
|
||||||
|
// CHECKSTYLE:OFF
|
||||||
public class Commodore
|
public class Commodore
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -37,7 +37,7 @@ public final class CraftChatMessage {
|
|||||||
return ChatColor.getByChar(format.character);
|
return ChatColor.getByChar(format.character);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static class StringMessage {
|
private static final class StringMessage {
|
||||||
private static final Pattern INCREMENTAL_PATTERN = Pattern.compile("(" + String.valueOf(org.bukkit.ChatColor.COLOR_CHAR) + "[0-9a-fk-or])|(\\n)|((?:(?:https?):\\/\\/)?(?:[-\\w_\\.]{2,}\\.[a-z]{2,4}.*?(?=[\\.\\?!,;:]?(?:[" + String.valueOf(org.bukkit.ChatColor.COLOR_CHAR) + " \\n]|$))))", Pattern.CASE_INSENSITIVE);
|
private static final Pattern INCREMENTAL_PATTERN = Pattern.compile("(" + String.valueOf(org.bukkit.ChatColor.COLOR_CHAR) + "[0-9a-fk-or])|(\\n)|((?:(?:https?):\\/\\/)?(?:[-\\w_\\.]{2,}\\.[a-z]{2,4}.*?(?=[\\.\\?!,;:]?(?:[" + String.valueOf(org.bukkit.ChatColor.COLOR_CHAR) + " \\n]|$))))", Pattern.CASE_INSENSITIVE);
|
||||||
|
|
||||||
private final List<IChatBaseComponent> list = new ArrayList<IChatBaseComponent>();
|
private final List<IChatBaseComponent> list = new ArrayList<IChatBaseComponent>();
|
||||||
@ -207,8 +207,7 @@ public final class CraftChatMessage {
|
|||||||
if (matcher.reset(msg).find()) {
|
if (matcher.reset(msg).find()) {
|
||||||
matcher.reset();
|
matcher.reset();
|
||||||
|
|
||||||
ChatModifier modifier = text.getChatModifier() != null ?
|
ChatModifier modifier = text.getChatModifier() != null ? text.getChatModifier() : new ChatModifier();
|
||||||
text.getChatModifier() : new ChatModifier();
|
|
||||||
List<IChatBaseComponent> extras = new ArrayList<IChatBaseComponent>();
|
List<IChatBaseComponent> extras = new ArrayList<IChatBaseComponent>();
|
||||||
List<IChatBaseComponent> extrasOld = new ArrayList<IChatBaseComponent>(text.getSiblings());
|
List<IChatBaseComponent> extrasOld = new ArrayList<IChatBaseComponent>(text.getSiblings());
|
||||||
component = text = new ChatComponentText("");
|
component = text = new ChatComponentText("");
|
||||||
|
@ -14,7 +14,7 @@ import org.bukkit.entity.Entity;
|
|||||||
import org.bukkit.util.RayTraceResult;
|
import org.bukkit.util.RayTraceResult;
|
||||||
import org.bukkit.util.Vector;
|
import org.bukkit.util.Vector;
|
||||||
|
|
||||||
public class CraftRayTraceResult {
|
public final class CraftRayTraceResult {
|
||||||
|
|
||||||
private CraftRayTraceResult() {}
|
private CraftRayTraceResult() {}
|
||||||
|
|
||||||
|
@ -19,9 +19,9 @@ import org.junit.Assert;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* If you are getting: java.lang.ExceptionInInitializerError
|
* If you are getting: java.lang.ExceptionInInitializerError
|
||||||
* at net.minecraft.server.StatisticList.<clinit>(SourceFile:58)
|
* at net.minecraft.server.StatisticList.<clinit>(SourceFile:58)
|
||||||
* at net.minecraft.server.Item.<clinit>(SourceFile:252)
|
* at net.minecraft.server.Item.<clinit>(SourceFile:252)
|
||||||
* at net.minecraft.server.Block.<clinit>(Block.java:577)
|
* at net.minecraft.server.Block.<clinit>(Block.java:577)
|
||||||
*
|
*
|
||||||
* extend this class to solve it.
|
* extend this class to solve it.
|
||||||
*/
|
*/
|
||||||
|
@ -16,7 +16,7 @@ import org.bukkit.craftbukkit.util.CraftMagicNumbers;
|
|||||||
import org.bukkit.craftbukkit.util.CraftNamespacedKey;
|
import org.bukkit.craftbukkit.util.CraftNamespacedKey;
|
||||||
import org.bukkit.craftbukkit.util.Versioning;
|
import org.bukkit.craftbukkit.util.Versioning;
|
||||||
|
|
||||||
public class DummyServer implements InvocationHandler {
|
public final class DummyServer implements InvocationHandler {
|
||||||
private static interface MethodHandler {
|
private static interface MethodHandler {
|
||||||
Object handle(DummyServer server, Object[] args);
|
Object handle(DummyServer server, Object[] args);
|
||||||
}
|
}
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren