mirror of
https://github.com/xoo0524tw/OpenArcadeGames.git
synced 2026-12-06 02:46:01 +02:00
Initial ArcadeGames source and build setup
This commit is contained in:
commit
76ac0e3acd
1069 files changed
+97958
No files matched your search
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion><parent><groupId>ro.fr33styler.arcade</groupId><artifactId>arcadegames-parent</artifactId><version>2.19f-reconstructed</version><relativePath>../../../pom.xml</relativePath></parent>
|
||||
<artifactId>platform-api-legacy</artifactId><properties><reconstruction.variant>legacy</reconstruction.variant><maven.compiler.release>17</maven.compiler.release></properties>
|
||||
<dependencies><dependency><groupId>ro.fr33styler.arcade</groupId><artifactId>common</artifactId><version>${project.version}</version></dependency></dependencies>
|
||||
</project>
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
package ro.fr33styler.arcade.game.partygames.platform;
|
||||
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.entity.FallingBlock;
|
||||
|
||||
public interface PartyGamesFallingBlockFactory {
|
||||
FallingBlock a(Location var1, Material var2, byte var3);
|
||||
}
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
package ro.fr33styler.arcade.game.prophunt.platform;
|
||||
|
||||
import ro.fr33styler.arcade.game.prophunt.prop.PropHuntPropType;
|
||||
|
||||
import java.util.UUID;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
public interface PropHuntProp {
|
||||
UUID a();
|
||||
|
||||
PropHuntPropType b();
|
||||
|
||||
ItemStack c();
|
||||
|
||||
Player d();
|
||||
|
||||
void a(Player var1);
|
||||
|
||||
Location e();
|
||||
|
||||
void a(Location var1);
|
||||
|
||||
void f();
|
||||
|
||||
void g();
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
package ro.fr33styler.arcade.game.prophunt.platform;
|
||||
|
||||
import ro.fr33styler.arcade.game.prophunt.prop.PropHuntPropType;
|
||||
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
public interface PropHuntPropFactory {
|
||||
PropHuntProp a(PropHuntPropType var1, ItemStack var2, Location var3);
|
||||
}
|
||||
+94
@@ -0,0 +1,94 @@
|
||||
package ro.fr33styler.arcade.platform.api;
|
||||
|
||||
import ro.fr33styler.arcade.platform.api.bossbar.LegacyBossBar;
|
||||
import ro.fr33styler.arcade.platform.api.hologram.HologramEntity;
|
||||
import ro.fr33styler.arcade.platform.api.network.PacketInterceptor;
|
||||
import ro.fr33styler.arcade.platform.api.npc.NpcFactory;
|
||||
import ro.fr33styler.arcade.platform.api.npc.SkinTexture;
|
||||
import ro.fr33styler.arcade.platform.legacy.input.SwapHandListener;
|
||||
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.Firework;
|
||||
import org.bukkit.entity.Item;
|
||||
import org.bukkit.entity.LivingEntity;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.entity.EntityDamageEvent;
|
||||
import org.bukkit.event.player.PlayerInteractEvent;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.inventory.meta.SkullMeta;
|
||||
import org.bukkit.scoreboard.NameTagVisibility;
|
||||
import org.bukkit.scoreboard.Score;
|
||||
import org.bukkit.scoreboard.Team;
|
||||
|
||||
public interface ServerPlatform {
|
||||
NpcFactory a();
|
||||
|
||||
PacketInterceptor b();
|
||||
|
||||
LegacyBossBar c();
|
||||
|
||||
void a(Firework var1);
|
||||
|
||||
void a(Entity var1, boolean var2);
|
||||
|
||||
void a(LivingEntity var1, double var2);
|
||||
|
||||
void a(Player var1);
|
||||
|
||||
void a(Player var1, Item var2);
|
||||
|
||||
default double b(Player var1) {
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
default void a(Player var1, double var2) {
|
||||
}
|
||||
|
||||
void a(Block var1, Material var2, int var3);
|
||||
|
||||
default HologramEntity a(Location var1) {
|
||||
return this.a(var1.getWorld(), var1.getX(), var1.getY(), var1.getZ());
|
||||
}
|
||||
|
||||
HologramEntity a(World var1, double var2, double var4, double var6);
|
||||
|
||||
default boolean b(Location var1) {
|
||||
return this.a(var1.getBlock(), var1.getX(), var1.getY(), var1.getZ());
|
||||
}
|
||||
|
||||
void a(SkullMeta var1, SkinTexture var2);
|
||||
|
||||
boolean a(Block var1, double var2, double var4, double var6);
|
||||
|
||||
boolean a(PlayerInteractEvent var1);
|
||||
|
||||
boolean a(EntityDamageEvent var1);
|
||||
|
||||
SwapHandListener d();
|
||||
|
||||
SkinTexture c(Player var1);
|
||||
|
||||
ItemStack d(Player var1);
|
||||
|
||||
void a(Player var1, ItemStack var2);
|
||||
|
||||
ItemStack e(Player var1);
|
||||
|
||||
void b(Player var1, ItemStack var2);
|
||||
|
||||
void a(Player var1, boolean var2);
|
||||
|
||||
void a(Player var1, String var2);
|
||||
|
||||
void a(Player var1, String var2, String var3, int var4, int var5, int var6);
|
||||
|
||||
void a(Player var1, String var2, String var3);
|
||||
|
||||
void a(Player var1, boolean var2, Score var3, int var4);
|
||||
|
||||
void a(Player var1, Team var2, String var3, String var4, NameTagVisibility var5);
|
||||
}
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
package ro.fr33styler.arcade.platform.api.bossbar;
|
||||
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
public interface LegacyBossBar {
|
||||
void a(Player var1);
|
||||
|
||||
void a(String var1);
|
||||
|
||||
void a(boolean var1);
|
||||
|
||||
void b(Player var1);
|
||||
|
||||
void a();
|
||||
}
|
||||
+66
@@ -0,0 +1,66 @@
|
||||
package ro.fr33styler.arcade.platform.api.npc;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.inventory.meta.ItemMeta;
|
||||
import ro.fr33styler.arcade.api.engine.config.annotation.Setting;
|
||||
import ro.fr33styler.arcade.api.engine.config.serialize.Configuration;
|
||||
|
||||
public final class NpcEquipment implements Configuration {
|
||||
@Setting("main-hand")
|
||||
private Material a = Material.AIR;
|
||||
@Setting("main-hand-model-data")
|
||||
private int b = 0;
|
||||
@Setting("off-hand")
|
||||
private Material c = Material.AIR;
|
||||
@Setting("off-hand-model-data")
|
||||
private int d = 0;
|
||||
@Setting("helmet")
|
||||
private Material e = Material.AIR;
|
||||
@Setting("helmet-model-data")
|
||||
private int f = 0;
|
||||
@Setting("chestplate")
|
||||
private Material g = Material.AIR;
|
||||
@Setting("chestplate-model-data")
|
||||
private int h = 0;
|
||||
@Setting("leggings")
|
||||
private Material i = Material.AIR;
|
||||
@Setting("leggings-model-data")
|
||||
private int j = 0;
|
||||
@Setting("boots")
|
||||
private Material k = Material.AIR;
|
||||
@Setting("boots-model-data")
|
||||
private int l = 0;
|
||||
|
||||
public ItemStack a() {
|
||||
return this.a(this.a, this.b);
|
||||
}
|
||||
|
||||
public ItemStack b() {
|
||||
return this.a(this.c, this.d);
|
||||
}
|
||||
|
||||
public ItemStack c() {
|
||||
return this.a(this.e, this.f);
|
||||
}
|
||||
|
||||
public ItemStack d() {
|
||||
return this.a(this.g, this.h);
|
||||
}
|
||||
|
||||
public ItemStack e() {
|
||||
return this.a(this.i, this.j);
|
||||
}
|
||||
|
||||
public ItemStack f() {
|
||||
return this.a(this.k, this.l);
|
||||
}
|
||||
|
||||
private ItemStack a(Material var1, int var2) {
|
||||
ItemMeta var3 = Bukkit.getItemFactory().getItemMeta(var1);
|
||||
ItemStack var4 = new ItemStack(var1);
|
||||
var4.setItemMeta(var3);
|
||||
return var4;
|
||||
}
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
package ro.fr33styler.arcade.platform.api.npc;
|
||||
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
public interface NpcFactory {
|
||||
Npc a(Location var1, Player var2);
|
||||
|
||||
Npc a(Location var1, String var2, SkinTexture var3, NpcEquipment var4);
|
||||
}
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
package ro.fr33styler.arcade.platform.api.npc;
|
||||
|
||||
import ro.fr33styler.arcade.api.engine.config.annotation.Setting;
|
||||
import ro.fr33styler.arcade.api.engine.config.serialize.Configuration;
|
||||
|
||||
public final class SkinTexture implements Configuration {
|
||||
@Setting("value")
|
||||
private String a;
|
||||
@Setting("signature")
|
||||
private String b;
|
||||
|
||||
public SkinTexture() {
|
||||
this("", "");
|
||||
}
|
||||
|
||||
public SkinTexture(String var1) {
|
||||
this(var1, "");
|
||||
}
|
||||
|
||||
public SkinTexture(String var1, String var2) {
|
||||
this.a = var1;
|
||||
this.b = var2;
|
||||
}
|
||||
|
||||
public String a() {
|
||||
return this.a;
|
||||
}
|
||||
|
||||
public String b() {
|
||||
return this.b;
|
||||
}
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
package ro.fr33styler.arcade.platform.legacy.input;
|
||||
|
||||
import java.util.function.Function;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.Listener;
|
||||
|
||||
public interface SwapHandListener extends Listener {
|
||||
void a(Function<Player, Boolean> var1);
|
||||
}
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
package ro.fr33styler.arcade.platform.legacy.input;
|
||||
|
||||
import java.util.function.Function;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.player.PlayerSwapHandItemsEvent;
|
||||
|
||||
public class V1_12_2SwapHandListener implements SwapHandListener {
|
||||
private Function<Player, Boolean> a;
|
||||
|
||||
@EventHandler
|
||||
public void a(PlayerSwapHandItemsEvent var1) {
|
||||
Boolean var2 = this.a.apply(var1.getPlayer());
|
||||
if (var2 != null) {
|
||||
var1.setCancelled(var2);
|
||||
}
|
||||
}
|
||||
|
||||
public void a(Function<Player, Boolean> var1) {
|
||||
this.a = var1;
|
||||
}
|
||||
}
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
package ro.fr33styler.arcade.support.reflect;
|
||||
|
||||
import ro.fr33styler.arcade.engine.config.validation.GenericTypeValidation;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
|
||||
public class Reflection {
|
||||
public static Field a(Class<?> var0, String var1) {
|
||||
for (Field var5 : var0.getDeclaredFields()) {
|
||||
if (var5.getName().equals(var1)) {
|
||||
var5.setAccessible(true);
|
||||
return var5;
|
||||
}
|
||||
}
|
||||
|
||||
throw new IllegalArgumentException("No such field type!");
|
||||
}
|
||||
|
||||
public static <T> T a(Field var0, Object var1) {
|
||||
try {
|
||||
return (T)var0.get(var1);
|
||||
} catch (IllegalAccessException failure) {
|
||||
throw GenericTypeValidation.re$propagate(failure);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user