#help-development
1 messages ยท Page 1382 of 1
alright
never mind I have to go, sorry
but what about "Gamemode:"
as I said earlier, not an issue
is it possible to turn a playerhead itemstack into a block?
ty i dont have errors now
set the block to a skull, get the block state, set the owning player
https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/block/Block.html#getState()
https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/block/Skull.html
declaration: package: org.bukkit.block, interface: Skull
declaration: package: org.bukkit.block, interface: Block
thanks
another question, how can i set a falling block to despawn in a tick
also for some reason, fallingblock doesnt work with skulls, is there a workaround?
just make a scheduled task with no delay to destroy it?
...?
the fallingblock is invisible
i spawned them as fallingblocks
That probly why it doesn't work
?
Some not-full-block blocks just don't render when falling
Someone willing to help me find a circular reference that causes a Gson StackOverflow?
post some code noob
well the error helps too ๐
Am I going to be flooded with a book sized set of classes now
https://gist.github.com/Flo0/d71dcfb44c3a828c68ef6a6f08986d8e
GsonProvider is just a utility class where i can dynamically register type adapters.
The ItemStackAdapter and NamespacedKeyAdapter work perfectly fine.
The stack trace is really not helpful but here you go:
https://gist.github.com/Flo0/acbcf2b00c78cb6c9ce04e8244f22553
The serialized class is RecipeManager
The method in question is FileManager#persistRecipeManager(RecipeManager)
Maybe i should add this important detail:
The deserialisation only flows into a StackOverflow if the manager was desierialized once then serialized again.
Not when a clean RecipeManager is serialized.
The serialisation happens with this method
public RecipeManager loadOrCreateRecipeManager() {
if (!this.recipesFile.exists()) {
return new RecipeManager();
}
RecipeManager recipeManager = null;
try {
final String json = Files.readString(this.recipesFile.toPath());
recipeManager = GsonProvider.fromJson(json, RecipeManager.class); // Here
recipeManager.registerAllPostSerialisation();
} catch (final IOException e) {
e.printStackTrace();
}
return recipeManager == null ? new RecipeManager() : recipeManager;
}
Is it possible to spawn a structure for the pre-generated structures list?
For example, a method to spawn a full-blown Taiga village in front of the player (i don't care about lag)
Preferably without having to 'build' the structure with Minecraft's current structures (such as how everything is split up into an absurd amount of different pieces and parts)
You'll probably need to start it with NMS and then trigger all the Jigsaw blocks
I dont think there is a simple way for this as structure creation happens during chunk generation
So its deserializing to the wrong object and only errors when resaved/loaded
hmmm
The resulting json looks exactly like you would imagine
Is it at least possible to generate a structure of any kind with chests with loot tables (rather than static contents)?
So if its serialized into this json file and then deserialized again it all works fine. But then the next serialization to json causes a StackOverflow for some reason...
It is possible. But you will have to decide if you want to dig into NMS for that (Because i dont think there is a simple API for that)
Or if you want to create your own solution.
welp
One way would be using WorldEdit for pasting schematics and then getting all TileEntities in the affected chunks and generate loot for each state that inherits from InventoryHolder
Ah WorldEdit schematics may work for what I'm doing
I mean I did just show an API for that
how can i find all entities right in front of a player?
Oh I know I saw, sorry for not responding lol.
I just mean everything else I'm doing may work with WorldEdit
Either create a BoundingBox in front of the player or ray trace with a big radius.
I just effectively need something to allow me to just place down an entire damn village within a command
I'm going to guess the issue is in here recipeManager.registerAllPostSerialisation(); as this is the only thing that seems could add anything post serialization/deserialization.
If you save the schematic with loottables it can be loaded with loottables
Without me needing to spend weeks lmfao
Thats the same thought i also had because its the only real difference between the deserialized and the vanilla instance.
But commenting that out doesnt make any difference.
But ill re try just to be safe
so this? ```RayTraceResult rayTraceEntities = event.getPlayer().getWorld().rayTraceEntities(event.getPlayer().getEyeLocation(), event.getPlayer().getEyeLocation().getDirection(), 3);
that doesnt work
This would only trace a thin line. I think there is a method on World where you can specify the size of the ray.
Didnt change anything. Another difference is the protected no args constructor that is being invoked in the CustomExactShapedRecipe class...
Ill just have to make each field transient until i find the one that causes problems.
This might be a strange question, but I'm trying to make a server hosted off of my pc with port-forwarding and when I go to open the "server" java application I can see a window pop up for a second and then close. Any way to fix this?
You need #help-server Hint you didn't accept the eula
No eula ever popped up...
how can i get all entities in a bounding box?
World has a method for this
found it
why doesnt this work?
BoundingBox bb = BoundingBox.of(event.getPlayer().getLocation(), 1, 2, 1);
Collection<Entity> entities = event.getPlayer().getWorld().getNearbyEntities(bb);
for (Entity e : entities) {
if (e == null) {return;}
if (!(e instanceof Snowball)) {return;}
Snowball snowball = (Snowball) e;
if (!Objects.equals(snowball.getCustomName(), "Dodgeball")) {return;}
snowball.setVelocity(snowball.getVelocity().multiply(-1));
System.out.println("WOOT!");
snowball.setTicksLived(0);
}```
you are returnign out of the for loop, continue
If you return then the whole method just exists.
So if the first entity is not a snowball everything just stops there.
You need to use continue in order to continue the loop
thanks!
is it possible to prevent a falling block from becoming a block
Sure listen for the EntityChangeBlockEvent and check if the entity is instanceof FallingBlock
Then cancel it
Hey hey! How would I go about viewing net.minecraft server code? I understand to modify this, need to use reflection. I want to do some stuff with wandering villager trades
You only need reflections for specific cases. Do you use maven?
I use gradle
Then change the spigot-api artifact to just spigot
And make sure the BuildTools ran at least once so the sources are installed in your local maven repository.
hmm when I change
compileOnly 'org.spigotmc:spigot-api:1.16.5-R0.1-SNAPSHOT'
}```
to
```dependencies {
compileOnly 'org.spigotmc:spigot:1.16.5-R0.1-SNAPSHOT'
}```
doesn't seem to do anything or am I wrong
Oh I see
The home of Spigot a high performance, no lag customized CraftBukkit Minecraft server API, and BungeeCord, the cloud server proxy.
public void onDamage(){
Events.subscribe(EntityDamageEvent.class)
.handler(e -> {
Player player = (Player) e.getEntity();
// if (!(e.getEntityType() == EntityType.PLAYER)) return;
player.sendMessage("You took damage!");
e.setDamage(0);
// e.setCancelled(true);
});
why is this not working? it prints the debug message.
and my //'s are just for testing
Events.subscribe <- what this?
Which JDK / language version should one use for building Bukkit plugins for versions 1.14 to 1.16?
api
@EventHandler
public void EntityDamagListener(EntityDamageEvent event) {
if (event.getEntity() instanceof Player) {
// blah do stuff
}
}```
Should probably still compile with java 8 compat
think that should be code
no
galacticraft dev also does bukkit :o?
and register the event in your main class
I do
So JDK 16 is fine if I set it to language version 8?
๐คซ
the event works
Mhm
but canceling doesent
I imagine this is an issue with whatever API
I don't have any public plugins. Mostly private on friends server. Other day I ran into MJR here so MC community is pretty small ๐
cant be
Or an issue with other plugins
oh lol, yeah especially in the dev part there's many people you see here and there
^
for context, what are you trying to do
make it so people cant take damage
You can try increasing the priority to highest
That will hopefully rule out any other plugins messing with it
ok
it seems to work half the time
but fall damage and lava work
but drowning does
by does I mean u dont and doesent means you do
after adding a method named "solveWorldHunger" it seems to work lmfao
Small question, would it be to heavy to put the mute check query on chat event ?
yes
check if the player is muted when they join
and then use an array list
Check if they are mute when they join then just put them in a list
copy cat

Xd, had this on login event first. I'll revert it back then ๐
yea it does, if u query every time it will
a) lag
b) delay the "you are muted" message
the db
But yes it will delay the message
Thatโs the databases problem :p
it doesent have to be if you optimise the code 
Could just remove the message :p
That's true :p
if your db is lagging when checking if 100 people are muted at once your db might be underpowered
hey so I have all these plugins in my plugins folder but when I restart WE doesn't show up?
#help-server would be the better channel. Also post your latest.log after remove private information.
My method seems to work after testing w/o any other plugins
Try EventPriority.LOWEST
It is counter-intuitive w/o looking at the java docs haha. First time I've done priorities, had the same issue
wait no for your case, maybe no? Think I'm thinking in Forge right now. 2am coding right now 
but glad you got it
Event priority should be first to last rather than low to high
Hello, anyone knows how to change the amount of xp points to levels?
Like 11 xp to: 2 Levels
?jd
package index
does anyone know of a way to put a block onto an armor stand? ive tried
``` but it didnt work
nothing wrong with that code
did you try creating an actual helmet and trying that first?
well i just tried
ArmorStand block = (ArmorStand) location.getWorld().spawnEntity(location, EntityType.ARMOR_STAND);
block.setHelmet(new ItemStack(Material.DIAMOND_HELMET));
but the armor stand didnt get a helmet
Debug. Check if code is even activating
i just right clicked the armor stand and got a helmet but it doesnt show
this line causes an error in my console
PrivateVailt.menu = (Map<String, ItemStack[]>)PlayerData.getPlayerDataConfig().get("menu", new HashMap<>());
ok well the dirt block randomly worked but is there a way to make it so that there is a dirt block in place of it but not down scaled to the head
What error other than an unchecked cast warning?
Pastebin.pl is a website where you can store code/text online for a set period of time and share to anybody on earth
Yep you tried to cast to a Map when you can;t do that
you use .getValues(true) on the returned MemorySection
where that
thats the result of yoru get method call
where would i put that
how do I add an entity to a scoreboards team?
since I want to change their glow color
is there a way to add data like from a datapack. i am tring to make an advancement and to do that i need to be able to use a datapack is there a way to have one inbuilt into my plugin
you need to use NameSpacedKeys
ok but how do i use those
Hey how would I go about modifying existing variables in a entity from a Bukkit entity?
I'm trying to modify the protected MerchantRecipeList trades; variable in EntityVillagerAbstract with NMS and Reflection. New to the whole reflections API and using Spigot NMS but for reference, something like this is what I'm trying to do if that helps clarify
@EventHandler()
public void CreatureSpawnListener(CreatureSpawnEvent event) {
if (event.getEntity() instanceof WanderingTrader) {
WanderingTrader trader = (WanderingTrader) event.getEntity();
VillagerUtils.clearVillagerTrades(trader); // cast error
}
}```
```java
public class VillagerUtils {
public static void clearVillagerTrades(EntityVillagerAbstract trader) {
try {
Field field = trader.getClass().getDeclaredField("trades");
field.setAccessible(true);
field.set(trader, null);
field.setAccessible(false);
} catch (NoSuchFieldException | IllegalAccessException e) {
e.printStackTrace();
}
}
}```
think I'm on the verge of something actually
WanderingTrader trader = (WanderingTrader) event.getEntity();
EntityVillagerAbstract nmsVillager = ((CraftWanderingTrader) trader).getHandle();
why do you need NMS for this
declaration: package: org.bukkit.inventory, interface: Merchant
I'm trying to clear trades to replace with something else. Thank you I'll check this out ๐
which you dont need NMS for, see API above
Is it possible to create a custom event for a player server action which is not currently supported by spigot? (like smithing)
You can create any events you want. But plugins need to specifically listen for them
Yea understandable, but where can I get the server "actions"
If you mean you want to inject your event actions into the Bukkit enums, you can't
I don't really know, I just want to add an event for smith crafting
fork spigot?
smith crafting?
also that ^
what are you trying to do with that event
Adding an upgrade % chance of failure :)
use the prepare event to add teh percentage as Lore, then detect on inventory click event when the item is removed to create the finished item
In the same fashion as Hypixel Skyblock how could I make items different on the server side but not on the client side?
E.g. having two different weapons with 2 different IDs show as the same item on the client side
Is this only obtainable via mods?
Is that item supposed to stack onto the other same looking item o.O
Because that would kinda ruin you
At least from a plugin perspective
You store their datas in their PDC/meta
^ which makes them unstackeable
Then you apply their effects when they are used
Well,if they have different PDC values
There is one now https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/event/inventory/SmithItemEvent.html
declaration: package: org.bukkit.event.inventory, class: SmithItemEvent
Yeah then stick to PDC and you should be good
ok
I'm trying to work with MySQL and I use this method to check if a player exists. JAVA public boolean exists(UUID uuid, String pointType) { try { PreparedStatement ps = plugin.SQL.getConnection().prepareStatement("SELECT pointType FROM ac_daily_login WHERE uuid=? AND pointType=?"); ps.setString(1, pointType); ps.setString(2, uuid.toString()); ps.setString(3, pointType); ResultSet results = ps.executeQuery(); if (results.next()) { return true; } else { return false; } } catch (SQLException e) { plugin.getLogger().log(Level.SEVERE, ChatColor.RED + "Failed to check if Exists!", e); return false; } }What I want to do though, is check if the UUID and pointType exists in the same column, because I want to create a column for every pointType for each player.
This is an example of my table, I'm wanting to store each Material and Amount a player mines for every Material
That code is blocking and will lag your server
What do you mean?
you are running single threaded
teh server is going to freeze untill your database responds
in your SCHEMA the players UUID shoudl be the unique key
names can change
Ah, i understand that now. I haven't looked past single-thread yet, but will once I get further into it, just started learning how to use this an hour ago
k
I'll look into this, thanks!
I'd probably do a table per player
it would hold the pointType and amount
use the player uuid as the table name
Huh, ya I guess I could, thanks for the idea!
he's wanting to store a total for each type of block broken by each player
What prevents a simple uuid + material primary key ?
Variable table names in SQL defeat the entire purpose
I guess you could use column name for teh block type
^ agreed, constraints exist for a reason
true
however that would be a pain to clean up
you'd have to check every block type
If you are creating a key based on the players uuid and the block type
Compound keys aren't a single collum o.O
ah, sorry you didnt; say a compound key, I thought you meant a single key composed of teh two objects.
Oh sorry, yeah my bad
Ye just compound primary key of uuid and material
Should deliver just what is needed here
Is this the correct way to set a UNIQUE constraint? prepareStatement("CREATE TABLE IF NOT EXISTS ac_daily_login " + "(name VARCHAR(100),uuid VARCHAR(100) UNIQUE,pointType VARCHAR(100),pointAmount BIGINT(100),PRIMARY KEY (name));")
Should it be UUID?
Ok, so after reading that I've come up with JAVA ps = plugin.SQL.getConnection().prepareStatement("CREATE TABLE IF NOT EXISTS ac_daily_login " + "(name VARCHAR(100),uuid VARCHAR(100) UNIQUE,pointType VARCHAR(100),pointAmount BIGINT(100), CONSTRAINT ac_daily_login PRIMARY KEY (uuid, pointType));");
take unique off the uuid column
as you are using a key pair you will have duplicate uuids
Also your constraint name should probably not be the same as the table XD
Just add a _pk at the end
Or Smth like that
Thank you very much, finally got it working!
I'll do that too, thanks
Also could you guys let me know if this method seems correct? JAVA public void createPlayer(Player player, String pointType, long pointAmount) { try { // if (!exists(player.getUniqueId(), pointType)) { PreparedStatement ps2 = plugin.SQL.getConnection().prepareStatement("INSERT INTO ac_daily_login (name,uuid,pointType,pointAmount) VALUES (?,?,?,?) " + "ON DUPLICATE KEY UPDATE pointAmount=pointAmount+?;"); ps2.setString(1, player.getName()); ps2.setString(2, player.getUniqueId().toString()); ps2.setString(3, pointType); ps2.setLong(4, pointAmount); ps2.setLong(5, pointAmount); ps2.executeUpdate(); return; // } } catch (SQLException e) { plugin.getLogger().log(Level.SEVERE, ChatColor.RED + "Failed to create Player!", e); } }
It seems to be working fine, but just want to make sure that looks good. I run that each time a Player Breaks a block
Hopefully async
Ya not async yet, but just wanted to make sure I had the basics down before jumping ahead
Itโs annoying that on duplicate key update still increments auto increment columns
I totally agree!
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.6.1:compile (default-compile) on project assemble: Fatal error compiling: java.lang.ExceptionInInitializerError: com.sun.tools.javac.code.TypeTags -> [Help 1]
Not enough info
Hey I got a problem I have an even to format chat but when I have luckperms and have there prefix, the prefix won't show up in chat. how do I fix that?
@EventHandler
public void rgbMessage(AsyncPlayerChatEvent e){
String message = translateHexColorCodes("&#", "", e.getMessage());
Player p = e.getPlayer();
e.setMessage(message);
e.setFormat(ChatColor.translateAlternateColorCodes('&', config.getString("ChatFormat.Format").replace("%displayname%",p.getDisplayName()).replace("%name%", p.getName()).replace("%message%",
e.getMessage())));
}
I'm going to guess you havn't included a repository that has that dependency
I also tried this
but it didnt work
did the same thing
what repo are you adding to yoru pom to access those dependencies?
the ones provided on the github page
<dependency>
<groupId>me.missionary</groupId>
<artifactId>board</artifactId>
<version>1.1.0-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
and
thats only appropriate IF you followed all their instructions on installing it locally
the first one
lms
Do you guys know how to ?
or, as it says to use jitpack
yes
oh I see
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>```
whatever the release build is I guess
Maybe try to find an other place to see its version
1.1.0-SNAPSHOT it says in its pom
have you just tried the code it says in jitpack?
it has a placeholder for version
pretty sure it's 1.0-SNAPSHOT if not use 0873308 as it's pulling from github
thats looking on spigot. You have added jitpack I hope
no
remove <repositories>
cool
but still
still only spigot
try 1.0-SNAPSHOT or the github short hash
else change the order of your repos. They are searched in order after local
ok
that should be 1.1.0-SNAPSHOT
then try the hash
wdym
wheres the jitpack link?
055208be5d
hashes always work
Did you try to clone its repo even though you are now using jitpack?
ye I tried to cloneit
you don;t need to
you are now getting it from jitpack
look in your .m2 folder
I read about this folder
actually, you have no scope on it, its proably been shaded into yoru jar
if its been shaded it will
ok
Because a console cant click. xD
because youre only invoking it on the player that clicks it
Hey, I have created a class CustomBlock, which contains the block itself + custom methods. I have a list containing all those customBlocks, and when one is created, it's added to the list (which is correctly done I checked). But then, from the CustomBlock class, I check if it's still "valid" (= if it's in the list), using customBlockList.contains(this) But it's always returning false, what am I doing wrong ?
(so my final code looks like this)
myClass:
customBlockList.add(new CustomBlock(data));
CustomBlock:
public boolean isValid() {
return cusotmBlockList.contains(this);
}
what class are you extending
This is what I try to find out with more code
I do not extend any class
theres your issue
yeah
Why is it an issue ?
AbstractArrow bulletArrow = player.launchProjectile(Arrow.class);
ItemMeta bulletArrwoMeta = bulletArrow.getItemStack().getItemMeta();
bulletArrwoMeta.setCustomModelData(this.plugin.getRocket().id);
bulletArrow.getItemStack().setItemMeta(bulletArrwoMeta);
final int[] i = {0};
Bukkit.getScheduler().scheduleSyncRepeatingTask(this.plugin, new BukkitRunnable() {
@Override
public void run() {
bulletArrow.setVelocity(target.getLocation().getDirection().multiply(5));
i[0] += 1;
if(i[0] >= 4)
{
bulletArrow.getWorld().createExplosion(bulletArrow.getLocation(), 6);
cancel();
}
}
}, 0, 20);```
is it an actual block or a reference to a block
I got this error:
A reference, my constructor is CustomBlock(Block block) { this.block = block; }
java.lang.UnsupportedOperationException: Use BukkitRunnable#runTaskTimer(Plugin, long, long)
at org.bukkit.craftbukkit.v1_16_R3.scheduler.CraftScheduler.scheduleSyncRepeatingTask(CraftScheduler.java:600) ~[patched_1.16.5.jar:git-Paper-466]
at de.cimeyclust.custom_items.RocketLauncher.onShoot(RocketLauncher.java:115) ~[?:?]
at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor25.execute(Unknown Source) ~[?:?]
at org.bukkit.plugin.EventExecutor.lambda$create$1(EventExecutor.java:69) ~[patched_1.16.5.jar:git-Paper-466]
at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:80) ~[patched_1.16.5.jar:git-Paper-466]
at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[patched_1.16.5.jar:git-Paper-466]
at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:607) ~[patched_1.16.5.jar:git-Paper-466]
at org.bukkit.craftbukkit.v1_16_R3.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:528) ~[patched_1.16.5.jar:git-Paper-466]
at org.bukkit.craftbukkit.v1_16_R3.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:491) ~[patched_1.16.5.jar:git-Paper-466]
at org.bukkit.craftbukkit.v1_16_R3.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:486) ~[patched_1.16.5.jar:git-Paper-466]
at org.bukkit.craftbukkit.v1_16_R3.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:482) ~[patched_1.16.5.jar:git-Paper-466]```
you probably need to create your own .equals then
put this in your class
@Override
public boolean equals(Object obj) {
if (!(obj instanceof CustomBlock)) return false;
return ((CustomBlock) obj).block.equals(block);
}
Read what it tells you
Shouldn't them always be equals ? Like new CustomBlock() == (inside CustomBlock) this
i havent seen a schedule task made like that in ages
no
This class cant run an operation like that?
Ok so that's where my mistake is, thanks ๐
I'm not sure, because of that i ask here
No. Use BukkitRunnable#runTaskTimer(Plugin, long, long)
Ah. I will try
use something like
new BukkitRunnable() {
@Override
public void run() {
}
}.runTaskTimer(plugin, 0, 20);
instead of that old bs method
^^
Isnโt scheduleSyncRepeatingTask just calling runTaskTimer or smtng internally
"that old bs method" calls exactly the method you just posted kek
yes
im js that so he doesnt use it lol
its not working :/
@chrome beacon But .runTaskTimer() return BukkitTask not BukkitRunnable
What should I do?
@eternal oxide
Bukkit.getScheduler().scheduleSyncRepeatingTask(this.plugin, new BukkitRunnable() {
@Override
public void run() {
bulletArrow.setVelocity(target.getLocation().getDirection().multiply(5));
i[0] += 1;
if(i[0] >= 4)
{
bulletArrow.getWorld().createExplosion(bulletArrow.getLocation(), 6);
cancel();
}
}
}.runTaskTimer(this.plugin, 0L, 20L));```
What is my mistake?
BukkitRunnable task = new BukkitRunnable() {
@Override
public void run() {
}
};
task.runTaskTimer(plugin, 0, 20);
``` ๐ค
Oh.
I dont need thi stuff before
wait
Okay
replace the entire thing with this
BukkitRunnable task = new BukkitRunnable() {
@Override
public void run() {
bulletArrow.setVelocity(target.getLocation().getDirection().multiply(5));
i[0] += 1;
if(i[0] >= 4)
{
bulletArrow.getWorld().createExplosion(bulletArrow.getLocation(), 6);
cancel();
}
}
};
task.runTaskTimer(plugin, 0, 20);
``` get rid of the schedulesyncrepeatingtask thing
Okay. I will try
i[0] += 1;
if(i[0] >= 4)
Looks like auto-generated code because you tried to change an outside variable inside your Runnable.
What are you attempting to do?
Yes. I wanted to set i +=1 every second
"Looks like auto-generated code" 10/10
can someone help me please
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.7.0:compile (default-compile) on project board: Fatal error compiling: java.lang.ExceptionInInitializerError: com.sun.tools.javac.code.TypeTags -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
zoibox@Williams-MacBook-Pro board %
and how exactly have you broken maven
how can i make an event handler for all player events? I tried to listen to PlayerEvent cause thats the super for all of them, but that ends up giving me an "Unable to find handler list" error on startup, so i guess that's not allowed?
PlayerEvent is a superclass for all of the player events, its not an event itself
afaik you can't youd have to listen to them all yourself
Because it is.
You can declare variables inside the Runnable object.
BukkitRunnable task = new BukkitRunnable() {
int counter = 0;
@Override
public void run() {
counter++;
// ...
}
}
run mvn package -e
aw man...
ikr
thats dumb
Hey I got a problem I have an even to format chat but when I have luckperms and have there prefix, the prefix won't show up in chat. how do I fix that?
@EventHandler
public void rgbMessage(AsyncPlayerChatEvent e){
String message = translateHexColorCodes("&#", "", e.getMessage());
Player p = e.getPlayer();
e.setMessage(message);
e.setFormat(ChatColor.translateAlternateColorCodes('&', config.getString("ChatFormat.Format").replace("%displayname%",p.getDisplayName()).replace("%name%", p.getName()).replace("%message%",
e.getMessage())));
}
no
nope
<?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 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>me.missionary</groupId>
<artifactId>board</artifactId>
<version>1.1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>Board</name>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<build>
<defaultGoal>clean package install</defaultGoal>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.7.0</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
</plugins>
</build>
<repositories>
<repository>
<id>spigotmc-repo</id>
<url>https://hub.spigotmc.org/nexus/content/groups/public/</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>org.bukkit</groupId>
<artifactId>bukkit</artifactId>
<version>1.8.8-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.16.20</version>
<scope>provided</scope>
</dependency>
</dependencies>
</project>
lol why are you importing the bukkit dependency
its not mine :/
oh
so...
it could be an issue with the maven compiler
select all the maven compiler plugin stuff between the <plugin></plugin> and paste
<version>3.8.1</version>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>8</source>
<target>8</target>
<compilerArgs>
<arg>-parameters</arg>
</compilerArgs>
</configuration>
in
nothing in between plugin
what
o________________o
mmmmmmm
should've gone to specsavers
yeah replace whats in that with what I pasted
try executing the mvn package now
oh no
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project board: Fatal error compiling: java.lang.ExceptionInInitializerError: com.sun.tools.javac.code.TypeTags -> [Help 1]
try removing the default goal line weird its working for me
like compiling the same thing?
1 sec
try compile that
wait are you using intellij? how are you executing the maven commands
oh here we go I see
how I can check loaded chunk for player?
@main dew you cant since thats clientside
ye im using intelliJ
I did it in mac terminal before
but it also works in intelliJ
moment I check this
Hi ! I need help with my plugin, it make some Post Request, all fine when I declared the url String inside the HTTPSPostRequest class, but now I'm trying to get that from the config.yml file and I get "Could not pass event PlayerAdvancementDoneEvent to TestPlugin2 v1.0"
Can someone help me? Thanks! I can share my code if needed...
NO NO server side
?
no im looking at it now
ok
Server must know what chunk should send to player
why would it
waste of memory
you can check if its loaded entirely with Chunk#isLoaded
I don't want this
no no
as I said
Pretty certain there is a PlayerChunkMap
the server doesent store it
server must know this
Yeah server definitely knows this
Else it would have to broadcast every single packet
To every single player
The server knows where every player is and it knows what chunks it has loaded
thats not what he wants tho
ik that
but say what chunk the player will next load
or will load in 500 blocks
impossible until the player moves and the server decides
yea you know how get this chunk?

@fading lake any update fixing that annoying pom
not yet itskindathrowing me
You can check teh view distance setting on teh server then calculate what chunks are loaded around the player using that value
if you need to do somethign with chunks you can monitor the chunk load event
I would like to use contains
maybe possible get list loaded chunk with Player or CraftPlayer?
Why do you need a scoreboard api plugin?
easier
^
cleaner
I did
not really, theres very little to creating and managing scoreboards
what does an api give you that something you create doesnt
nO wAY
public class ScoreboardUtil {
private final Scoreboard scoreboard;
private final Objective objective;
public ScoreboardUtil() {
scoreboard = Bukkit.getScoreboardManager().getNewScoreboard();
objective = scoreboard.registerNewObjective("Board", "dummy");
objective.setDisplaySlot(DisplaySlot.SIDEBAR);
}
public ScoreboardUtil(Player player) {
scoreboard = player.getScoreboard();
objective = scoreboard.getObjective(DisplaySlot.SIDEBAR);
}
public Scoreboard getScoreboard() {
return scoreboard;
}
public String getTitle() {
return objective.getDisplayName();
}
public void setTitle(String name) {
objective.setDisplayName(name);
}
public void set(int row, String text) {
if (16 > row) {
if(text.length() > 32) { text = text.substring(0, 32); }
remove(row);
objective.getScore(text).setScore(row);
} else {
throw new IndexOutOfBoundsException("row cannot be higher than 16");
}
}
public void remove(int row) {
for(String entry : scoreboard.getEntries()) {
if(objective.getScore(entry).getScore() == row) {
scoreboard.resetScores(entry);
break;
}
}
}
}
ezpz
well, have you looked in yoru .m2 folder? as you have built your plugin you shoudl now have that api in yrou local
thanks, saved me an hour ๐
and we all know
time equals
bruh
@fading lake I need to know something
something very important
this will change space and time as we know it
does it update automatically?
wdym
its essentialsx
if youre using maven, try shading essentialsx into your repo
is it static or dynamic
which is coming from your plugin, what version is the server?
dynamic
1.8.9
what version of the API are you using?
idk not my server
What mc server version
the api that allows you to use spigot stuff in your plugin
1.8
the MC version is 1.8, PotionData doesnt exist until 1.13 afaik
so your API version is higher than your mc version @cedar meadow
Factions
1.8 doesnt have PotionData
Somewhere random in the plugin
its either 1.8.9 or 1.8
yeh?
what ide are you using?
If you type BlockType.BLACKSTONE does it give and error?
notepad
@fading lake can u plz give me a code example 
Mspaintide
๐ช
ill test
oh no lmfao
Hi ! I need help with my plugin, it make some Post Request, all fine when I declared the url String inside the HTTPSPostRequest class, but now I'm trying to get that from the config.yml file and I get "Could not pass event PlayerAdvancementDoneEvent to TestPlugin2 v1.0"
Can someone help me? Thanks! Here my code: https://github.com/kaonashi696/PleromaMC/tree/master/src/com/kaonashi696/pleromamc
Use ?paste
shouldn't you be running that async?
?paste
1.8.3 bad
ScoreboardUtil scoreboard = new ScoreboardUtil();
scoreboard.set(5, "ur");
scoreboard.set(4, "mum");
scoreboard.set(3, "smells");
scoreboard.set(2, "like");
scoreboard.set(1, "boogers");
player.setScoreboard(scoreboard.getScoreboard());
Lmao
?paste
yes, that indicates the wrong API version
how to fix it
1.8.9 best vers
so I just set
and it does the rest
yes
no
#help-server and i think its BlockType: BLACKSTONE
ok
yeah I just realised hes trying to do stuff with essentials
OH
wait
sorry
so are you trying to make essentials work
if so, you've got the wrong version
- 1.8 is unsupported
- Ask in #help-server
Hi ! My events listeners are not working... Can someone help me?
https://github.com/kaonashi696/PleromaMC/tree/master/src/com/kaonashi696/pleromamc
who uses 1.8
I have a really quick question with BlockPopulators and the vanilla ones. If I wanted to replace JUST the vanilla tree populator, would it be possible to do so without the need to rewrite the entire Chunk Generator. Because to my knowledge, world.getpopulators only returns the populators without telling me which one of them is the tree populator that I want to replace.
bukkit events don't throw exceptions, try using a try/catch instead
Well, as I explained before thats not the problem... (but I'll change it) --> "it make some Post Request, all fine when I declared the url String inside the HTTPSPostRequest class, but now I'm trying to get that from the config.yml file and I get "Could not pass event PlayerAdvancementDoneEvent"
Also don't send web requests on the main thread
Is not on the main, it is? It is in the HTTPSPostRequest class
- your HTTPSPostRequest.class extends JavaPlugin -> Bad
- HTTPSPostRequest get=new HTTPSPostRequest(); <- You can not instanciate a class that extends JavaPlugin
- You need to really enforce the Java code style conventions or people who are trying to help you will get confused.
you have multiple classes extending JavaPlugin?
sorry for java code style, I'm a python developer
Hey I got a problem I have an even to format chat but when I have luckperms and have there prefix, the prefix won't show up in chat. how do I fix that?
@EventHandler
public void rgbMessage(AsyncPlayerChatEvent e){
String message = translateHexColorCodes("&#", "", e.getMessage());
Player p = e.getPlayer();
e.setMessage(message);
e.setFormat(ChatColor.translateAlternateColorCodes('&', config.getString("ChatFormat.Format").replace("%displayname%",p.getDisplayName()).replace("%name%", p.getName()).replace("%message%",
e.getMessage())));
}
If I remove extending JavaPlugin from HTTPSPostRequest I get "The method getConfig() is undefined for the type HTTPSPostRequest"
That's why I extended it
Yeah that won't work
use dependency injection to send an instance of your main class to the event class, with that you can get the config
Hm. Try to call your handler method with a lower priority and make it LoadBefore: [LuckPerms] in your plugin.yml
but what about other plugins that change the chat?
You need an instance of your JavaPlugin class in your HTTPSPostRequest instance. The constructor would a simple entry point. A singleton would also do the trick.
Go talk to imaginedev then lmao
Java > Python
C# > Java
Hey
Well, thanks for your help
Let's not spoil the fun jeff
๐
Some language competition is nice for the consumer
True Python has less boilerplate
By less u mean none
Yea
well, depends on how good you are
in your dreams
i have seen some pretty garbage code from my friends in python
like once, there was 2 functions that they made, cause one had one line that was diffrerent. Each was 100 lines
c# for game dev java for api stuff
Why do people use c# for game dev? what about it is so good ?
Unity uses C#
Yeah, is that why?
Unreal uses C++
How can I do that exactly?
@fading lake HELP!!!!!!!!
I like Java as its platform agnostic
like, just in general why is C good for games
?
C++ is fast. C# I have no idea why they chose that
wait what
Right, i think i heard something about C being closer to the hardware iirc, makes sense then i guess
how is org.bukkit.Bukkit.getScoreboardManager() null
c# > c++
dont ask me
no clue
package me.zoibox.hub.hub.scoreboard;
import me.lucko.helper.Events;
import me.zoibox.hub.hub.Hub;
import me.zoibox.hub.hub.utils.BungeeChannelApi;
import me.zoibox.hub.hub.utils.ScoreboardUtil;
import me.zoibox.hub.hub.utils.chat.CC;
import org.bukkit.entity.Player;
import org.bukkit.event.player.PlayerJoinEvent;
import java.util.ArrayList;
import java.util.List;
public class ScoreboardHandler {
ScoreboardUtil scoreboardUtil = new ScoreboardUtil();
private final Hub hub;
private BungeeChannelApi bungeeChannelApi;
public ScoreboardHandler(Hub hub){
this.hub = hub;
this.bungeeChannelApi = new BungeeChannelApi(hub);
}
int test = 1;
public void createScoreboard(Player player) {
scoreboardUtil.setTitle(Hub.mainColour + Hub.serverName);
scoreboardUtil.set(0, Hub.ambientColour + "---------------------------");
scoreboardUtil.set(1, Hub.mainColour + "Online Players: " + bungeeChannelApi.getPlayerCount("total"));
scoreboardUtil.set(2, String.valueOf(test));
scoreboardUtil.set(5, Hub.ambientColour + "--------------------------- ");
}
public void setScoreboard() {
Events.subscribe(PlayerJoinEvent.class)
.handler(event -> {
Player player = event.getPlayer();
player.setScoreboard(scoreboardUtil.getScoreboard());
test++;
});
}
}
?paste
Show teh full error,
of course you can. its in your latest.log
^^
show us ScoreboardUtil.java:15
impossible
can you send the method it is part of?
the line is objective = scoreboard.registerNewObjective("Board", "dummy"); @eternal oxide
yea
huhhhhh, thats weird
no its not
its this
scoreboard = Bukkit.getScoreboardManager().getNewScoreboard();
funny man
is this error when using that scoreboard API?
it was built for 1.8.9 so if they changed the way you make scoreboards, then welp
idk why it would be null tho
ok, You are attempting to initialize your Scoreboard before the server is started. Probably a Field in your main class so its being instanced as soon as your class is accessed
ooohhh, true
oh yeah, you're supposed to create them per player, not at the start and send the same one to every player (I think? I havent used this util in a while)
wait
let me check
ok
yes, you make it and send it onto the player as they join
Is this legal?
public class HTTPSPostRequest{
PleromaMC thefile = new PleromaMC();
FileConfiguration config = thefile.thefile();
no
and in PleromaMC.java:
FileConfiguration config = getConfig();
public FileConfiguration thefile() {
return config;
}
I do that
where is HTTPSPostRequest instantiated
no you create it on startup and then send it to the user when they join
oh
package com.kaonashi696.pleromamc;
import java.io.IOException;
import org.apache.commons.lang.StringUtils;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.entity.PlayerDeathEvent;
public class PlayerDeathListener implements Listener{
@EventHandler
public void onPlayerDeath(PlayerDeathEvent event) throws IOException {
String deathMessage = event.getDeathMessage();
if (StringUtils.isBlank(deathMessage)) return;
HTTPSPostRequest.sendPOST("status=" + deathMessage);
}
}
where is PlayerDeathListener registered
in PleromaMC
show
public void onEnable() {
getServer().getPluginManager().registerEvents(new PlayerDeathListener(), this);
how tf do I get an instance of player\
inside PlayerDeathListener put this so it'd become PlayerDeathListener(this)
join event
I use an api
okay, and that's all?
then you're fucked
no
it should be throwing an error at you
is it?
yes
okay go to PlayerDeathListener
we know
put in
PleromaMC core;
public PlayerDeathListener(PleromaMC core) {
this.core = core;
}
``` above the event listener
@quaint mantle
done, still having the error
which one
okay last thing
post the listeners source again
the listener
not the entire clas
@EventHandler
public void onPlayerDeath(PlayerDeathEvent event) throws IOException {
String deathMessage = event.getDeathMessage();
if (StringUtils.isBlank(deathMessage)) return;
HTTPSPostRequest.sendPOST("status=" + deathMessage);
}
you're still trying to create a scoreboard at runtime
I sent class
replace HTTPSPostRequest.sendPOST("status=" + deathMessage); with HTTPSPostRequest.sendPOST(core, "status=" + deathMessage);
Please no HTTP(s) requests on the Main thread
You will kill the server
?paste
dw ill get him to throw it in an async
line 73
what about it
done
move it to the thing thats executed when the player joins
is it erroring?
ok
yes
"The method sendPOST(String) in the type HTTPSPostRequest is not applicable for the arguments (PleromaMC, String)""
yup, thanks again
replace public static void sendPOST(String POST_PARAMS) throws IOException { with public static void sendPOST(PleromaMC core, String POST_PARAMS) throws IOException {
then instead of instantiating a PleromaMC instance, use core so core.getConfigorwhateverthemethodis
no errors
so send the sendpost method in chat
so core.getString() for example
no
core isnt a configurationsection
you need to use core.getConfig()
then .getString after that
i think
I cant remember the method to get the config from a plugin instance because im half asleep
"getConfig cannot be resolved or is not a field"
o_o
it should be https://gyazo.com/ca47854ef93bdd85c46c271285853bd2
are you remembering the ()
and before anyone yells at me about static abuse, thats for debugging
?paste
And this?
FileConfiguration config = core.getConfig();
String oauth = config.getString("oauth");
String post_url = config.getString("post_url");
that should be fine yeah
why are you loading the player listener weird
wdym
wdym
no what do you mean
no sb
So sendPOST method:
public static void sendPOST(PleromaMC core, String POST_PARAMS) throws IOException {
FileConfiguration config = core.getConfig();
String oauth = config.getString("oauth");
String post_url = config.getString("post_url");
URL obj = new URL(post_url);
HttpsURLConnection httpsURLConnection = (HttpsURLConnection) obj.openConnection();
httpsURLConnection.setRequestMethod("POST");
httpsURLConnection.setRequestProperty("Authorization","Bearer "+ oauth);
// For POST only - START
httpsURLConnection.setDoOutput(true);
OutputStream os = httpsURLConnection.getOutputStream();
os.write(POST_PARAMS.getBytes());
os.flush();
os.close();
// For POST only - END
int responseCode = httpsURLConnection.getResponseCode();
System.out.println("POST Response Code :: " + responseCode);
if (responseCode == HttpsURLConnection.HTTP_OK) { // success
BufferedReader in = new BufferedReader(new InputStreamReader(httpsURLConnection.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in .readLine()) != null) {
response.append(inputLine);
} in .close();
// print result
System.out.println(response.toString());
} else {
System.out.println("POST request not worked");
}
}
bruh
have you launched it to the player
xd
auto moderator fuCK OFF
public void setScoreboard() {
Events.subscribe(PlayerJoinEvent.class)
.handler(event -> {
Player player = event.getPlayer();
player.setScoreboard(scoreboardUtil.getScoreboard());
test++;
});
I saw the message, thanks @fading lake
So gonna test that and make the same for other listeners
And what about this? I don't understand...
OH
yeah
basically
java has multithreading, so you know how you execute a method and it goes through it, it executes methods, waits for them to finish and then carries on
basically multithreading allows java to do multiple things at the same time
the problem with anything involving IO is that the server halts (waits) for it to finish which can cause insane lag spikes or crashes
so basically you're best running it asynchronously
I do set it
that should work ๐ค
but it dont
I should run asynchronously the sendPOST method is that?
๐ค
yes you should
if you're not thinking of returning anything you should be fine
Oke ๐ thanks a lot again 
ok now time to clean it up and hopefully not break it
basically just do
new BukkitRunnable() {
@Override
public void run() {
sendpostetc
}
}.runTaskAsynchronously(core);
@quaint mantle ^
@fading lake can you please help me ๐ฅบ
I thought you said you fixed it
?paste
I did
I fixed the scoreboard
but everything else. broke in the processes
what
youve lost me I have no idea whwat you're trying to tell me
errors?
not applicable
load or loadplayer
load
is it because you don't call load()
you dont call load()
igiveup
HAHAHAHAHA
double dX = player.getLocation().getX() - target.getLocation().getX();
double dY = player.getLocation().getY() - target.getLocation().getY();
double dZ = player.getLocation().getZ() - target.getLocation().getZ();
double yaw = Math.atan2(dZ, dX);
double pitch = Math.atan2(Math.sqrt(dZ * dZ + dX * dX), dY) + Math.PI;
double X = Math.sin(pitch) * Math.cos(yaw);
double Y = Math.sin(pitch) * Math.sin(yaw);
double Z = Math.cos(pitch);
Vector vector = new Vector(X, Y, Z);
bulletArrow.setVelocity(vector);```
I think you need to reinstall your brain today
its midnight
ah
I try to set the velocity of an arrow to a player target
ive been up till 5 the last 3 weeks
But the arrow is always floating next to the target and dont it it
wdym "floating next to the target"
The arrow direction != the direction between the shooter and the target is
that includes math, my brain has stopped
performs magical hand movements to summon 7smile7, elgarl, conclure or frostalf
Explain what you are trying to do
I tried to shoot an arrow which is following a target
so a tracking arrow
But the arrow always have the wrong vector as velocity
Yes
Are you trying to adjust it in flight?
How can I create a player entity?
pain, suffering, and a lot of giving up
use the citizens api
thats what everywhere like hypixel, cubecraft, mineplex etc does
public static Location getLocationWithTarget(final Location sourceLoc, final Location targetLoc) {
Location delta = sourceLoc.clone().subtract(targetLoc);
float distance = (float) Math.sqrt(delta.getZ() * delta.getZ() + delta.getX() * delta.getX());
float pitch = (float) Math.toDegrees(Math.atan2(delta.getY(), distance));
float yaw = (float) Math.toDegrees(Math.atan2(delta.getZ(), delta.getX())+Math.PI/2);
Location resultLoc = sourceLoc.clone();
resultLoc.setPitch(pitch);
resultLoc.setYaw(yaw);
return resultLoc;
}```This method returns a location with pitch and yaw to the target. From that you can get teh velocity
Understandable
I mean citizens is (was) utter trash. There was a time where it occupied 20% of a tick just for running. Without any online user and one NPC standing at spawn.
What is resultLoc?
thats the location with adjusted pitch and yaw to teh destination
I've tried to add Citizens with AutoImport but apparently it doesn't exist
I think they've optimized it a little bit now so it's actually possible to use it without killing your server, since hypixel have loads of them running about trying to kill players and it suits them perfectly (until they start getting players to hit hundreds of them at once)
the whole skyblock event thing a few days ago was an utter joke
tps dropped to like 9
So just transform this into a vector?
Or what?
yes
public void setTarget(final Projectile projectile, final Location targetLoc, final double velocity) {
final Vector velocityVector = targetLoc.toVector().subtract(projectile.getLocation().toVector());
velocityVector.normalize().multiply(velocity);
projectile.setVelocity(velocityVector);
}
Also make sure the projectile is not affected to gravity. But if you do this every tick then its not a concern.
Oh. The is a method for that. Right?
This sets the velocity of a projectile to point at the target location with the given velocity.
is there any difference between if and case statements other than case being easier? Like speeds?
What is the most recent version of the citizens API
Thanks. Thats working
@lost matrix why not use the vector length to set teh velocity?
that way you maintain whatever velocity was set before
Kind of. But the performance is very similar and the compiler makes a good job at optimizing it anyways.
If you really want to increase the performance then go for something that scales O(1) instead of O(n).
Hash based data structures for example.
Good idea. @rigid hazel You can also do what ElgarL just suggested. ^
But depends on how you want to use that method.
I think you gave me a good way
I only testet it on mobs and they arent running a lot but I'm sure this will follow targets too
Hey I'm looking to create an explosion on arrow hit, thing is, I need to keep track of the shooter in case someone dies to the explosion
@EventHandler
public void onShootHit(ProjectileHitEvent e){
if(!(e.getEntity() instanceof Arrow)) return;
Arrow arrow = (Arrow) e.getEntity();
if(!(arrow.getShooter() instanceof Player)) return;
Player shooter = (Player) arrow.getShooter();
Location targetLocation = e.getEntity().getLocation();
TNTPrimed tnt = (TNTPrimed) targetLocation.getWorld().spawnEntity(targetLocation, EntityType.PRIMED_TNT);
tnt.setFuseTicks(0);
arrow.remove();
}
This works well but sometime I can see the tnt before it explodes ๐
set teh shooters uuid on the projectiles meta at launch
*using the PersistentDataContainer of the Projectile
And the ProjectileLaunchEvent
But why, doesn't get shooter work fine ?
I'm using 1.8.8 ๐
This code works fine, I actually store the tnt entity wih the shooter name in a hashmap
so no pdc ๐ฆ
But when it explodes, sometimes I can see the tnt
Lol.. Then use a Map<UUID, UUID> with projectileID mapped to the shooterID
oh you need the player for the tnt
primed tnt is an entity so you coudl still use meta
Yea, but How do I store the damager with this method
declaration: package: org.bukkit, interface: World
when you shoot the arrow add the shooter's uuid and the arrow's uuid to a map
What do you use the shooter for anyways?
I'd transfer shooter from the arrow to the primed tnt on hit, then in the explosion look for the meta to get the shooter.


