#help-development
1 messages · Page 1276 of 1
what do you mean by decompile?
is DamagePlugin your own?
yep
just as a quick test, on the damage plugin re-run clean then install then delete the plugin on the server and re-add it
ok sure
i think that did something cuz im getting a much longer error now, don't really got the time to check it out fully
will update u later
its weird to think that when i got rid of event driven listeners and handlers my code just from applying YAGNI shrank like 20-30%
also its way cleaner and more things are encoded in the types than in the runtime
if i need to generalize i can always just change the guts of the implementation to wrap those classes under event listeners in the futrue
like fr, code is just so easier to write when you just dont try to chase the "what if I need to do A in the future"
yea
we tend to suck at prematurely abstracting
so its (often) better to write something that works first, a solution- although it may not be correct yet it works... and then we abstract, refactor and restructure it into the shape we want
i think that's the reason why i've never finished my minecraft server
i've written core plugin of the server before trying to code something useful
yea thats fair
you cant just make a core plugin if you dont know what your server needs, sure you can predict like you would need centralized command handling abstractions etc
but still
but its like an acceptance of failure sort of,
if I were able to, I would 100% wanna shape and abstract my code into the ideal structure before getting it to work or in parallel, its just that so many times we don't know that ideal structure or that perfect shape is gna look like before we get it to work
now dont get me wrong, if I asked u to write an orm u'd probably be able to write a nice abstraction whilst writing the solution, but thats just because u've done it so many times
yea 100%
i would write orm first because i would probably do integration tests for it and splitting it from something instead of embedding it inside another class just does make sense for testing imho
yea fair, I mean thats if u do care about tests, which to many is an important aspect of their software development
i also started to adore records more, my right now golden rule is that if there's some data which can be decoupled from behaviour which needs to be public should belong in record class and if someone needs to attach some behaviour embed a reference to behaviour class like so:
public interface ChatHistory {
ChatResponse FetchResponse(ChatMessage message);
void DeleteResponses(int fromIndex);
Collection<ChatResponse> RegenerateResponses(int fromIndex, ChatMessage message);
}
public record class Chat(int id, ChatHistory history);
since ChatHistory fully encapsulates history data in this case, so its part as a value inside a record
that way you dont need to write getters for it and overall improves code readability
it seems to work well but we'll see
maybe i'll change my mind
I think what I like about records is the fact that its also guarantees transparency
I have a hard time sometimes to pick between data oriented programming and object oriented programming, whats ur take on it?
esp in Java

ok i think that worked cuz now im getting a null error becuase a variable is getting lost in transit
so thanks <3
data oriented programming is the way in the modern era
not entirely
i mean sure, by the looks of it, it seems java wants developers to be able to write code in the DOP paradigm as well
seeing as records were added
performance of a program entirely depends on how well the data is being laid out to favor cache locality
you may not directly do DO but whatever language you're using will do it under the hood anyway
im talking about data oriented programming, not data oriented design
they are two different things
enlighten me, because I don't find any difference between those two terms
data oriented programming is just applied data oriented design
yes and no
data oriented programming at its core is about principles regarding data scheming, transparency, immutability, separation of data and behavior
data oriented design is to design code with efficient usage of CPU caches for one, this regards spatial and temporal locality as u were talking about earlier, data oriented design doesn't care about immutability, separation of data and behavior etc
sure they both contrast to OOP
I think that's not a particularly useful distinction
it is
you dont regard encapsulation for example
you dont regard polymorphism for example, instead u make use of case/switch expressions
subsequently u dont get into the issues of OOP such as tight coupling, arguable and negligible performance overhead, you dont get these highly complex relationships between classes, and you dont get huge state management issues for one
b- but what about the people running our codebases on a commodore 64??? we have to maintain support.
Best I can do is 8kb of ram
well supposedly manually optimizing cache locality has its benefits if u really try to press out last "drops of performance"
Yeah it does
There’s a series of videos on YouTube about someone optimizing Mario 64
Particularly on there the shared RAM is the bottleneck, so cpu cache is even more important
yea
well RAM is slow in the grand scheme of things sadly
so itd make sense for games to make use of this optimization
@sly topaz i should ask, did I enlighten you, or does it seem like im the one living under a rock?
I was responding but I went to cook and just deleted the message lol
oh my bad, food time muy importante
but I do see your point, I'll explain myself better when I finish cooking
i may be asleep atp, but ill have a look once i wake up then ^^
i have this code to play a sound when a player joins the game, but its only doing it for said player and not for every player, how would i change it to make it for every player?
for (Player pl : Bukkit.getOnlinePlayers()) {
pl.playSound(pl)
}
I wrote that from the phone
XD
Use that
well done
for the (pl), change that to player.playSound(player.getLocation(), Sound.BLOCK_NOTE_BLOCK_PLING, 1.0f, 1.0f);?
i hate maven
gradle >>
like so?
no
learn java
why you doing pl.playSound(pl.playSound
change the player.getlocation to pl
fixed i think
still
wait fuck
bruh
imma kms
u need to play a sound to all players on the server right? @crude zephyr
yes
so basicallly pl.playSound plays a sound at a location for the player
so if u want to the play a sound to all players
u need the location of the player u r playing to sound for
so u need to supply pl.getLocation
not whatever "player" is
so many p's 
@EventHandler
public void onJoin(PlayerJoinEvent e) {
for (Player pl : Bukkit.getOnlinePlayers()) {
pl.playSound(pl.getLocation(), Sound.BLOCK_NOTE_BLOCK_PLING, 1.0F, 1.0F);
}
}
use that
does it work
yee
thanks pelowisa
yw
i do wanna add some things to it tho
what do you want to add
i need a libary of sound effects to find what i want
that should work
exactly :)
IT DOES!!!!
omg im so smart
@floral marlin this is the other plugin code i have rn but the potion effect dosent work
i think its coz we need to add a 1 tick delay
1s
one second?
go to ur main class and add this
public final class "ur main class" extends JavaPlugin {
private static main instance;
public static main plugin;
@Override
public void onEnable() {
plugin = this;
instance = this;
}
public static main getInstance() {
return instance;
}
public static main getPlugin() {
return plugin;
}
so
ASAA
why do you have two variables for the instance
i use both
one is enough
ik
like so?
change main to DreamDeath
and remove one of the variables
I believe I had shown an example of this to you before
though, at this point it is just not being familiar with the syntax, I'd recommend doing a java course if you can
im doing a c# corse rn and thats already too much 😭
i removed all "instance"
what does the inlay hint say when you hover over the red-underlined method
oh its because i have it twice
https://dev.java/learn/language-basics/ for reference
@EventHandler
public void asdasd(PlayerRespawnEvent e) {
var p = e.getPlayer();
p.sendMessage(ChatColor.LIGHT_PURPLE + "You woke up from a bad dream");
Bukkit.getScheduler().runTaskLater(main.getInstance(), () -> {
p.addPotionEffect(new PotionEffect(PotionEffectType.BLINDNESS, 200, 1));
p.addPotionEffect(new PotionEffect(PotionEffectType.NAUSEA, 200, 1));
}, 2L);
}
if the event handler is inside the main class, you don't need a singleton, you could just use this directly
the singleton will be useful if you decide to move the event handler to another class
is the event handler inside the DreamDeath class?
the event handler being the method with the @EventHandler annotation
you can use a paste service to paste big classes like that next time
?paste
i uhh dont know how
just paste the code in that page
done, then what
and then hit the save button on the top right bar
// Need to add a 1 tick delay
player.addPotionEffect((new PotionEffect(PotionEffectType.BLINDNESS, 200, 1)));
player.addPotionEffect((new PotionEffect(PotionEffectType.NAUSEA, 200, 1)));
if you need to add a tick of delay, all you have to do is use the bukkit scheduler like pelowisa has shown above
here, though they did 2 ticks instead of one
would i do
var p = e.getPlayer();
or what i originaly did
Player player = event.getPlayer();
either way is fine
main is red
main is a namespace
in this case, your class isn't called main, it is called DreamDeath
so you should replace it with that
I feel like you should learn java before this
but if i do, .getInstence() goes red
because you called it getPlugin
yes
oh okii so its done
ill test it now
fuck yeah it works
just changing the effect duration
thanks you 2
yw
now i need to work on the perms
Is there a way to not completely override another plugins command but add on to it?
I want to add a subcommand to another plugin but let it keep its own commands
Like a plugin has /cmd registered and I want to listen for that so if it's /cmd subcommand I can do something
please help chat,, i booted up my pc to write code... but i started listening to KE$HA... now i am too busy dancing to make plugins...
You can use pre process event
But if you want to actually modify the execution youll have to do some runtime manipulation
To change the tab complete of the existing command you might be able to use TabCompleteEvent
?services Discord is not the right place for this
If you wish to request or offer development/art/building/administration services, please do so at https://www.spigotmc.org/forums/services-recruitment-v2.54/
its a scam
Please do elaborate. Is it the income split ?
Or saying "not scam" :D
They arent looking for plugin development, they are asking to use your account to a platform called Upwork. They do this to create a botnet of users used to siphon or funnel money, for fraud or money laundering.
Oooh I did just assume they want dev work. Ty!
instructions unclear writing code with my feet
If it works it works
i want mutable records
without defining getters setters
but allowing to overload them
something like record but mutable
would be nice
withers are in JEP
not mutable but yea
withers
such thing would be so cool
public struct Player(final int id, string username, ...) {
@Override
public void username(string username) {
// code
this.username = username;
}
}
ant then just
player.username("Dovias");
mutable records 💀
mutability truely is the worst
final int id would make getter only

how
because now every existing java source file that defines a record has its components be mutable, needing to add final to make it immutable
well i propose new keyword struct
with new object type
so it can maintain compatibility with records
you should reach out brian goetz about your ideas, i'm sure he's gonna receive them with great respect
😭
whats the point though
less code
ensures contract
in a strict way
if i see final i know its immutable
if it doenst have it must be mutable
I mean why not use a class
why have it mutable
mutable by default is a stupid default
too bad thats what java already is xD
yep
why doesn't java do some funky inheritance shit to make List inherit ImmutableList
but the point of records is that they are immutable anyway
for the same reason you use record. because that involves code generation and doesnt ensure that programmers generates getters in correct way
so we'd have kotlin's concept with a weird naming scheme
there is no ImmutableList in java
explicit immutability is evil
:(
that is not why one uses or should use records but sure
they have immutable lists just not explicitly
well if its a property anyone wants to edit, why is it not public
if that's what you use it for, go for it
I'm sure he can achieve what he wants with an annotation processor
there is lombok... or kotlin 🙂↕️
annotation metaprogramming my behated
Immutables is love
insert rust here
i recently started experimenting with putting immutable data like getters in records and then if something needs to be mutated i create new interface and for it implementing class which acts as a value class
public record Player(UUID id, Username username, ...);
public interface Username {
string fetch();
void change(string username);
}
public class MojangAuthUsername : Username {
private MojangAuthUsername(UUID playerId) { ... }
@Override
public void fetch() { ... }
@Override
public void change(string username) { ... }
public MojangAuthUsername create(UUID playerId) { ... }
}
instead of making everything an interface i put only encapsulated data behaviour inside interfaces, that way you only need to unit test only the behaviour and you can leave getters alone since that's enforced by java spec.
also it allows you to construct Player objects easily without having to call factory methods etc.
or just construct usernames without player objects
seems to work well for now, but my mind is always changing so idk 😄
as lynx said, Java will eventually (likely) add withers
sounds complicated
so reconstructing a new record type instance based on an existing one will be less verbose
those withers only destroy records, not create new ones
dovidas, records are also good because of their strictness, making them mutable is meh as they lose the signature of being transparent immutable data carriers- and that signature means a lot, to both programmers but also the jvm seeing as it can make aggressive assumptions about records to optimize things in certain ways like escape analysis n id guess inlining?
that strictness allows me to build code with interfaces where i only really need them, thus i can mock only parts which are needed to mocked and that what i love the most about them
I actually thought that's what Conclube was referring to
I was really confused
in the code i've provided i only need to unit test Username interface implementations
i dont need to test Player since its immutable and its guaranteed by java spec to be like that
the only con is that is that Player object can now only be loaded eagerly
but i think about that as more as a win
i prefer eager loading than implicit lazy loading
code should be explicit what it does when performance is critical
you shouldnt lazy load IO operations inside getters
i mean yea 100%
if you want that use a class with an interface and methods
jit escape analysis is pitiful
i think they completely gave up on it and are putting their eggs in the value-based classes basket now
minecraft already has the wither?
💀
rust's deep immutability is so nice
what to do i had some code in my plugin that allows me to run commands remotely , now the server owning is threatning to sue me
Now why did you put that in there
because i was working for free
so i compesated by giving me stuff in the server for free
So you just added a backdoor to give yourself stuff 💀
I mean you are making it sound serious , it was just a playful party trick
but he cant sue me right? he is bluffing
you can consult me if you want
👀 nice timing
are you a lawyer?
yes
actually they can sue you either through breach of contract or mal intent , if they have proof of what you did
wtf , there was no contract i worked for free
it does not matter , you gave yourself unauthrized access , its a civil ground
cant i sue them for child labour , unfair wages or something
yah its actually a crinimal offence
come to dm i will explain
Get yourself an actual lawyer if you have legal questions
he said he is a lawyer
and you believe that?
he can speak legal language
ignore them , you just do as I say you will be safe , and you may even get compesation for your work come to dm
how do we delete messages in console?
i found a way i can just fill with black spaces or random commands that look normal as there is a cutoff after certain number of lines , and i can use a python script to edit hte log files
omg i can get out of it
You're just making it worse for yourself
if they have no evidence in logs what will they do
You do realize this is a public channel right
You've already admitted to what you've done
i will sue you @dark arrow
the owner has not joined this channel
why
idk
i am kinda pseudoannonymous i just hope he is not smart enough to get my ip from the server
or maybe i will delete it too
It's impossible to open a custom tile inventory without the bottom (HumanEntity's) inventory right?
you can use resource packs to visibly hide it, but it can't not be included in the actual opened menu
how can I disable the hitbox of an entity? (such that clicking on it will pass it by and click the entity behing it)
its kinda dumb i tried it to make a teammate fighting game , i put a armor stand in teammate so if you hit your teamate it gets cancelled but if a enemy is very close to teammate the armor stand is still getting hit so you can calculate and give hit to the opponent but it is kinda buggy
were you doing it on commands? xd
I think there is a friendly fire option
yes but if you hit someand the person registers the hit , then the person standing just behind or close to him wont get hit
plugins are the answer
i did it in plugin , but the problem with freindlyfire is that either the opponent get hit or the teammate
EntityDamageByEntityEvent
Just wanted to point out that Kotlin's List interface is not immutable, it's read-only, the underlying implementation can be mutable
Actual immutable lists are provided by a separate library and are explicit https://github.com/Kotlin/kotlinx.collections.immutable
Still a better structure than java's
Hey if I put a plugin in softdepend will it always load before my plugin?
If not, will its classes be available via reflection at least at runtime when my plugin is loading?
it will load before your plugin if it is present and there are no circular dependencies
including softdepend ?
yes
1.8 was also forever ago
Alright great, asking cause I want to refactor some really bad code I have for detecting VIa support across platforms to just do a class load via reflection and store it in a private static final variable that will get inlined so we only check once
Two forevers ago
is the golden rule of mocking is that you should mock objects which you cannot write unit tests for? I mean if you written unit test for it, what's the point of mocking it by making your tests brittle
you cant just mock everything away, as that would require defining interfaces all over for no reason
mocks also allow you to create nonstandard and broken behavior for e.g. parameters of the unit-tested class to verify that the class handles any errors in other classes gracefully
hi
im getting: Could not decrypt data from /45.33.29.47:57382. Make sure the public key on the list is correct. i have the port setup right and everything correct and the right public key.
For one, in today’s world, mocking does not require making something an interface. We have stuff like mockito, and powermocks.
if your tests become brittle/fragile, it may be a sign that you’re running into the fragile test problem, which on its own doesn’t necessarily correlate to mocking
but let’s say you have some unit that somewhere uses a database dependency, you obviously don’t wanna boot up the database everytime you run that unit test, because you’re actually not testing the database, but rather you’re testing the unit which depends on the database programming interface code of urs- therefore you likely wanna mock that dependency, which is a way of saying “hey, given that whatever this unit depends on doesn’t fail, does this unit also not fail?”, its a way of isolating ur proofs put simply
edit: i dont think there exists a golden rule, but if one were to estimate itd be- mock what u dont have authorship over
^ I should say mocking is something u often do in unit testing, but less so in for example integration, regression or system tests
public key?
are you using velocity
ok, hope the server owner is successful 👍
im using bungeecord
Because 1.19.4 is when chat signing/reporting got added to the game.
How do I send a fetch request to a http server hosted with a bukkit plugin?
my server's ip looks something like 15.xx.xxx.xxx:25600
I can't chain the ports
HttpServer.create(new InetSocketAddress(8000), 0);```
If you just want to send a request use Apache Http
I want to recieve requests
that is not sending a fetch request then
you have a few options. I'd recommend Javalin
send a fetch request from an external server to mine
I can just do fetch("localhost:8000") when i'm hosting a local bukkit server
and that works
but on an actual server I dont know what to send to
you're just going to have to expose the 8000 port and send it to the public ip
I'd prefer something that doesn't rely on a dependency
how do I do that?
are you self hosting?
nope, using a server host
You're going to have to ask them to expose the port for you
I can't do it myself at all?
No, if you want to access it externally that is up to the network administrator
I'll just make it send periodic requests and get the data through responses then ig
Or use a message broker like redis
?services
If you wish to request or offer development/art/building/administration services, please do so at https://www.spigotmc.org/forums/services-recruitment-v2.54/
do we need to use nms package to create working npc
If you don't want to use a library, yes
which library?
something like Citizens or zNPC
i will check it out thanks
i think citizens is more customizable while znpc is more easy to use
how ot give players powedered snow frostbite effect without poweder snow
player.setfreezeticks
any alternatives to citizenapi?
lib's disguises
i dont think it allows us to change their ai or make workign npc
it handles mobs, you can do whatever you want with it afterwards
if you want to handle their AI then use MobChipLite
does bungee has any eqvivalent of https://github.com/PaperMC/Velocity/blob/dev/3.0.0/proxy/src/main/java/com/velocitypowered/proxy/crypto/IdentifiedKeyImpl.java
how to create interactive entity with scale of 0.5block with a plugin ?
world#spawn & Interaction#setInteractionHeigh &
setInteractionWidth
it's doesn't work for me
Show your code
wait, I put back a lib that has nothing to do with my project, and now it works, well thanks anyway, I'll get back to you if I have a problem
Perhaps this isn't the right place to ask - though a development question nonetheless... I https://github.com/SpigotMC/XenforoResourceManagerAPI in regards to the site API and just wanted to check that it's still the latest and there's not other docs somewhere else? I'm looking to search for resources by name, meaning I won't have their ID already. If this is not possible, no worries, but figured I'd ask.
is there a way to make a minecart derail
you might want to look at spiget https://spiget.org/
Thanks for sending me this - will look into it for sure 🙂
look in here
https://github.com/SpigotMC/BungeeCord/blob/master/proxy/src/main/java/net/md_5/bungee/EncryptionUtil.java
Particle.DustOptions dustOptions = new Particle.DustOptions(Color.fromRGB(255, 0, 0), 1.5f);
location.getWorld().spawnParticle(Particle.REDSTONE, location, 1, 0, 0, 0, 0, dustOptions);
java: cannot find symbol
symbol: variable REDSTONE
location: class org.bukkit.Particle
:/
using 1.21 spigot (in plugin.yml i have apiversion 1.20)
That would be correct, there is no particle named REDSTONE
Probably looking for DUST
u know Color.RED exists.. smh
Anyone know how to do ranks based on how much a player as spent on buying individual perks/kits etc...
EG player Buys 2 Legendary Keys for $12,
Rank 1: $1-$20 Donated
Rank 2:$21-50 Donated
Rank 3: $51-100 Donated
I want to make it so when a player buys 2 legendary keys they also get Rank 1, it needs to be able to scale into the rest of the ranks as well, so if for example the player was then to go buy a kit for $10 Their total donated would be $22. So the Store would also push them up a Donator Tier into Rank 2.
Or if anyone knows someone who makes custom plugins
Seems like a good beginner plugin with a hook into something like luck perms or groupmanager
Pretty sure that's just a feature of tebex. You can setup something like purchase limits or goals that execute commands per individual that just run a simple rank promote command.
I've legit made a plugin for this before
well then show me
it’s not, I’ve asked like 6 times to tebex support/different people from tebex staff
it would take tebex api player data basically yeah
you gotta manually track it
tebex api doesn't really give pricing info last time I tried
Wdym pricing info?
how much they spent
Hmm I’m pretty sure it does
ah rest
I mean but that’s just the default thing, not what I’m looking for
Or how did you implement it?
each product runs a command with its corresponding price and player
increment a running total for that player
And add a group based on that total
You can make the command query the API instead but currency conversion rates etc might influence your results
🤔
could you explain it to like a 3iq
person?
I don't think it gets any easier
legit just /tebexadd ImIllusion 12.99
then we just have a lil db saying "ImIllusion has spent 69.42$"
and based on that you assign a group
Oh like a database
takes maybe 20 minutes to write
and then it gets info from that database
im trying to look at their API doc to see if u can get transaction data and theres just like fucking nothing
am i stupid as shit or does their documentation suck ass
no yeah im looking for endpoints
i just dont see anything
i see stuff about creating a listing and getting store info
Like in 2020 I bought a server setup because it had that plugin and when I looked into the code it looked playerdata from tebex api so that’s why I’m like 100% sure there’s a way
Sadly Idk where that setup is and less that .jar
ah i was looking at wrong api doc
eh multi currency whatevers can influence your result
if you don't care about it then yeah just listen to buycraft's event and fire a post request
Yeah I don’t rlly mind about it tbh
hi
oh my god browsing Stash on mobile is an ass sucking experience
why cant i SCROLLLLL
yeah but its like 50/50 on if it works and 10/90 on if it lets u scroll all the way or not
never realized that simple "foo" string type is actually a valid json document
without any object or array
i guess that make sense
hey everyone so sorry to ask is there anyone here familair with floodgate? im trying to make a plugin that when you right click a stick it sends a form to a bedrock player i think im almost there but im having some dependency issues and it may be bc i dont fully understand the api, im hoping someone might be willing to take a look at the source and let me know what im doing wrong
yeah I've worked w it
any chance youd be willing to take a quick lok at my pom.xml
im very new to trying to do plugins in general but i have to make this work for my players
Send it through
might as well send this too bc im sure its not perfect
the idea here is to combine the forms advanced teleport provides with /tpa and /homes so that controller players dont have to type the commands
so which one is not resolving correctly?
let me compile again real quick
ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.10.1:compile (default-compile) on project StickMenu: Compilation failure: Compilation failure:
[ERROR] /root/test1/src/main/java/dev/yourname/stickmenu/StickMenu.java:[14,42] package org.geysermc.cumulus.form.response does not exist
also i dont think
<snapshots><enabled>true</enabled></snapshots>
<releases><enabled>false</enabled></releases>``` is necessary
its org.geysermc.cumulus thas not working
also docs say use https://repo.opencollab.dev/main/. It contains both snapshots and releases
am i using the wrong version of cumulus
Could not resolve dependencies for project dev.yourname:StickMenu🫙1.0: Could not find artifact org.geysermc.cumulus:cumulus-form🫙1.1.2 in geysermc (https://repo.opencollab.dev/main/) -> [Help 1]
lol discord and their emojis lol
i have to go to bed now anyway ill keep reading thru the docs tmmr
i know its something super simple
Public Maven repository for projects under the Open Collaboration umbrella
cumulus-form doesn't exist
in either snapshots or releases
Anyone notice that Firefox is really really shit lately?
I literally cannot view JavaDocs for Spigot or Paper... I open the "Materials" enum, and scroll, after "AXOLOTL_SPAWN_EGG", the whole page is white, and my CPU usage goes to 93% 😭
Happens on my laptop, and Desktop
is there like a better way to locally view javadocs? I know you can download documentation in intelliJ, but is there any explorer / visualizer app?
Is there a way to combine datapack and custom world generation? I want to use datapack world generation for the majority of the world, but I will require a custom ChunkGenerator for the types of generation I need for very specific regions of the world.
So I'd ideally be able to use a ChunkGenerator and do something like
@Override
public void generateSurface(@NotNull WorldInfo worldInfo, @NotNull Random random, int chunkX, int chunkZ, @NotNull ChunkGenerator.ChunkData chunkData) {
random.setSeed(chunkX * 4141L + chunkZ * -12412L + worldInfo.getSeed());
if (wallNoiseGenerator == null) {
wallNoiseGenerator = new SimplexNoiseGenerator(random);
floorNoiseGenerator = new SimplexNoiseGenerator(random);
overhangNoiseGenerator = new SimplexNoiseGenerator(random);
}
int baseX = chunkX * 16;
int baseZ = chunkZ * 16;
int yMin = worldInfo.getMinHeight();
for (int x = 0; x < 16; x++) {
for (int z = 0; z < 16; z++) {
if(needsCustomGenerator(baseX+x, baseZ+z)) {
// use coded generation
}
else {
// use datapack generation
}
}
}
}
Look at the shouldXXXX methods in ChunkGenerator
so im trying to use a jar as a dependency and not have it shaded in maven, but when i unzip the packaged jar it appears to still be shaded. here my pom.xml
?paste
is freeminecraftmodels your jar?
yes
and if you use intellij check (File -> Project Structure -> Artifacts) (it can do things on its own without maven)
I mean did you develop it or?
wdym
the freeminecraftmodels can be a fat jar
try inspecting the jar to see if it has bundled dependencies.
if not i got no idea.
okay. interesting
try deleting that and create the jar again. sometimes intellij can make artifacts outside of maven (cause why not lol)
what do i delete sorry?
try setting it up to not create artifacts and create the artifacts with maven only
everything
that is there.
under imortalsnail_maven.jar
all objects
then create the jar again. using maven
i just deleted then remade the artifact
okay.
so you understand. there are 2 ways to make an artifact
maven way: using maven command
intellij way: using intellij buttons which uses a configuration from intellij
in most cases intellij does things different than maven. so the things are not what you expect.
that's why I meant create artifacts only with maven.
i see
oh my days you fixed it
i will love you forever
i will credit you in my plugin
i will forever be in your debt
haha. no my friend. come dm
Quick question, are elytras like tridents on how you can’t change the item when thrown? So for instance when you wear the elytra it will show as default one? As when you throw a custom trident model it shows up at then normal trident
what is net.md_5.bungee.entitymap?
I am implementing velocity modern forwarding in bungee
and my client being > 1.20.1 works fine
but any client less than 1.20.2 gets stuck on loading world
when i am on 1.20.2 it doesn't rewrite the packet but on any version less than 1.20.2 gets stuck on rewriting, downstream bridge
my server is running 1.21
well. that might be a problem
velocity modern forwarding = new
bungeecord = old
old + new = errors
just don't. u are better without it man. lol
chose one and stick with it.
can i add a cooldown to an item similar to that of an enderpearl? iirc its possible using datapacks nowadays
yes
declaration: package: org.bukkit.inventory.meta, interface: ItemMeta
or https://hub.spigotmc.org/javadocs/spigot/org/bukkit/entity/HumanEntity.html#setCooldown(org.bukkit.inventory.ItemStack,int) depending on your needs
declaration: package: org.bukkit.entity, interface: HumanEntity
Object craftPlayer = craftPlayerClass.cast(player);
Object targetPlayer = craftPlayerClass.cast(target);
Method getHandleMethod = craftPlayerClass.getMethod("getHandle");
Object targetEntity = getHandleMethod.invoke(targetPlayer);
Class<?> entityClass = Class.forName("net.minecraft.world.entity.player.Player");
Method getEntityDataMethod = entityClass.getMethod("getEntityData");
Object data = getEntityDataMethod.invoke(targetEntity);```
I'm using reflection to fix the nms issue but it showing that I cannot found any of these or class ?
net.minecraft.world.entity.player.Player would be obfuscated on the server, no ?
it does got obfuscated ?
I'm talking about the class, idk if the string would be obfuscated to match the class.
I dunno enough about this, prob should leave it to someone else actually sorry :D
use getClass on (the bukkit interface) Player
there are longer class function not just only these :l
but just only these doesn't work
what
is there a difference between:
ItemStack#addEnchantment
and
ItemStack#getItemMeta#addEnchant
ngl but that sentence is obfuscated
no
why are there 2 ways to achieve the same thing?
usually because of backwards compatibility and or convenience
hmm. sure
that sure was personal ngl
Thanks
One is a paper method
iirc on paper at least addEnchantment avoids an intermediate creation of itemmeta as it just edits the item component directly
beyond that not much in the way of difference (just remember to do setItemMeta) with the meta afterward if you use that
I think addEnchantment directly is more convenient so I am using it
I was trying to check whether the impl was actually different, but GitHub is working wonders since yesterday
Okay vcs is right, that was the difference I misremembered
On spigot it is just a convenience method, on paper it might also help performance
Usage: !verify <forums username>
wait. so i am not the only one who can't see the page?
like render the page properly?
lol
what's the 1.21.5 equivalent of this? https://mappings.dev/1.10/net/minecraft/server/v1_10_R1/ChunkProviderServer.html
this is the code i'm trying to port over:
net.minecraft.server.v1_10_R1.WorldServer handle = ((CraftWorld) w).getHandle();
try {
handle.save(true, null);
handle.saveLevel();
info("Queued " + handle.getChunkProviderServer().unloadQueue.size() + " chunks for unloading");
handle.getChunkProviderServer().unloadChunks();
} catch (ExceptionWorldConflict ex) {
// ...
}
Good sirs, is there any way to get villager data of when they last saw an iron golem spawn, and last slept?
Trying to simulate iron golem spawning in a custom plugin
i guessed .save(true, null) would now be .a(null, true, false)
saveLevel i couldn't find
that is a very specific thing. don't know if it's even possible
rip
Doesn't look like there's API for that
You might need to use nms to access that information
maybe i can just```java
WorldServer handle = ((CraftWorld) w).getHandle();
w.save();
handle.m().purgeUnload();
Why are you trying to force it to unload
no idea
this is a 1.10 plugin i'm trying to port to 1.21.5
consider looking at what the code does and why
too complex for my simple brain
fellas how can I check a block is a type of bed without having to check for each type of bed material
Isn’t there a tag for beds
Block data instance of bed
Idk why nms is needed to unload a world, just use the api
sounds like base for a PR to me ;)
me, addig documentation on how to use a command
wanted to hide the racial slurs he had previously spammed
sadly doesnt clear it from memory
ALT F4 does the trick
Ehh?
omg i didnt realize what you sent actually crashes the game... i thought it was just another bind to clear chat
my joke is now obsolete
yes
a trick as old as time
instructions unclear, my singleplayer world is running at 2 TPS and i have 35 seconds of latency
@ choco ban
Nah GitHub has been working like shit since yesterday
I think it has to do with old versions where it didnt unload the worlds completely and caused memory leaks? Dont remember exactly.
alright. so I'm not alone. thanks.
What
Why could that happen?
if I remember right in the older versions the way it was implemented it would hold a reference to the world somewhere even though it was no longer loaded. can't really remember specifically. Also don't remember if this only applied to the base world or additional worlds
if the reference is never removed this is essentially a memory leak even if its small
anyways, I just recall that if you wanted to avoid such things in the old versions you needed to use NMS for unloading
wouldn't be surprised if you manage to find an old forum post on the craftbukkit forums about it lol
what would be the simplest way to add player nicknames only to chat?
cancel AsyncPlayerChatEvent and broadcastMessage with my own message using the events message format?
Why not just modify the message in the event?
because im modifying the username part
yee
Isn’t that only used in chat though
is it not used for tablist and/or nametags?
Not according to the docs
“Only in chat and places defined by other plugins”
i was under the assumption "display" included anywhere it could be seen
oh thats getCustomName i guess
Nah that doesn’t do anything for players iirc
i think that affects nametag (besides for Players)
Tab list is controlled by setPlayerListName
shh i was getting to that
F
yeah get/setDisplayName will probably do all i need then lol
ill test it later
is there any plugin makers here that is intrested to making a gamemode with me i am a 3d modelist dm if intrested and should be able to vc too and 13 or above
is it possible to hide the player icon? i guess you have to do that with nms?
No that's drawn on the client with no server-sided control
You can create a fake player and copy their name over. But the best you can get is a flat colour.
is there something like this for gradle? https://www.spigotmc.org/wiki/intellij-debug-your-plugin/
gradle is the build system, it doesn't handle debugging
at most what you can do is create a task which runs a JVM with debugging capabilities enabled
for that, you can use jpenilla's run-task
to run Spigot with it you have to enable legacy plugin loading as well as setting the server jar file to a spigot jar
Thanks
i have followed the steps detailed here under method 3
however when i rebuild my code (using either gradle or intellij) and then use the intellij hotswap option, it doesn't actually hotswap
what do you mean by that
What versions are we talking about?
way older versions
like 1.5 to 1.8 not entirely sure how far from there after that as I haven't really kept up with patches to the implementation
Kk
nothing changes
plugins {
id("java")
id("xyz.jpenilla.run-paper") version "2.3.1"
id("xyz.jpenilla.resource-factory-bukkit-convention") version "1.2.0"
}
group = "me.javierflores"
version = "0.0.1"
val minecraft_version: String by project // Has to be set in gradle.properties file
repositories {
mavenCentral()
maven("https://hub.spigotmc.org/nexus/content/repositories/snapshots/")
}
dependencies {
implementation("org.spigotmc:spigot-api:$minecraft_version-R0.1-SNAPSHOT")
}
bukkitPluginYaml {
main = "me.javierflores.st.SpigotTesting"
apiVersion = minecraft_version
}
tasks {
runServer {
minecraftVersion(minecraft_version)
legacyPluginLoading()
serverJar(File("../Spigot-Sources/spigot-$minecraft_version.jar"))
jvmArgs("-Dcom.mojang.eula.agree=true",
"-XX:+AllowEnhancedClassRedefinition" /* Allows enhanced hotswapping */)
debugOptions {
enabled = true
suspend = false
port = 5005
}
javaLauncher.set(javaToolchains.launcherFor {
languageVersion.set(JavaLanguageVersion.of(21))
vendor.set(JvmVendorSpec.JETBRAINS)
})
}
}
this is how I setup runTask in a spigot plugin myself
and then how do you hotswap?
but does it tell you that it hotswapped properly?
just clicking the hotswap button when it pops up in IntelliJ
make sure you are hotswapping an actually accessible path
it is no use to change something in the onEnable method since that won't be called again till you restart the server
you need to change something that is within the normal server lifecycle for it to work
Is there a player disconnect packet or does velocity simply close the connection when moving players?
sounds like a question to ask in papers server
how hard is it to do custom mob spawing in a sense to when a chunk spawns it spawns apropiate mobs
Does anyone know anything about protocol stuff like packetevents or protocollib? Im getting a network protocol error and im stumped on what it means
share the error
well, at least at minimum you know its an error
Invalid entity data item type for field 16 on entity gqn['remai078'/7953, l='ClientLevel', x=-20.00, y=59.00, z=-24.00]: old=0(class java.lang.Integer), new=0(class java.lang.Byte)
I want to share that this happened randomly
and what code did you use to trigger that
gqn is the obscuated name for net.minecraft.client.player.RemotePlayer, so I assume you're creating fake players?
I am using libs disguises, so idk if that could be what is using that
if you're using libs disguises and it is throwing that then it is probably just the fact that it is trying to apply an entity data packet which doesn't apply for the disguised entity
you could just ignore that error honestly
what entity are you disguising and to what?
I have my own pvp minigame that disguises players as mobs with abilities
These kinds of disconnects have been happening since I updated it to 1.21 and it happens so randomly and infrequent that I feel like it’s impossible to fix
this typically happens when you use a plugin that doesn't match the version of server it is intended for
or when you use the incorrect version of protocollib
from which version did you upgrade to?
I am pretty sure libs disguises uses packetevents now instead of protocollib
My own plugin was remade from scratch to work on 1.21
Everything is as updated as can be and on 1.21.5
Do I require to specify a specific api version in plugin.yml for paper? or is 1.21.5 sufficient?
it might just be a bug in libs's disguises honestly, but it should be solveable, you just have to make it stop sending entity metadata packets which aren't applicable to the disguised entity
still have to ensure that you have the correct version of packetevents and that both plugins are for the intended version of mc you are running
PacketEvents and LibsDisguises both work on the latest version as far as i know
could be, but highly doubt it. This happens when you don't update the plugins before updating your world and then it saves the wrong data into the world
ok? not sure what that has to do with saving data
Unless you are asking me to physically go into every world that makes a copy to make sure it's updated for the latest version
it shouldn't be the case here, as they're disguising players
unless it happens to try save the entity data while the player is disguised and the client gets confused somehow, I don't know
I am not experienced enough to make my own disguise system like libsdisguises does, thats why I'm using that instead
I do notice that usually the same players get disconnected
besides, if it were a world save issue, it'd just throw an exception on the server and not disconnect the player
I personally haven't been disconnected with that for multiple weeks, but some people have it way more often so it could be client related or lag or idk
yeah something like this, the server can't be out of the loop 100% of the time and sometimes it gets let in on the data and sometimes that data isn't real data.
it depends
Usually there is just some kind of desync between client and server for 1 specific player
Because when this happens only 1 person gets disconnected instead of everyone in that world
Its just really weird man
Can anyone help me put Hex Colors in my scoreboard?
let me try reproduce the issue
what have you tried
unfortunately if it is corrupted world data you will either need to remake the world or delete the affected chunks
ChatColors.of()
I do have to note that most worlds / maps that I use for my game are originally 1.8 worlds, but I converted them to 1.21.4 by opening them in singleplayer (they are void worlds)
But I really dont know how much difference this makes
I asked this in lib's support discord too, maybe they know something
so here is an example how you can get this to happen, lets say someone is disguised as an entity and the world saves, now that entity is saved in a particular chunk even though its a fake entity but the server does not know this. Normally this is not an issue because when the chunk loads again the entity should kind of disappear unless the player returns to the chunk that was disguised and the plugin decides to try handling it. But lets say you disconnected and then updated everything except the chunk. Now the plugin is trying to handle old data with new format
you can just run a server with --forceUpgrade or whatever to upgrade them from the server, should only need to be done once
hence the integer to byte above
I have to tell you that all worlds on my server have autosave turned off
And all worlds that people "play" on are copies of a template
saving runs when you shutdown
They get unloaded and removed when the server stops
I mean, the entity doesn't exist on the server so it shouldn't try to save it
technically it does
the player exists on the server, the entity is just a projection on the client
Arent the disguises purely client side
they are, for lib's disguises anyway
I dont think the server itself has any cause on this
it does
It feels like the client so the game itself just doesnt know what to do sometimes
I will just go to bed now, have fun 🙂
I dont know if this issue was there when libs was still using protocollib
I strongly believe it is just a lib's disguises bug, I'll give my hunch a go and if it doesn't reproduce it I'll try what frost mentioned
But it could very well be a packetevents problem
it is more likely that something got messed up in the migration from plib to packet events, but packetevents by itself shouldn't cause issues
it is simply bad data, it probably would go away if you removed the plugins and just loaded the chunks and let them save
server these days is pretty good at pruning
if the worlds that players are on are never saved and are merely always copies that get loaded from a template
that means it is the template itself that has the problem
But I converted all of these worlds in singleplayer vanilla from 1.8 to 1.21.4
How would I remove the data
I got this response from libs:
So it's a race condition where the packet is being modified before the disguise packet is been processed
So it's modified for a player disguise when the player disguise packet hasn't been sent yet
Why not just make a new voidworld?
My plugin changes a disguise's appearance or pose sometimes so it's very likely that it gets modified while someone has lag
Hello, how can I create a custom entity with a custom texture in 1.21.5 ?
you don't
you can retexture existing entities
you can also use display entities but yea
that would be very tricky and laggy ?
it is very tricky, not necessarily laggy though
people have done crazy stuff with display entities
are there any github repo with custom mobs ?
One big item display
plus some mob for hitbox
that's a good idea
okay thanks !
guys if you want to develop a territory system alongside a gang war system how would you approach it?
it gets quite messy tbf
like
whats the best way to implement a war system which has a few rounds and you being able to replace the people in the war if you are the gang leader
need second opinion
the territory system is simple but i dont know whats the best way to implement the war system🤔
round object
containing a round player container
state machine for round management
action queue that gets processed when changing states
Im just doing this so i can get the paste link so please ignore me mods and others
?paste
maybe its not like plugin development question, but how i can change arguments name from default? Like not to change it manually allways when im importing this method (like commandSender to sender)
The simplest way it to implement your own wrapper Interface
how does the server know it should load your plugin though
you cant, just retype it or use the existing name
whats wrong with the name it gives you
because when i just run debug the server doesn't even have the plugin on it
it tries to load any jar in the plugin folder
ah, so i have to place the built jar into the plugins folder and only then i can hotswap?
yeah im stupid
thanks for the help!!!
it works now
Don’t hotswap
i just press the button intellij gives me
that pops up
that works
Don’t drag the JAR like that, that’s not hot swapping but just very dangerous
im not
Yes that is fine
If you just press the button with the bug
And says “reload code” right?
Or something like that
Artifacts are not hotswapping, and reload is not the best idea
i dont like this strings for example, args is better cuz it have meaning for me arguments yk
where did i say im replacing the artifact
what hotswapping does is replacing the bytecode directly by sending it over the wire to the and replacing the respective classes in the server
so, no you don't have to place anything, though you already figured that out
you may also want to use HotswapAgent if the anoymous class ordering becomes an issue at some point, they got a plugin to fix that allegedly
Ah, still dumb
also make sure to run your server with Jetbrains Runtime so that enhanced class redefinition is available
Hey I wanna make a anti chest esp plugin since i didnt find any, how can i optimize it more? it causes massive lags.. https://paste.md-5.net/ohijekosiv.java
Use Orebfuscator
already tried it doesnt help against chest esp
for lag and optimization related help, always include a spark profile
well in this case it's pretty obvious why it is lagging anyway
yeah its because its always looping
more like the scope is too big
what?
listen to when the player moves from one chunk section to another and obfuscate/unobfuscate the tiles in the adjacent sections accordingly
you are checking distance of every tile entity in every loaded chunk in every world
yeah how would it be better? like idk
by not doing that
like vcs2 described
you may also want to use distanceSquared since that's more optimal
just used it i have 5fps now because of it and it still shows the chests xD
okay i will try it
so i should use playermove event and not use it on enable?
you can use the player move event or if you really want to make it fast then you can just listen to the chunk data packet and modify it before sending it to the player
u mean the map chunk from protocollib would work too?
That code is easily bypassed
How do chunk esp hacks work
I had assumed it just scanned the chunk data for tule entities
It does
Does the server send an entity spawn packet for tiles too?
Why so
because its causing laggs i got told xD
It all depends on how you implement it
If you use it wrongly, yes
already tried it doesnt block the tiles i just can spawn fake ones
and did you configure it to block them
its by default in the list
What I would do is modify the map chunk packet so all tiles are faked by default, except maybe the ones that are going to be near the player at the moment of replacing them. Then just send the real tile entity as the player gets close enough
thats what i did but the problem is i implemented it so bad its causing lags and i dont know any more efficient way
Yes
The map chunk packet probably provides the tile entity data too
Well, as long as it is sent to the player accordingly
i will try that rq
To avoid recalculating the fake entities every time, also introduce a cache so that players don’t constantly recalculate far away chunks
But get it working without the cache first
Modifying the chunk is quite difficult and I wouldn't recommend it if you're now to packets
Which is why I recommend Orebfuscator which does it for you
dude did u try orebfuscator urself or u just tell me to use it 100 times xD
Yeah I've used it many times
It's also the most used solution for antixray and esp cheats
It's baked in to Paper as well
@Override
public void onEnable() {
ProtocolManager manager = ProtocolLibrary.getProtocolManager();
manager.addPacketListener(new PacketAdapter(this, PacketType.Play.Server.MAP_CHUNK) {
public void onPacketSending(PacketEvent event) {
Player player = event.getPlayer();
PacketContainer packet = event.getPacket();
int chunkX = packet.getIntegers().read(0);
int chunkZ = packet.getIntegers().read(1);
World world = player.getWorld();
Chunk chunk = world.getChunkAt(chunkX, chunkZ);
for (BlockState state: chunk.getTileEntities()) {
Location loc = state.getLocation();
Material type = state.getBlock().getType();
if (type != Material.CHEST && type != Material.TRAPPED_CHEST
&& type != Material.SHULKER_BOX && type != Material.BARREL
&& type != Material.ENDER_CHEST) continue;
if (player.getLocation().distanceSquared(loc) > 100) {
falscherBlock(player, loc, Material.BARRIER);
}else{
echterBlock(player, loc);
}
}
}
});
}
thats how i did it now i still can see everything
You're not modifying the chunk packet
and you're sending the block change to early instead
here i am changing them aint I ?
private void falscherBlock(Player player, Location loc, Material fakeType) {
ProtocolManager manager = ProtocolLibrary.getProtocolManager();
PacketContainer packet = manager.createPacket(PacketType.Play.Server.BLOCK_CHANGE);
packet.getBlockPositionModifier().write(0, new BlockPosition(loc.getBlockX(), loc.getBlockY(), loc.getBlockZ()));
WrappedBlockData wrappedData = WrappedBlockData.createData(fakeType);
packet.getBlockData().write(0, wrappedData);
manager.sendServerPacket(player, packet);
}
private void echterBlock(Player player, Location loc) {
ProtocolManager manager = ProtocolLibrary.getProtocolManager();
PacketContainer packet = manager.createPacket(PacketType.Play.Server.BLOCK_CHANGE);
packet.getBlockPositionModifier().write(0, new BlockPosition(loc.getBlockX(), loc.getBlockY(), loc.getBlockZ()));
WrappedBlockData realData = WrappedBlockData.createData(loc.getBlock().getBlockData());
StructureModifier<WrappedBlockData> write = packet.getBlockData().write(0, realData);
manager.sendServerPacket(player, packet);
oh man
but i cant send also packettype.play.server.map_chunk at the falscherblock event?
as I said it's not easy to modify the chunk packet
I do not recommend it for a beginner
well
can i set like 2 hunger bars?
No but what do you want to do
Maybe we can figure out a solution that can replicate it
like make something like a lifesteal with the hunger or stuff like that
just curious
What’s life steal with the hunger
like you know the lifesteal with the hearts? i was curious if there is a way to make something like that but with the hunger
yeah but you can't have more than 1 hunger bar
Yes you can
But you can’t have more than 1 hunger bar like butter said
I’d recommend using the action bar
so u mean only 1 row or i can have more row?
you can emulate it
Hey i need recomendations for a gui library
Depends on your needs
TriumphGUI is a pretty popular minimalist lib
there's IF, InvUI
Just trying to make a small shop gui with a CoinsEngine as currency manager
idk what the context is but theres an API method for this i think
Player#sendBlockChange or whatever
I'm having an issue with PlayerDeathEvent tracking the killer
PlayerX launches a custom projectile (projectile's shooter is set to PlayerX) and hits PlayerY.
ProjectileHitEvent damages PlayerY via: playerY.damage(damage, projectile)
However, in PlayerDeathEvent, event.getEntity().getKiller() returns null
Is there any way to make spigot recognize the killer as the shooter of the projectile that caused the death?
Why are you manually damaging the player in teh Hit event instead of changing damage?
change teh final damage in teh damage event instead of messing with the Hit event
?paste
Hey guys, this is my code: https://paste.md-5.net/igegonofuh.cpp
so I got the following problem. The method is supposed to rotate the vector currend into the direction of the vector target. the rotationSpeedInSeconds tells in how many seconds the vector would do a 360° rotation if he wasn't stopped by reaching target. the method works fine except of one thing:
For some reason the up/down rotation works only until a certain angle. It dosn't pitch higher or lower than that angle. The angle depends on the rotationTimeInSeconds. If the rotationTimeInSeconds is 0 then the rotatation works perfectly and the pitch is as it should be. But as soon as rotationTimeInSeconds is higher then 0 it cannot exceed a certein angle that gets smaller the bigger rotationTimeInSeconds gets.
green in the target vector, blue the current vector, red is the axis and yellow is the outcome that doesn't tilt upwards more then the angle you can see in the screenshot
is there a way to have bstats included in my plugin but only work if the plugin is standalone? (not shaded)
also lmk if this isn't the correct channel to ask this
It is the correct channel
yay
As for the question, just have the bstats initialization be at onEnable
Whatever plug-in is shading yours isn’t going to be calling onEnable manually so it should be good
alright, thank you
0.0009 you mean
This is 9 * 10^-4
why doesnt show normally
It's just a common way of showing very large/small numbers
Scientific notation is shorter at a certain point. It gets formatted when your values get too small.
Depends how you send it. Its completely up to you
oh yeah, you put stirngs there
how to make it normal
didnt know about it
ok i know
MessageFormat is love
how can i use a texture on a playerhead block that isnt tied to a minecraft player?
All skins are tied to an account
but I assume you already have the skin data and are looking for this;
Spigot 1.18.1 added the new PlayerProfiles class, which finally allows us to use custom heads without needing any reflection! You can obtain them as normal items, or actually place them down into the world. I’ll show you how both works: Creating a new PlayerProfile First, we gotta create a new PlayerProfile object. To do so,...
there are also services where you can send a .png to and the service will use an account from a pool to set it as the account's skin, and will return you the url to the skin texture that you can then apply to a player profile to spawn in a textured skull