#development
1 messages ยท Page 30 of 1
anyone? 
what other IDEs dont
i dont have to use XMaterial if there is another solution btw
have community versions
Trying to be a decent human being ๐
Other JB ides
oh, other JetBrains ones?
yeah
and if all your employees are used to using the product then you as a business are heavily compelled to buy licenses
also
that's because IJ was their first and their best one
and that's how they got their insane market share lol
๐ฅด
the adobe effect, very true
Did you add api-version to the plugin.yml?
code is written in 1.11
yeah i set it to 1.13
dont
u shouldn't actually need xmaterial for this
remove api-version if you're using 1.12 or below api
What
#dev-general โ๏ธ๐ค
bro there r so many contradictory things ๐ญ
spigot specifically has hacky bytecode manip to keep forwards compatibility with materials
XMaterial requires it to be 1.13 in the plugin.yml
Yall give really bad advice
well it wasnt working before, thats why i started using xmaterial and api-version
yep
https://github.com/CryptoMorin/XSeries
Don't forget to add api-version: "1.13" to your plugin.yml. This will keep the plugin working even if the server is not 1.13
we're saying to not use xmaterial at all
the point is that he shouldnt need xmaterial in the first place
unless u need it but a lot of the times you don't
You only really need Idea from IJ
For everything else you use vscode ๐ค
world.spawnFallingBlock(location, new MaterialData(block.getType())
no XMaterial needed
is there a way to convert my 1.15 plugin into 1.19 easily? like can i just change the spigot maven version in the pom?
(all the code will work on both versions)
wait i just realized
doesnt work tho: https://srnyx.likes.cash/java_XP66Yt7q3L.mp4
the falling blocks dont appear
error?
none
i set block to air before spawning falling block btw
...
oh
yeah i wonder why then lmao
._.
falling air block
๐ญ
tfw
๐คฉ
For the most part, yeah
There might be some api changes tho
yeah that's why it's pointless lol
all code will work that doesn't use internal stuff
from 1.15 -> 1.19
afaik
there shouldnt be any breaking changes, at the most some things will be deprecated
im so happy im a happy little developer so happy happy happy me so happy woohoo i love code yay yipee
๐ค
fraud
was the sound update on 1.13
ok then 1.12 and below plugins won't work if it uses sounds
Oh shit its 2 am, gtg zzzz
the so called "flattening"
besides that it'll all work if it doesn't use any internal stuff
yes they will
Can't wait for the new change to break all the enums
o while im here, does Block#getLocation() get the corner location of the block or the center of it?
.
what about sounds
are u sure?
the latter i believe
probably says in docs
i remember adding special compat to sounds in bedwars though
it does not say in docs
ye its very stinky
corner
im pretty sure
omg
i remember running into an issue relating to that in bedwars
second
second
ok so yes this still stands
is it corner or center
actually yeah it's prolly corner
i think i crashed my server trying to debug it
M D 5
spighub
XSeries has sound support lol
// Get nearby blocks
final Set<Block> blocks = getNearbyBlocks(player.getLocation(), (int) options.getRadius());
// Remove non-whitelisted blocks
final Set<Material> whitelist = plugin.config.blockWhitelist;
Bukkit.broadcastMessage(whitelist.toString());
blocks.removeIf(block -> {
Bukkit.broadcastMessage(block.getType().toString());
return !whitelist.contains(block.getType());
});
Bukkit.broadcastMessage(blocks.stream().map(Block::getType).collect(Collectors.toSet()).toString());```i think there is more version incompatibility stuff: https://maxx-has.no-friends.xyz/java_W15aKgJet2.png *im standing next to a grass block*
plugin.config.blockWhitelist comes from a string list of materials in a yml file, converted to materials using Material#valueOf(String)
and blocks wont contain blocks with materials from versions past 1.19, such as deepslate
i would guess that blockWhitelist is using the LEGACY_ materials instead
how are you loading it?
config.blockBlacklist = configFile.getStringList("block-blacklist.list").stream()
.map(Material::valueOf)
.collect(Collectors.toSet());```
blockBlacklist is the same as blockWhitelist, i just edited it in my previous msg so it made more sense
ik
just debug the whitelist rq
this is the all the code, but since im only focusing on the whitelist part, i only included it:
// Get nearby blocks
final Set<Block> blocks = getNearbyBlocks(player.getLocation(), (int) options.getRadius());
// Remove blacklisted blocks
final Set<Material> blacklist = plugin.config.blockBlacklist;
Bukkit.broadcastMessage(blacklist.toString());
if (plugin.config.blockBlacklistTreatAsWhitelist) {
// Whitelist
if (blacklist.isEmpty()) return;
blocks.removeIf(block -> {
Bukkit.broadcastMessage(block.getType().toString());
return !blacklist.contains(block.getType());
});
Bukkit.broadcastMessage(blocks.stream().map(Block::getType).collect(Collectors.toSet()).toString());
} else if (!blacklist.isEmpty()) {
// Blacklist
blocks.removeIf(block -> blacklist.contains(block.getType()));
}```
uh
blocks.removeIf(block -> {
return !blacklist.contains(block.getType());
});
๐ค
anyway
what is the black/white list containing
thats if its a whitelist (plugin.config.blockBlacklistTreatAsWhitelist)
# List of blocks that will/won't be affected by the forcefield (if player has blocks enabled)
block-blacklist:
# https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Material.html
list:
- GRASS
- TALL_GRASS
- GRASS_BLOCK
# Whether to treat the blacklist as a whitelist instead
treat-as-whitelist: true```
what
oh ic
๐ค

@river solstice It always cracks me up to see you hate on Kotlin (without knowing it) and then having this on your github 
๐ ๐ ๐ ๐ ๐ ๐
๐ฅฒ
people are afraid of what they don't know ๐
any ideas?? xmaterial????
Make your own. XMaterial is pretty bloated.
do i need to use it in this scenario?
most likely not
what
how do i fix then :(
instead of just java Bukkit.broadcastMessage(block.getType().toString()); what about if you print ```java
Bukkit.broadcastMessage("block: " + block.getType().toString() + ", blacklist: " + blacklist);
You only really need it if your supporting versions under 1.13
it would print the blacklist for every single block in blocks, and that doesnt rly solve my issue, those r just debug msgs
print anyways plz
im supporting 1.11+
oh i didnt know u wanted to see the output of it lol
i thought u were just suggesting me to do that
XM is for backwards compatibility, this is forwards compatibility
Btw why specifically 1.11? Don't think I ever seen anyone target that version, normally it's like 1.8, 1.12, 1.16, or latest
its just the lowest version i could go down to
cause 1.11 is when they added something to do with chat i dont recall
i think it was title times
1.11 was end cities I think.
isn't that 1.9
Yeah that was 1.9
Ah. Then yeah no clue xD
It was the mansions, very forgettable
Ahh
yea thats it
Yeah very forgettable
1.11 added Player#sendTitle(String, String, int, int, int)
before it was just Player#sendTitle(String, String)
With adventure you can use titles all the way to 1.8
i refuse to use adventure
I'm sorry to hear that
:(
Can also use the title command
Back on your issue though like dkim said, we need you to output the block type and list.
dont worry I started off hating adventure and now I am adventure lover
๐ฅฐ
Good, so there is a cure
List
Show updated code as well please.
yes its blocks after removing
// Get nearby blocks
final Set<Block> blocks = getNearbyBlocks(player.getLocation(), (int) options.getRadius());
// Remove blacklisted blocks
final Set<Material> blacklist = plugin.config.blockBlacklist;
if (plugin.config.blockBlacklistTreatAsWhitelist) {
// Whitelist
if (blacklist.isEmpty()) return;
blocks.removeIf(block -> {
Bukkit.broadcastMessage("block: " + block.getType().toString() + ", blacklist: " + blacklist);
return !blacklist.contains(block.getType());
});
Bukkit.broadcastMessage(blocks.stream().map(Block::getType).collect(Collectors.toSet()).toString());
} else if (!blacklist.isEmpty()) {
// Blacklist
blocks.removeIf(block -> blacklist.contains(block.getType()));
}```
its removing GRASS, when it shouldnt be
Material is taking pre 1.13 name, blacklist is post 1.13
Remove the ! from the return blacklist.contains(

that would make it blacklist
still
Bukkit.broadcastMessage("block: " + block.getType().toString() + ", blacklist: " + blacklist + ", REMOVE (doesn't contain): " + !blacklist.contains(block.getType());
blacklist code is here:
} else if (!blacklist.isEmpty()) {
// Blacklist
blocks.removeIf(block -> blacklist.contains(block.getType()));
}```
You don't need the empty check, it'll be false if empty
y?
the else is coming from if (plugin.config.blockBlacklistTreatAsWhitelist)
omg
it turned to dirt
one sec
lol
// Get nearby blocks
final Set<Block> blocks = getNearbyBlocks(player.getLocation(), (int) options.getRadius());
// Remove blacklisted blocks
final Set<Material> blacklist = plugin.config.blockBlacklist;
if (plugin.config.blockBlacklistTreatAsWhitelist) {
// Whitelist
if (blacklist.isEmpty()) return;
blocks.removeIf(block -> {
Bukkit.broadcastMessage("block: " + block.getType().toString() + ", blacklist: " + blacklist + ", REMOVE (doesn't contain): " + !blacklist.contains(block.getType()));
return !blacklist.contains(block.getType());
});
Bukkit.broadcastMessage(blocks.stream().map(Block::getType).collect(Collectors.toSet()).toString());
} else if (!blacklist.isEmpty()) {
// Blacklist
blocks.removeIf(block -> blacklist.contains(block.getType()));
}```
wait, should i try a block that actually changed material names between versions, like melon block?
yea matt was right: https://go-to.srnyx.xyz/java_sFzQzyWdzx.png
the block is pre-1.13, blacklist is post 1.13. but it doesnt make sense why grass wouldnt work
// Get nearby blocks
final Set<Block> blocks = getNearbyBlocks(player.getLocation(), (int) options.getRadius());
// Remove blacklisted blocks
final Set<Material> blacklist = plugin.config.blockBlacklist;
final Set<String> blacklistStr = blacklist.stream().map(Material::name).collect(Collectors.toSet());
if (plugin.config.blockBlacklistTreatAsWhitelist) {
// Whitelist
if (blacklist.isEmpty()) return;
blocks.removeIf(block -> {
final String type = block.getType().name();
Bukkit.broadcastMessage("block: " + type + ", blacklist: " + blacklistStr + ", REMOVE (doesn't contain): " + !blacklistStr.contains(type));
return !blacklistStr.contains(type);
});
Bukkit.broadcastMessage(blocks.stream().map(Block::getType).collect(Collectors.toSet()).toString());
} else if (!blacklist.isEmpty()) {
// Blacklist
blocks.removeIf(block -> blacklist.contains(block.getType()));
}
try this
๐ฅด
๐
๐
๐ชฆ
๐ซ
then use the appropriate material names for the version you're running
isn't MELON the melon itself
like the food
not in 1.13+, its the block
it might be both
im running 1.19, melon block is MELON, it doesnt work
no
try this
was about to tell u it wouldnt work lol
it won't work for melon though i think
Yeah
sucks
ig xmaterial is the way to go
ugh xmaterial confuses me im going to cry
If your server is 1.19 you need api-version in your plugin.yml
no you don't
the plugin isnt 1.19, its 1.11
the whole point is that if api-version is different (lower) than the server version, it'll apply compatibility
mmh
mmh!
no
setting the api version might be a "solution" though something I wouldn't recommend doing
well i do in some places
do you use things like MaterialData or the various get/setData that use bytes and such?
yeah okay then no
to answer this anyways, yes, except only making a MaterialData, i dont actually "use" it (World#spawnFallingBlock requires it)
@dusky harness so xmaterial it is?
can i get a stamp pls
no I don't approve that much

well i dont approve of u using adventure
so approval revoked
wow that is seriously tierist
I'd never
u can get canceled for that
Save yourself the trouble, drop old versions 
1.19.3 ftw
actually
@dark garnet can you try using Material.matchMaterial/getMaterial instead of valueOf?
wheres the fun in that when i can just spend a few hours here trying to fix it?
oh does api-version support that?
without setting api version
those methods do special handling for legacy plugins
you're right!
valueOf simply cannot
name = input parameterjava String filtered = name.toUpperCase(java.util.Locale.ENGLISH); filtered = filtered.replaceAll("\\s+", "_").replaceAll("\\W", ""); return BY_NAME.get(filtered);
which method are you talking about exactly
@Nullable
public static Material getMaterial(@NotNull String name, boolean legacyName) {
if (legacyName) {
if (!name.startsWith(LEGACY_PREFIX)) {
name = LEGACY_PREFIX + name;
}
Material match = BY_NAME.get(name);
return Bukkit.getUnsafe().fromLegacy(match);
}
return BY_NAME.get(name);
}
this
matchmaterial just calls getmaterial in the end
but it defaults to false
based off this, Material#matchMaterial(String) wont work
Oh shit I was checking bstats for version data and saw that paper is almost at 60% of servers now 
why not lol
Spigot at 25% 
melon issue again
okay try getMaterial then
does the same thing basically
matchMaterial just uppercases the name and replaces spaces with _ then does the same thing as getMaterial with the new name
getMaterial gets the Material from a Map<String, Material> which is just the material's name and the material itself
and getMaterial does legacy support
I am sure it has some handling for legacy plugins
as shown here
does it say anything
i dont see that on my end
which is what i meant here
because you're seeing API version 1.11
true
but you don't know what kind of class transforming bukkit does
but how would i use that method? it has another parameter
you dont
just wondering, what's the issue xd
forwards material compatibility
idk that
but I mean ignoring api-version, getMaterial only does legacy support if explicitly defined with the second parameter set to true
for example? xd
dkim bukkit does shit tons of class file transformations for legacy plugins
it might touch that shit
stop playing guessing games and just try it for fucks sake
with what?
oh my god
or both
why is it needed? (forwards material compatibility)
ok ok just the normal getMaterial(String)?
Tbh probably easier to compile on 1.13 or something like that, will work fine on newer names and for old ones they just need to put old names
yes
I've lost it a while ago
// Get nearby blocks
final Set<Block> blocks = getNearbyBlocks(player.getLocation(), (int) options.getRadius());
// Remove blacklisted blocks
final Set<Material> blacklist = plugin.config.blockBlacklist;
if (plugin.config.blockBlacklistTreatAsWhitelist) {
// Whitelist
if (blacklist.isEmpty()) return;
blocks.removeIf(block -> {
Bukkit.broadcastMessage("block: " + Material.getMaterial(block.getType().name()) + ", blacklist: " + blacklist + ", REMOVE (doesn't contain): " + !blacklist.contains(block.getType()));
return !blacklist.contains(Material.getMaterial(block.getType().name()));
});
Bukkit.broadcastMessage(blocks.stream().map(Block::getType).collect(Collectors.toSet()).toString());
} else if (!blacklist.isEmpty()) {
// Blacklist
blocks.removeIf(block -> blacklist.contains(block.getType()));
}```
no oh my god
oh?
:woozy:
ONLY replace valueOf with getMaterial
dont do that getMaterial( name()) stuff
when you get the list from the config
just there
ok ok
yes
how do i use block. type?
LOL
you're a fast typer
code?
// Get nearby blocks
final Set<Block> blocks = getNearbyBlocks(player.getLocation(), (int) options.getRadius());
// Remove blacklisted blocks
final Set<Material> blacklist = plugin.config.blockBlacklist;
if (plugin.config.blockBlacklistTreatAsWhitelist) {
// Whitelist
if (blacklist.isEmpty()) return;
blocks.removeIf(block -> {
Bukkit.broadcastMessage("block: " + block.getType().toString() + ", blacklist: " + blacklist + ", REMOVE (doesn't contain): " + !blacklist.contains(block.getType()));
return !blacklist.contains(block.getType());
});
Bukkit.broadcastMessage(blocks.stream().map(Block::getType).collect(Collectors.toSet()).toString());
} else if (!blacklist.isEmpty()) {
// Blacklist
blocks.removeIf(block -> blacklist.contains(block.getType()));
}```
config.blockBlacklist = configFile.getStringList("block-blacklist.list").stream()
.map(Material::matchMaterial)
.collect(Collectors.toSet());```
# List of blocks that will/won't be affected by the forcefield (if player has blocks enabled)
block-blacklist:
# https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Material.html
list:
- GRASS
- TALL_GRASS
- GRASS_BLOCK
- MELON
# Whether to treat the blacklist as a whitelist instead
treat-as-whitelist: true```
...
uh not exactly but they're equivalent
what
1.11 plugin
1.19.2 server
I'll leave this here and I'm gonna go get unconscious, good luck to you all
no please
api-version: 1.13
dont leave me
ur like the 20th person to suggest it
the plugin is 1.11
and?
1.11 wont complain if you have api-version in plugin.yml
i dont get the actual issue
all my plugins support 1.8+
dkim and bm both told me not to put api-version
but never had a similar issue
api-version is meant to not be there for your case, so if you add it and it works, it may work, but it's "hacky"
well, 1.8 - 1.12 doesnt mind if you have api-version
it worked
what dis mean
at me.notdew.com.roboref.RoboRef.<init>(RoboRef.java:38) ~[?:?]at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:?]at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[?:?]at jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:?]at java.lang.reflect.Constructor.newInstance(Constructor.java:490) ~[?:?]at java.lang.Class.newInstance(Class.java:584) ~[?:?]at org.bukkit.plugin.java.PluginClassLoader.<init>(PluginClassLoader.java:94) ~[patched_1.16.5.jar:git-Paper-794]at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:153) ~[patched_1.16.5.jar:git-Paper-794]at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:414) ~[patched_1.16.5.jar:git-Paper-794]at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:322) ~[patched_1.16.5.jar:git-Paper-794]at org.bukkit.craftbukkit.v1_16_R3.CraftServer.loadPlugins(CraftServer.java:393) ~[patched_1.16.5.jar:git-Paper-794]at net.minecraft.server.v1_16_R3.DedicatedServer.init(DedicatedServer.java:269) ~[patched_1.16.5.jar:git-Paper-794]... 3 more
ur gonna need to send the entire stacktrace ๐
mainly the top bit
ohhh boy its roboref again

enlighten me
[03:07:43 ERROR]: RoboRef is enabling!(B
at me.notdew.com.roboref.RoboRef.<init>(RoboRef.java:38) ~[?:?]at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:?]at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[?:?]at jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:?]at java.lang.reflect.Constructor.newInstance(Constructor.java:490) ~[?:?]at java.lang.Class.newInstance(Class.java:584) ~[?:?]at org.bukkit.plugin.java.PluginClassLoader.<init>(PluginClassLoader.java:94) ~[patched_1.16.5.jar:git-Paper-794]at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:153) ~[patched_1.16.5.jar:git-Paper-794]at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:414) ~[patched_1.16.5.jar:git-Paper-794]at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:322) ~[patched_1.16.5.jar:git-Paper-794]at org.bukkit.craftbukkit.v1_16_R3.CraftServer.loadPlugins(CraftServer.java:393) ~[patched_1.16.5.jar:git-Paper-794]at net.minecraft.server.v1_16_R3.DedicatedServer.init(DedicatedServer.java:269) ~[patched_1.16.5.jar:git-Paper-794]... 3 more
[03:07:43 INFO]: [RoboRef] Disabling RoboRef v${1}
this is all it has
lol
?startuplog
Startup Log Location
Your latest startup log can be found in the logs folder of your
server directory, labeled as latest.log.
Please copy the contents and paste them to a paste service.
Type ?paste for more information.
wait no
ignore that
@calm loom send main class
that's not the entire exception but oh well
?startuplog
Startup Log Location
Your latest startup log can be found in the logs folder of your
server directory, labeled as latest.log.
Please copy the contents and paste them to a paste service.
Type ?paste for more information.
send that ^
it's referencing an import statement so I assume the lines are messed up
k
lemme ask the owner for the log
uno momento
is the problem that there is a space
like a line gap
public String trim()```
Returns a string whose value is this string, with all leading and trailing space removed, where space is defined as any character whose codepoint is less than or equal to 'U+0020' (the space character).
If this String object represents an empty character sequence, or the first and last characters of character sequence represented by this String object both have codes that are not space (as defined above), then a reference to this String object is returned.
Otherwise, if all characters in this string are space (as defined above), then a String object representing an empty string is returned.
Otherwise, let k be the index of the first character in the string whose code is not a space (as defined above) and let m be the index of the last character in the string whose code is not a space (as defined above). A String object is returned, representing the substring of this string that begins with the character at index k...
This description has been shortened as it was too long.
a string whose value is this string, with all leading and trailing space removed, or this string if it has no leading or trailing space.
while we wait for log is it possible that the space that is inbetween 36 and 38 is the problem?
no, empty lines don't affect it
now we play the waiting game
i think my velocity calculation is incorrect:
final Location blockLocation = block.getLocation();
blockLocation.setY(blockLocation.getX() + 0.5);
blockLocation.setY(blockLocation.getY() + 0.5);
blockLocation.setZ(blockLocation.getZ() + 0.5);
final Vector vector = blockLocation.subtract(playerLocation).toVector();
if (vector.getX() == 0 && vector.getY() == 0 && vector.getZ() == 0) return;
final Entity fallingBlock = world.spawnEntity(blockLocation, EntityType.COW);
fallingBlock.setVelocity(vector.normalize().multiply(strength));```or something is wrong with how im summoning entity. cause it just dont exist ๐
btw dont add .5 to the y
i thought it was at the corner?
so you want the entity to spawn .5 blocks on top of the block
what is this for?
๐ฅด
me
so u can velociticaly abuse cows?
shhhh, we dont want the other cows to hear
isnt the corner at the bottom of the block?
ye it is, just confirmed with debugging
omg i just realized my issue
blockLocation.setY(blockLocation.getX() + 0.5); ๐ญ
it issss
in the code you posted above it's not that though
oh wait
yeah...
it wasnt working
it changed to:
blockLocation.setX(blockLocation.getX() + 0.5);
blockLocation.setY(blockLocation.getY() + 0.5);
blockLocation.setZ(blockLocation.getZ() + 0.5);```
but it looks normal here
read it very carefully
unless u edited it
specifically the 2nd line
ok what the cow still is just gone in obvlivion
shoot i just added "obvlivion" to my discord dictionary
how do i remove it ๐ญ
oblivion
i even made a bedrock box to encase it
but it still finds a way to basically not exist
// Get blockLocation and Vector
final Location blockLocation = block.getLocation();
blockLocation.setX(blockLocation.getX() + 0.5);
blockLocation.setY(blockLocation.getY() + 0.5);
blockLocation.setZ(blockLocation.getZ() + 0.5);
final Vector vector = blockLocation.subtract(playerLocation).toVector();
if (vector.getX() == 0 && vector.getY() == 0 && vector.getZ() == 0) return;
// Spawn falling block
//final FallingBlock fallingBlock = world.spawnFallingBlock(blockLocation, new MaterialData(block.getType()));
//fallingBlock.setDropItem(false);
//fallingBlock.setHurtEntities(false);
final Entity fallingBlock = world.spawnEntity(blockLocation, EntityType.COW);
fallingBlock.setVelocity(vector.normalize().multiply(strength));```
what is wrong with it 
omg i fixed it somehow idek how
i just changed this, to this:
// Get blockLocation and Vector
final Location blockLocation = block.getLocation();
blockLocation.setX(blockLocation.getX() + 0.5);
blockLocation.setY(blockLocation.getY() + 0.5);
blockLocation.setZ(blockLocation.getZ() + 0.5);
if (playerLocation.getX() == blockLocation.getX() && playerLocation.getY() == blockLocation.getY() && playerLocation.getZ() == blockLocation.getZ()) return;
// Spawn falling block
//final FallingBlock fallingBlock = world.spawnFallingBlock(blockLocation, new MaterialData(block.getType()));
//fallingBlock.setDropItem(false);
//fallingBlock.setHurtEntities(false);
final Entity fallingBlock = world.spawnEntity(blockLocation, EntityType.COW);
fallingBlock.setVelocity(blockLocation.subtract(playerLocation).toVector().normalize().multiply(strength));```
anyone know why the falling blocks all seem to converge in that one direction before actually going towards the player? https://media.srnyx.xyz/java_d982DsggcO.mp4
fallingBlock.setVelocity(playerLocation.subtract(blockLocation).toVector().normalize().multiply(strength));```
forcefield plugin... but with a few cursed features
btw switching playerLocation and blockLocation so that it pushes the blocks instead of pulls, it works perfectly
and using the same velocity calculator for entities it also works perfectly (for inverse, pull)
What do you mean by pull
like go towards the player
But it's still a push
ig ye
from the player's perspective ur "pulling" the blocks tho
doesnt matter tbh, i just dont get they all go in the same direction before actually going towards the player
Did you fix that?
no, not yet
im going to bed now tho, so ill try fixing in the morning
What would be the best data structure for storing, in my use case, chunk hoppers? I was thinking HashSet, but I've heard it's slower than ArrayList.
Also, how could I improve the scanning for the chunk-hopper? I don't think iterating through hundreds of blocks for each spawned item is a good idea, but I don't really know any other solutions.
Code in question:
https://paste.helpch.at/qesupawaxi.java
I was thinking, once the item appears, it scans the chunk for the hopper, if it does not find one, it stores the chunk in a data structure, so it knows it does not have a chunk hopper.
Once I place a block, it removes the chunk from the data structure, so it can scan again.
Hey there,
I'm a little new to minecraft development, I just wanted to ask about the Essentials plugin.
In messages_en.properties, I am configuring the messages to look a bit unique!
How would I add a line like this
PAY CONFIRMATION
You are willing to pay {0} to {f}.
That's not really a #development question.
You should ask that in #general-plugins or #1007620980627230730 or better yet, MOSS discord server.
private final List<Block> hopperCache = new ArrayList<>();
id say you should store only the location
would it be considered a 'different' block if it has an item inside?
or block state is not compared
probably, idk, but I think that's similar to using the UUID of a player instead of the Player object
yeah I was thinking that it might be the case.
I suppose it depends on the equal implementation
well, I'll test that out, see if it works with block. won't need to get block object from location.
Chunk has a getTileEntities method, you can basically just use that and extract hoppers from it
oh, right. totally forgot about that one
mine
you registering event listeners to a separate class?
wdym
most likely is you have two of the same plugin in your server files
there is only 1
hmm
im not sure sorry. i had the same error yesterday but it was because i did something dumb. i made my event handler class extend plugin and registered it. i doubt youve done the same thing
Send code of your main class and the coin flip command class
There you have your problem, it's extending JavaPlugin when it shouldn't
The command class i mean
The home of Spigot a high performance, no lag customized CraftBukkit Minecraft server API, and BungeeCord, the cloud server proxy.
implement commandexecutor
i would strongly suggest you learn java, and no just remove the extends JavaPlugin part
you are not going to have a fun time if you're just struggling through with your current level of experience
k
i have a splendid time
good for you
not an error but how would i make 1 command excute a command that sets the block below the player to be a blue carpet
im assuming youre talking about an in game command
you'd do your alias thing i showed yesterday, with the command of /setblock ~ ~ ~ (whatever blue carpet is)
๐ตโ๐ซ
why ๐ญ
this concerns me
because of context from yesterday in #general-plugins
i dont normally assume that xD
yeah but why
i hope they figure out that is โ eventualyl
what is, aliases?
r they trying to execute a minecraft command inside of their own command?
yeah, the goal is just to simplify the command
so you can do /carpetbelowme or something instead of /setblock ~ ~ ~ carpet
(im assuming)
yeye, just the context of when/where they asked concerns me
makes me think they're running the cmd from their cmd executor ๐
yeah in here it should prob be plugin dev so it confused me for a min too
You won't be able to upload images here directly to avoid spam, so please use https://imgur.com/upload or similar service to upload images/screenshots.
?paste
Paste Services
When asking for help with a config/menu/code issue please use our paste bin:
(we prefer it over pastebin.com)
โข HelpChat Paste - How To Use
I'm getting a NPE saying that my object phaseManager is null, but I can't figure out why.
https://paste.helpch.at/anewezupad.csharp
This is the code for assigning phaseManager and where phaseManager is being called.
it's not made null in here
so bedwars.getPhaseManager() returns null
can see that class maybe?
i think thats their main class, which would definitely be an issue
@tacit belfry can u send the Bedwars class in a paste pls
idk
im not so good at software design, but if it was my main plugin class i would inject it through the constructor
yea using getInstance breaks it im pretty sure
Iโm in the car right now, but it has a getter that returns phasemanager
Phasemanager is set in onenable
Something like: โphaseManager = new PhaseManager();โ
Nothing crazy
is Bedwars ur main class?
Yes
dont use getInstance on it, it breaks it
What should I use?
u need to add Bedwars plugin parameter to PregamePhase's constructor
Ok
public PregamePhase(@NotNull Bedwars plugin) {
bedwars = plugin;
config = bedwars.getSimpleConfig();
phaseManager = bedwars.getPhaseManager();
}```
That actually raises a question, should I use getInstance for runnables or a DI
i would just never use getInstance, ive never had to use it before so theres probs a better way instead
wait what r u using getInstance for in runnables?
At the end, like runTaskTimer(Bedwars.getInstance, 0L, 20L)
oh yeah no
u need to add plugin parameter to the method thats initializing the runnable
I'll switch to this, but it feels time consuming to do this for every class. Is this really the best way to do it?
yeah, technically the only way
yeah
i feel ur pain, i used to store my main class in a static variable and then i learned it was a big nono
alr ty
np
ngl i do still use a static get instance method for getting the mainclass
i could switch everything and just use DI but lazy
Does anyone know the link to the page why to use DI over static getters?
I think its by piggypiglet, if im not mistaken
hm, I think it was like a wiki page or something. maybe I'm mixing things up
new years resolution:
- guice
did u read the entire thread? some other ppl had some great points that were against piggy
hello is there a way to directly change nbt tag of player hand item ? or i must get the item change the nbt and giving him the new one at the same slot ?
hmm
im not positive, but all the online examples ive found seem to make an NMS copy, modify it, and make a bukkit copy and replace the itemstack
yeah i just made it and its work but if its how everyone do its ok
yeah its probably the standard way
hi, im trying to make an entity "revolve" around a player by setting the entity's velocity, anyone got any ideas how i can do this?
yeah, set the velocity perpendicular to the distance vector to the player
probably want to ignore the y component
how can i get the perpendicular vector tho? im not great with vectors
rotate around Y by 90 degrees
perpendicular = at 90 degrees
with respect to the other thing
you can use a shortcut by swapping the x and z components and making the new x negative
or you can just tell bukkit to do the trig for you and use the method to rotate around Y :d
i dont understand either tbh...
this is what i have rn:
Location entityLocation = entity.getLocation();
final Location direction = inverse ? playerLocation.subtract(entityLocation) : entityLocation.subtract(playerLocation);
entity.setVelocity(direction.toVector().normalize().multiply(strength));```
something like this
double speed = 1.0;
Vector directionToEntity = entity.getLocation().subtract(player.getLocation()).toVector().normalize();
double newX = -1 * directionToEntity.getZ();
double newY = 0;
double newZ = directionToEntity.getX();
Vector rotationVector = new Vector(newX, newY, newZ);
entity.setVelocity(rotationVector.multiply(speed));
i would say that's quite unneeded when there is a simple single-method solution
what is it?
what is rotateAroundY??
do you know what rotation is?
yes but is rotateAroundY a method?
vector.
im in java 8, 1.11, i dont think it exists 
accidentally getting the solution ๐
alright this is what i have now:
final Location direction = inverse ? playerLocation.subtract(entity.getLocation()) : entity.getLocation().subtract(playerLocation);
final Vector vector = direction.toVector().normalize();
if (tornado) {
vector.setX(-1 * vector.getX());
vector.setY(0);
vector.setZ(vector.getX());
}
entity.setVelocity(vector.multiply(strength));```but it isnt working, the mob kinda just moves back and forth on a straight line
setX
setZ(getX)
yeah that's not gonna work
oops typo too
ye but its setting the Z to be -Z
cause im setting the X to be the -Z, and then the Z is set to the X (which is now -Z)
oh i see
thats why i moved my variables out
then combined them afterwards to make a new vector
ok, it seems to work, but new issue. the entity seems to be getting farther away from the player, which causes them to get out of the radius of detection
slowly? or extremely quickly
like a spiral, slowly
hmm, you may need to make the vector point a bit inwards and not directly perpendicular. though "a bit inwards" sounds unreliable
ye it does lol
here's my code:
final Location direction = inverse ? playerLocation.subtract(entity.getLocation()) : entity.getLocation().subtract(playerLocation);
Vector vector = direction.toVector().normalize();
if (tornado) vector = new Vector(-1 * vector.getZ(), 0, vector.getX());
entity.setVelocity(vector.multiply(strength));```
is this supposed to happen at an exact radius?
anywhere inside of the radius
but it should push them to like the outermost of the radius (which its doing rn)
ok
here's a janky solution i would do
(doesnt mean its good)
track entities caught up in the tornado, and when they get outside the radius, tweak the new vector to add a tiny bit of the old vector
itll push them back and theyll oscillate along the radius
xD
ill stick with unreliability
that's the same solution
i guess its a little less specific, but i thought you wanted the entities to be pushed to the radius
true ugh
i dont think its too terrible. just when you create the perpendicular vector, add a small multiple of the (inversed) direction vector to it if the entities are outside the radius
ooooh
or
dont track the entities
detecting if they're outside of the radius is the hard part
ignore that
the small multiple of the direction vector
can be proportional to the current radius of the entity
so if they get too far away, the multiple of the inward direction vector grows
dumb it down for me a bit
i understand the concept, farther entity goes -> higher inward multiple goes
yes, so we have a regular perpendicular vector like this
double RADIUS = 10; // whatever many blocks you want your tornado radius to be
double someSmallConstant = 0.2; // this will become clear soon, just guess and check
Vector distVector; // player - entity or whatever (NOT NORMALIZED)
Vector perpendicular; // your perpendicular vector (NORMALIZED)
Vector inwardPull = distVector.multiply( -someSmallConstant / RADIUS ); // (inversely proportional to radius)
Vector newVelocity = perpendicular.add(inwardPull).multiply(speed);
entity.setVelocity(newVelocity);
the inwardPull is determined by how far away the entity is, inversely proportional to the total radius
the small constant is there still because i dont know how proportional your pull should be. that's dependent on how fast the entities are pushed away, so just keep changing that until it works nicely. If you overshoot your small constant, itll just make the entities revolve slightly closer than the intended radius, no problem
that's dependent on how fast the entities are pushed away
but doesnt thespeedaffect that?
newVelocity isnt used anywhere, is that on purpose?
true
oh my bad
let me tweak it real quick to make sense
yeah ok
now its inversely proportional to radius and speed
does it matter when .multiply(speed) is done (before/after .add(inwardPull))?
nvm i think it does matter
im not sure it matter, but if it does, the multiply should be first
i think it does cause PEMDAS right
actually i switched the order, and removed the inverse relation to speed. this makes more sense to me, so increasing the speed increases the inwardPull. but the old solution might still work for you
Vector vector = inverse ? playerLocation.subtract(entity.getLocation()).toVector() : entity.getLocation().subtract(playerLocation).toVector();
if (tornado) vector = new Vector(-vector.getZ(), 0, vector.getX()).add(vector.multiply(-0.2 / radius));
entity.setVelocity(vector.normalize().multiply(strength));```
ignore me struggling to get rid of the sheep ๐
also this isnt an issue but its just difficult to tell whats happening here when all the code is nested in calls like this
maybe is just because discord code blocks dont always looks pretty
ok i prefer the code blocks xD but did increasing the constant help at all?
is this better? and yes, i think it works great now, ty :))
Vector vector = inverse ? playerLocation.subtract(entity.getLocation()).toVector() : entity.getLocation().subtract(playerLocation).toVector();
if (tornado) {
final Vector perpendicular = new Vector(-vector.getZ(), 0, vector.getX());
final Vector inwardForce = vector.multiply(-0.3 / radius);
vector = perpendicular.add(inwardForce);
}
entity.setVelocity(vector.normalize().multiply(strength));```
no no tornado is a toggle
there is:
A) push
B) pull (represented as inverse)
C) tornado
ohh, so it will always pull unless tornado is set. but if inverse is set it will push
or the other way around, i understand now.
im hoping if i toggle inverse and tornado both on, it'll do tornado but opposite direction
yep it does
but not great...
hmm
do i have to change perpendicular too?
no?
oh
the player doesnt move at all, just the entity
thats what i meant, the entity
o
does it get sucked in when inverse tornado
no, if inverse and tornado r both true, it should just "spin" the entity the opposite direction (left)
yes, im wondering if that works as intended or not yet
it goes to the left, but not inward enough
hmm
so it goes out of the radius
this is because pull is also inverted
you should have separate if statements for each case
wdym?
so to fix it would i just have to remove the - from the inward force?
hmm maybe
it's a lot of unnecessary inversions, you should just store copies of the original vectors with more descriptive names
or it will be confusing to debug in the future
i changed to this:
// Make Vector push entity
Vector vector = entity.getLocation().subtract(playerLocation).toVector();
// If inverse, make Vector pull entity
if (inverse) vector = playerLocation.subtract(entity.getLocation()).toVector();
// If tornado, make Vector spin entity around player
if (tornado) {
final Vector perpendicular = new Vector(-vector.getZ(), 0, vector.getX());
final Vector inwardForce = vector.multiply(-0.3 / radius);
if (inverse) inwardForce.multiply(-1);
vector = perpendicular.add(inwardForce);
}
// Set entity velocity
entity.setVelocity(vector.normalize().multiply(strength));```
yes that will work. or you could just have one single inverse on the perpendicular vector
and no inversions on the "vector" vector
wdym?
is this what u mean?
// Make Vector push entity
Vector vector = entity.getLocation().subtract(playerLocation).toVector();
// If tornado, make Vector spin entity around player
if (tornado) {
final Vector perpendicular = new Vector(-vector.getZ(), 0, vector.getX());
final Vector inwardForce = vector.multiply(-0.3 / radius);
vector = perpendicular.add(inwardForce);
}
// If inverse, invert Vector
if (inverse) vector.multiply(-1);
// Set entity velocity
entity.setVelocity(vector.normalize().multiply(strength));```
no, this will invert the pull too. the way before was correct
o right
should i do vector.multiply(-1) for the first if (inverse) instead of reassigning vector?
actually, i should just ask this, r variables initialized when they r declared, or when they r used?
declared
ok ye then multipy is probs better option
// Make Vector push entity
Vector vector = entity.getLocation().subtract(playerLocation).toVector();
Vector inwardForce = new Vector(0,0,0);
// If tornado, make Vector spin entity around player
if (tornado) {
// Make the vector perpendicular
vector = new Vector(-vector.getZ(), 0, vector.getX());
inwardForce = vector.multiply(-0.3 / radius);
}
// If inverse, invert Vector
if (inverse) vector.multiply(-1);
// Add inward force (0 unless tornado)
vector = vector.add(inwardForce)
// Set entity velocity
entity.setVelocity(vector.normalize().multiply(strength));
so now inwardforce is zero, but if tornado then our vector is perpendicular and inward force has value.
Invert the vector if we need, and then add on the inwardForce.
good choice
imma keep it how it is rn cause it makes a bit more sense to me
sure
ok now new issue ๐
which is xD
they fall out of the sky if not on the ground
i think its an easy fix, just have to change a Y value somewhere
right cause we set it to zero, but if theyre in the air then theyll fall
would just added vector.getY() to the perpendicular work? cause im getting some weird results by doing it
o should i only be adding the inward force to the X and Z?
// Make Vector push entity
Vector vector = entity.getLocation().subtract(playerLocation).toVector();
// If inverse, make Vector pull entity
if (inverse) vector.multiply(-1);
// If tornado, make Vector spin entity around player
if (tornado) {
final Vector perpendicular = new Vector(-vector.getZ(), vector.getY(), vector.getX());
final Vector inwardForce = vector.multiply(-0.35 / radius);
if (inverse) inwardForce.multiply(-1);
vector = perpendicular.add(inwardForce);
}
// Set entity velocity
entity.setVelocity(vector.normalize().multiply(strength));```
yeah just throw in there, right before you add it, inwardForce.setY(0);
by the way, you dont want to set perpendicular's y to vector.getY()
// Make Vector push entity
Vector vector = entity.getLocation().subtract(playerLocation).toVector();
// If inverse, make Vector pull entity
if (inverse) vector.multiply(-1);
// If tornado, make Vector spin entity around player
if (tornado) {
final Vector perpendicular = new Vector(-vector.getZ(), 0, vector.getX());
final Vector inwardForce = vector.setY(0).multiply(-0.35 / radius);
if (inverse) inwardForce.multiply(-1);
vector = perpendicular.add(inwardForce);
}
// Set entity velocity
entity.setVelocity(vector.normalize().multiply(strength));```
item still falls to ground 
yeah in this code they should
o?
im a little unsure about how to keep entities afloat accurately. for mobs you could maybe give them a constant y velocity that counters gravity (after normalizing it at the end)
but if you want players to get caught up in this tornado, clientside physics + lag will muck it all up
yeah i do
hmm. im not sure, is a little out of my depth on that.
whenever someone lags, theyll default to client physics and fall to the ground. they can also walk out of the tornado like this
but i dont think you can do anything about that
sucks for them tbh LLLLL
yeah lol
well we rly just need to figure out how to make a vector's Y (velocity) point towards another Y (player)
towards another player?
towards the tornado center (which is a player)
Isn't that what you have Vector vector = entity.getLocation().subtract(playerLocation).toVector(); for?
i thought you wanted the Y level to maintain, so floating mobs would float
and grounded mobs would stay grounded
ye i want the Y level to be the same as the player's Y basically
oh, so if a mob is below the player itll float up
and if its above the player itll fall down
yee
i had thought so but ig not, cause they just fall to the ground rn
there is some complications because you keep changing the vector variable at each step, if you want to keep it like that then store the initial vector.getY() after the first line;
i just ended my sentence with a semicolon
yeah and?;
if u didnt then it wouldnt of sent... idek how u sent this msg...;
// Make Vector push entity
Vector vector = entity.getLocation().subtract(playerLocation).toVector();
final double y = vector.getY();
// If inverse, make Vector pull entity
if (inverse) vector.multiply(-1);
// If tornado, make Vector spin entity around player
if (tornado) {
final Vector perpendicular = new Vector(-vector.getZ(), 0, vector.getX());
final Vector inwardForce = vector.multiply(-0.35 / radius);
if (inverse) inwardForce.multiply(-1);
vector = perpendicular.add(inwardForce).setY(y);
}
// Set entity velocity
entity.setVelocity(vector.normalize().multiply(strength));```
just tornado
ok
make that y negative somewhere
one thing though you may want to have the strength of the rotation different from the strength of the vertical movement
but we'll see if it works first
ye it seems to be working
nice
this is a disaster, but yes its beautiful
only thing thats a bit annoying is that the blocks/entities will fall if they just get a tiny bit out of radius
would this solve that or nah? or should it be radius + 1 instead?
final Vector inwardForce = vector.multiply(-0.35 / (radius - 1));
maybe increase the radius a little bit and increase the smallConstant too
radius +1 and then idk like 0.5 smallConstant
does changing radius to radius + 1 make it so that the entities stay 1 block closer than the radius?
adding one to the radius will make it so the entities have a larger "maximum radius", you can even add more like 3-5. On the other hand, increasing the small constant shrinks down the "equilibrium radius", so entities further out get a stronger push back
So it will essentially keep the same radius but have more wiggle room. The little arrows in the picture represent force.
I have small question, is there a way to create custom skulls as in skulls from .png files within the server directory?
You can set base64 textures
that is true, but those still grab it via the database of minecraft textures
skins arent looked up by the client?
?
lemme show u the decoded base64
{"textures":{"SKIN":{"url":"http://textures.minecraft.net/texture/e8f9eef5317cf4b85127075850980f30bf1a5805a3885978a08e317cc1802ad2"}}}
I'm pretty sure headdatabase doesn't have tens of thousands of accounta
i really dont know how they do it
And what does that url return
but thats the minecraft texture
the texture
meaning i could prolly hook it up to my own cdn
but id have to check that
but every single skin file gets saved on the minecraft database somehow
Whats that string after texture/
I think this
you probably have to upload it to some online database/web server/etc
Hm
eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly9pLmltZ3VyLmNvbS9VYlRjQnd5LnBuZyJ9fX0= this would be the base64 of a skin with a different database
Yeah you could launch a webserver
i just imgur for that
i think there's also an exploit where you can "ban" players by having too many heads in a chunk or smth
probably patched though
prolly yea
Textures payload contains blocked domain: http://i.imgur.com/UbTcBwy.png
it blocks textures if its not from minecraft
Looks like you gotta change your skin a bunch of times
Well the thing is I wanna make a ingame head creator.
You can take a look at mc source code
plugin that changes your skin xD
And if there are any chances you don't have to put a url
Or I somehow have to upload a new skin to mojang.
retrieve the texture and then do it.
then cache it
Try replacing textures with
textures:[{Value:texture}]
Oh wait
Still
no the client blocks it
Yeah well hm
although
i know it spossible
https://mineskin.org does it
maybe that has a api?
I think i still have some random alt accounts somewhere
Just buy an account and make your own api
the thing is
minecraft ratelimits how fast you can change your skin.
like once a minute or so
Ill try using mineskin.
Yup
i wish minecraft would just do the texture in base64
Thank you for that very detailed and artistic diagram!!!
Would it be more optimized if I only multiplied the x and z values when getting the inward force?
Cause the y is negligible
Doesnโt matter
I need developers to my server :(i adding an plugin and when i need move it to plugin folder is dont working and when my freidn tryed is worked ๐ฆ but hes offline and busy allways ๐ฆ
in #general-plugins post the errors in the console
doesnt has error in console
I created a javascript to show the healthbar of players. But when I add it from the name of the player using Tab Plugin, it uses a lot of CPU usage from the Tab Plugin which makes the server lag. I added the refresh rate of 10000 and it fixes the problem. Is there a way ti improve this?
Don't use a javascript for it
there is this expansion https://api.extendedclip.com/expansions/healthbar/
But this isn't really #development related, moreso #placeholder-api
The problem is, there are player that exceeds 20 health. The javascript that I created is a percent health, meaning if they have 41 hearts, it will still show as 10 hearts for 100%
but will look into this expansion. Thank you
do you know any java? It has github source
Even if you don't know java, maybe #1058975345564471387 somebody could change it slightly for you
good luck ๐
I'm not familiar but I'm already doing some C# stuff. Been busy with work and family so don't really have time to work with this ๐ . The expansion works great! The only problem I have is, if the player has more than 10 hearts, it will still display it as 10 hearts. So a player with 60 hearts will still show as 10 hearts even if you already deal 30 hearts to him/her.
when i use this https://paste.helpch.at/puqopafoda.java nothing happens
make sure the event is registered
?
isnt it already registering it?
I don't know
well how do we figure that out?
Ello!
I actually mean the listener, not event obviously lol
but how would it not be
What do you want to figure out?
if the listener is registering
You just created a class, I can't tell from the given code whether you're registering a listener
Where and why. Please gimme a quick explanation.
what code do u need
the code where you#re registering listeners
like this https://paste.helpch.at/hoxadipeco.java ?
no
what should i be looking for?
so i should add a listener import to those classes?
?
did you read
so i go into my main class and paste that in?
well do what it says
Hey, my expansion is right registered but it seems like the onRequest method is never called, any idea how to fix?
My onRequest method :
@Override
public String onRequest(OfflinePlayer player, String params) {
System.out.println("onRequest");
}
I have this message that my expansion is right registered too : Successfully registered expansion: BlockParty [1.0]
is persist overridden to return true
also
you dont return a string there so it shouldnt compile. but im assuming this is just an example code and not actually yours
Yep
@Override
public boolean persist() {
return true;
}
How are you testing the placeholder
/papi parse?
Show the class and the papi parse command ig
Paste Services
When asking for help with a config/menu/code issue please use our paste bin:
(we prefer it over pastebin.com)
โข HelpChat Paste - How To Use
Yeah I just figured it out that it only listen for placeholders with my plugin name in front of it, it wasn't said on the doc
Can I listen for placeholder without my plugin name in front ?
It's the value returned by getIdentifier (or smth named like that)
Its to prevent duplicate placeholders
Tldr no you can't
... seriously
Keep in mind papi has multiple plugins using it
Not just your expansion
If there was no identifier, how would it know which expansion to use?
you don't "listen" for placeholders
they are not events
you register your own placeholder under an identifier that is called when requested
I'd call them listeners that you register it with
Just with a special identifier
Since when it says onRequest, that is called when a plugin requests the Placeholders to be parsed
IdentifiedPlaceholderTemplateResolver
A HashMap with plugin in key and String identifier in value