#help-development
1 messages · Page 2075 of 1
and deserialize it on load
everytime a player logs online i check if the list contains him
if not make new entry
so even if i have 100k users which i highly doubt, id barely use 8.5mb ram
@SuppressWarnings("unchecked")
public static void loadPlayerUUIDList()
{
File knownPlayerFile = new File(MetaDir + SelfName + "/PlayerList.bin");
if (knownPlayerFile.exists())
{
main.playerUUIDList = (HashMap<String, UUID>)Utils.DeserializePtr(knownPlayerFile.getPath());
}
}
public static void savePlayerUUIDList()
{
Utils.SerializePtr(main.playerUUIDList, new File(MetaDir + SelfName + "/PlayerList.bin").getPath());
}
public static void updatePlayerUUIDList(Player p)
{
if (!main.playerUUIDList.containsKey(p.getName()))
{
main.playerUUIDList.put(p.getName(), p.getUniqueId());
}
}
and then the list is accessed via reflection from other plugins
using the plugins instance
thats what i came up with to bypass mysql
xD
wow
public static @NotNull UUID getUUIDFromName(String name) {
return Bukkit.getOfflinePlayer(name).getUniqueId();
}
that will send a
request to mojang
a blocking request
do I look like I care?
you should
i don't
sus
give me an ideea
i wanna make some type of app that crashes ur pc
but that doesnt sound fun
a config option to let specific mob types have x2 damage in 35 lines of code
i can just main(null);
u alr did that
that was health
i saw the repo
Man. I look forward to the day that you run this code while the auth servers are down and your server crashes as a result lol
i mean my way is laggy but i dont really notice another way
My favorite code is thread.sleep
my favourite method is
public static void main(String[] args) {
main(args);
}
in a JFrame app
Recursion
yes
Smart cookie using efficient recursive algorithm
😥
auth is for cowards
do you really think people would do that, go on the internet and tell lies?
Magma, you look lovely today
thanks man I trimmed my beard just yesterday actually
it's been a long-ass time since I posted a selfie on here
do I need to bring that back?
No
I'm getting mixed messages
Yea
GOod
man it really is inevitable that popularity breeds controversy
Yez
Heyo it's a good day to be me
But in 1.18.2, I cannot access the registry anymore because it is "frozen" now
How do I circumvent that
You look like a developer
I don't know if that's the nicest or meanest thing that anyone's ever said about my looks
you actually look like someone you could call "MagmaGuy"
the one and only, accept no replacements
i mean ur pfp suits u
it's literally me on the pfp
OH LOL
well back when I had glasses
It's almost like it's him
I got lasik a couple of months back
My pfp is me too guys trust me
uh november, it's been more than a couple
he looks like his pfp, not the pfp looks like him.
Do you recommend it?
ye
Anyone?
Was it expensive?
if you don't mind people slicing your eye open it's lit af
FUC
THATS KINDA
it cost me 3k which is actually pretty expensive for these surgeries, you can get it done in the us for about 1.1k per eye
and idk if i can trust them
what if someone terrorist bombs the hospital during my surgery
i cant trust my luck
u can go blind if they mess up that kinda uh
gambling
but yeah all in all pretty cheap
I like gambling with my health
my eyes are the last thing i want to gamble with
and ON 2 EYES
THATS WAY TOO BIG OF A GAMBLE
Just have it done 1 eye at a time
yea
that what I had, 1 at a time
that doesnt change anything
2 days apart
Yes it does
1 at a time is worse than 2 at once
Well if they mess up the first one you can still see out of one eye
the chances of stuff going fine twice in a row is less than stuff going fine once
lol no that's not how that works
shh
Don't tell that too a statistics professor
also interestingly enough lasik is statistically speaking the safest operation you can have as it would seem
turns out people are extreeeemly picky about this one very specific surgery so it has to be super duper safe
I guess I'll ask somewhere else then
ye
i wouldnt want to gamble my frickin vision bro
I wonder why people are picky about there eyes
same
Who cares about legs and shit bruh
♿
As long as my wheelchair is comfy
What the
Ah yes, development
Mad?
Lol
You might want to go into general
I'm developing my social skills
Subscribe || http://gwr.co/YT-Sub
Favourites || http://gwr.co/YT-Favs
Zion Clark is a wrestler and athlete who dreams of becoming a multi-time Olympic champion.
He was born without legs as a result of a rare geneti...
this guy is awesome though
What the hell this baller
i cant believe how hard his training was
oh wow that's like me optimizing my fundamentally bad code
to run faster on its hands
see brought it back to development, this is a development chat
Hillarious
Just go into general instead of spamming the development support channel with unrelated stuff
Someone's mad
No clue
No clue too
Holy fuck. You better hope that this guy doesn't become a zombie because you're fucked
#general though lol
There has to be some way to bypass it
Surely someone's figured it out yet, no?
The fact that the entity type registry has been frozen by the time a plugins initializer is called
Even when marked as startup
I know, but I want to know if anyone's done it yet
Is there a early entrypoint for a plugin to load?
You could probably look at the source
load: STARTUP is earlier than the default in your plugin.yml
Idk if that's early enough though
It‘s not, I am using that already
I am trying to figure out when the registry is frozen
ey, documentation shows a World#strikeLightningEffect(Location, boolean) for making it silent, but the method does not seem to exist
Do world.spigot().strikeLightningEffect
What registry are you trying to modify? Whats the name and what class is it in
how can i control if a config has the specified String.
You want to check if a config has a specified String? What do you mean by control
Entity type, a standard registry
https://api.mojang.com/users/profiles/minecraft/:username
This api returns a UUID but when I do:
Player player = Bukkit.getPlayer(UUID.fromString(UUID));
It doesn't work. but when I put mu UUID in it its with "-" in it but the API returns a UUID without dashes. I don't know if this is what is causing the error (it probably is) but I can't find any other API that does return a API with "-". Do you guys know any? or know another solution to my problem?
no i just put UUID there to share it. I've tested it with just strings and everything
https://www.spigotmc.org/threads/uuid-without-dashes-to-uuid-with-dashes.344977/
The dashes are placed in the exact same spot for all UUIDs, so you can just place them in.
on isimler, want to check if it contains alek @quaint mantle
ah thank you!
Use getKeys() and check if any of the keys are equalsIgnoresCase("alek")
OK so
what is the parameter on getKeys()
if it gets the nested ones too, probably don't want that, so do false.
According to fabric mappings, registries are frozen before even the server properties are loaded
I assume you're talking about the NMS registries in the Registry class?
I feel like I've added to those before but I could be wrong
It used to be easy
But with 1.18.2, all vanilla registries are made immutable after initial startup
oh lulw
So the question now is, how does one bypass this
Being unable to register entity types is kinda a big deal
Can you just set the freeze variable back to false?
Although freeze does other things to maybe not
Hey do you know how I can do a freeze wither ?
Why are you trying to register stuff
Set NoAI
A custom entity type is required for several nms based unique entities
No I want he can attack, I just want he can't moove, I have try to put Slowness but that dindn't work
Otherwise the server has a stroke upon loading the world
Save and load the entities yourself
I cannot
This is a comission designed to replace vanilla entities AI by overwriting them
Could fuck around with reflection
^
Well it's hard if you don't know anything about Java
A proper iterative approach allows you to fully abstract reflection access to any class
Without relying on hardcoded names
But regardless, that's not important
Register their own entities
why does mojang make everything so hard 
Hey do you know how I can do a freeze wither ? I want he can attack, I just want he can't moove, I have try to put Slowness but that dindn't work
Registering custom entities is patheticially easy on the server
use PDC
and move listeners
As long as you let the client see it as a existing entity type
you can figure it out
Which is soley used for the model
What is PDC ?
?pdc
Setting isSilent to true does not seem to actually work?
opinion: mojang should allow the client to just get entities from the server
there
you added so much customizability
Absolutely not
gets all entities on the server and leaks their location. 2b2t be like
no like
entity models
and names
and stuff
not the actual entities
oh like that
yes
yes for sure
BE has that actually
org.bukkit.plugin.InvalidPluginException: java.lang.NoSuchMethodError: com.google.common.base.Preconditions.checkArgument(ZLjava/lang/String;CLjava/lang/Object;)
I keep on getting this error even tho i shade the jar so all dependencys should be found can anyone help?
How are you shading
good idea
request every entity on the server every tick and crash the server
?paste Show pom
@quaint mantle I have no idea if this still works, but I believe this spawns silent lightning? https://paste.md-5.net/eyozuxogog.cpp
PDC wouldn't help with that
You probably need to set the movement speed attribute
nope
iirc wither does not get affected by attributes
so just marking it and then checking move events would work better
gonna try that :D
This is one way to allow rotation but no movement
works smooth as butter on the client
What move events
Isn't EntityMoveEvent only a thing in paper
no
i dont want this
Yeah so put false
this shit is not working
?paste your code
public class SignSystem {
public static void signIt(Player p, String pName, String pSurName, int id) {
Main.getInstance().getConfig().createSection(p.getName() + ".isims: " + pName + ".soyisim: " + pSurName + ".kimlikNo: " + id);
Main.getInstance().saveConfig();
ItemStack is = new ItemStack(Material.PAPER);
ItemMeta meta = is.getItemMeta();
meta.setDisplayName(ChatColor.AQUA + "KIMLIK");
ArrayList<String> lore = new ArrayList<>();
lore.add(ChatColor.DARK_BLUE + " ISIM: " + ChatColor.WHITE + pName);
lore.add(ChatColor.DARK_BLUE + " ISIM: " + ChatColor.WHITE + pSurName);
lore.add(ChatColor.DARK_BLUE + " KIMLIK NO: " + ChatColor.WHITE + id);
meta.setLore(lore);
meta.addEnchant(Enchantment.OXYGEN, 2, false);
is.setItemMeta(meta);
p.getInventory().addItem(is);
}
}```
wheres the check
i didnt
i want to check if section ".kimlikNo" has specified int i have
.getInt
how are you using it
why does my project randomly go "package does not exist" when it clearly does
God, on one hand remapping stuff to mojang makes things a lot easier to work with NMS wise
On the other hand, it turns reflection into a pain
lol
Main.getInstance().getConfig().getInt(".kimlikNo") == Integer.parseInt(strings[0])
i added my api to another plugin via the project structure and libraries thing
package does not exist
it just refuses to compile
do i have to add it via maven
cuz i did this before and it clearly worked
.kimlikNo isnt a valid path
the project structure way, havent checked maven
why
because paths cant start with .
they are usually something like root.some-value
or just some-value
you’ll use the path you created here
Like isimler.kimlikNo?
you need the arguments you used in the method you created it with
yes idvariable
so <player name>.isms.<pname>.soyism.<psurname>.kimlikNo
i just take a look at the forum and i find a solution for something
so i need to convert method to constructor
what?
how can i get method parameter
then yeah just make it the constructor
"why are you not working?" error messages is not really a feature most want ...
i didnt find an implementation for the hashmap class but like
is there a way to get the key based on its value xD
yes
without iteration
everything uses iteration lol
yeah
if(Main.getInstance().getConfig().getInt(SignSystem.getP() + ".isims." + SignSystem.getpName() + ".soyisim." + SignSystem.getpSurName() + ".kimlikNo" + SignSystem.getId() = strings[0])) 😦
same like the switch casts strings to sha-hashes
how would you know which key the result belonged to if you dont know the key?
multiple keys can have the same value
.containsValue(value);
it returns if theres a value but not to which key it belongs to
that doesnt return the key
i made constructor variables static and tried to reach them. Is this true way?
no
definitely not
then how can i take it on a command
also a rather technical question, ```java
HashMap<String, UUID> playerUUIDList = (HashMap<String, UUID>) f.get(Bukkit.getPluginManager().getPlugin("SystemControl"));
thats relevant because the map will be big
and id prefer to read from the instance in the plugin
what is f
instead of creating a new one
i did
field
lol what does it points to
public static UUID getPlayerUUID(String player)
{
try
{
Field f = Bukkit.getPluginManager().getPlugin("SystemControl").getClass().getDeclaredField("playerUUIDList");
f.setAccessible(true);
@SuppressWarnings("unchecked")
HashMap<String, UUID> playerUUIDList = (HashMap<String, UUID>) f.get(Bukkit.getPluginManager().getPlugin("SystemControl"));
f.setAccessible(false);
if (playerUUIDList.containsKey(player))
{
return playerUUIDList.get(player);
}
}
catch (NoSuchFieldException | SecurityException | IllegalArgumentException | IllegalAccessException e)
{
e.printStackTrace();
}
return null;
}
it points to public static HashMap<String, UUID> playerUUIDList = new HashMap<String, UUID>();
yea but like
does it return a copy of the map and all its contents
so do i have the memory usage twice
im not the one you should ask refelection stuff at
or does it return a pointer to the instance
so why do they need to be static?
the difference can be gigabyte in size so thats relevant
you're basically asking what casting does?
theoretically
i dont know its another way to reach them
practially it wont be that big
a map with the size of a gig?
its my way to avoid using sql
it stores the uuid and username of every player to ever been online
which is 70byte per user
i think databases are more optimized for that
and then its accessed via reflection so not every plugin stores its own copy
of the list
hence i want my plugins to read from the instance in the "master" plugin
prob
but i tend to avoid using databases
esp for the cause of switching providers
where do need to reach them
i thought you were making the method in the class
not really a valid reason
making static fields means there can only be one (static) value
and it’s not object based
omg bruh why can i not use my plugin api
it just says "package not found"
the editor doesnt raise any errors
like "package doesnt exist"
instead when writing the code, the stuff comes up normally
and everything shits itself once i compile it
did you include youtr api in your config?
Good day people, I have a (hopefully) quick question:
I'm trying to get the IBlockData from this sign to use in sending a packet, but I get a class cast exception.
Now I'm wondering what to do :/
yes
yes i did
this is how im using it
no in your pom if you are using maven
imnot
then that would be why it does not compile
i dont think that will help maven
add it the same way you added the spigotmc api
is there a way to tell maven that this is a dependency
as a maven dependency
pain
mongo is pog
true
anyone else use morphia?
<repositories>
<repository>
<id>spigot-repo</id>
<url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId>
<version>1.17.1-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
</dependencies>
hey quick question. whats the best API for creating inventory menus?
plus i thought importing it as a jar would work the same way
triumphgui
make one
thanks
its easy to use
lmao this still does the sound
:P
Well this sucks
So I may have found a way to bypass the freezing of a registry
But for that I need to hijack the cache and add a entry into the map
The issue is, to do that I need to have a instance of the EntityType already
But the constructor of an entity type calls the createIntrusiveReference, which is the very reason that errors out
what version of spigot?
Why dont cancel the method call?
...
Because you can't cancel a method call inside the constructor of a class you don't have write access to?
Why does relefections exists so?
Reflection doesn't help there
1.17.1
So prob its not possible to do what u want
i dont understand 1 thing
There is, I just have to find a different approach
why use maven if i still have to have local copies of the repos on my machine by using the buildtools
xD
isnt it supposed to like eh idk
load stuff automatically?
Terminator
Maven looks for dependencies on global repos. If the depend its on a custom repo you have to told maven
If not it wont find your depend. Its a bit of logic
anyone know what this means
sorry for making the mistake of uploading a single line error
anyone know what this means
Its saying you casting to a wrong class
Cast error not sure what or where without more context though
its casted properly
Agree
Send full code
Obviously not or there would be no error
Someone shaded the class into another plugin so there's two of the same folders which I think can cause conflict @ornate mantle
how do i fix it
OH
Prob he called main class to his plugin and the other main class has the same name
or the plugin was shaded into another
Yeah that too
class xyz.minefalls.coinapi.Main cannot be cast to class xyz.minefalls.coinapi.Main
what
your class is loaded multiple times
well in spite of what you're saying there's evidence to the contrary
when you include classes of (external) dependencies into your own jar during compilation
ProtocolLib sounds
i made a plugin with a few methods
and i made another plugin which uses that plugin via maven
myes
locally
and chances are that you shade the plugin that depends on your plugin with few methods
well
i used this method
send your pom
?paste
here, so everyone can see and give plausible insight
@crisp steeple buddy i made it constructor now what should i do
can u help me
and try recompile and deploy your jar again
with?
it works wtf
alr
if it has a number i text
well that looks like some improper parsing
conclure
mye
what does the scope thing do and why did it fix it
well you have to understand that there are two types of dependencies
compile time respectively runtime
what are you saving in your config?
name, surname and id
and what does limpeex mean?
compile time dependencies are those that you need when writing code, you know, such that your ide can recognize classes and functions from said dependency
it means that limpeex created that character
runtime dependencies are those that you need when the jvm instance actually runs
now thing is, that api library of yours gets loaded during runtime by spigot
if a player changes his name, his stats will be resetted because his name cannot be found in the file
and essentially, what you had there took the api classes from the api library and put those inside your jar file as well
alr i did
as it thought that the dependency was both runtime and compile time
so what happens is that the class x.y.z.Api was loaded in your jar as well as from the other api library
mye
provided btw means compile time only
yeah
@tardy delta how can i access that subnodes
if you do not provide any scope, the scope type compile will be set
Custom Snowball Entity data?
which declares said dependency as both compile time and runtime
FileConfiguration#get(“path.to.your.value”)
i would do
playerdata:
uuid1:
name: 'some name'
surname: 'some surname'
id: 2```
@kindred valley
im a little bit confused about sorting the config queue
how do i check when a boat is placed
if it has a specified number
how can i queue it like this
Use the proper method to return what you want.
So if you want to get a number, use FileConfiguration.getInteger(“playerdata.uuid1.id”)
FileConfiguration.getInteger(“playerdata.uuid1.id”).contains(781);
i need a method like this
no want any return
want to control if that subnode has the int i want
I think you misunderstand how that method works.
The #get method returns the value from the path you give it. So if you want to get a number from the config, you’d use #getInteger() and use it for what you need.
(Main.getInstance().getConfig().getInt(".kimlikNo") == Integer.parseInt(strings[0]))
how do i set the default config of a bungee plugin like you do with a spigot plugin
That wouldn’t work anyways as the path you provide is invalid. Paths will always start with a word/letter.
root:
subnode1: 12
subnode2:
subnode3: “hi”
If you wanted to get the value of subnode3, you would use #getString(“root.subnode2.subnode3”)
Since those methods return their respective objects, comparisons shouldn’t be hard.
so no?
public boolean onCommand(CommandSender commandSender, Command command, String s, String[] strings) {
SignSystem signSystem = new SignSystem();
Player p = (Player) commandSender;
if(p.hasPermission("polis")) {
for(int i: Main.getInstance().getConfig().getIntegerList("isims.soyisim.kimlikNo")) {
if(i == Integer.parseInt(strings[0])) {
p.sendMessage(ChatColor.AQUA + " BOYLE BIR KISI BULUNUO...");
}else {
p.sendMessage(ChatColor.RED + " BOYLE BIR KISI BULUNMUO...");
}
}
}
return true;
}```
i want to get all subnode3 values on config
Is the config structure consistent?
Because if it is, you can loop through your sections using #getConfigurationSection(“path.to.your.section”).getKeys(false)
for(String i: Main.getInstance().getConfig().getConfigurationSection("isims.soyisim.kimlikNo").getKeys(false)) {
if(i == strings[0]) {
p.sendMessage(ChatColor.AQUA + " BOYLE BIR KISI BULUNUO...");
}else {
p.sendMessage(ChatColor.RED + " BOYLE BIR KISI BULUNMUO...");
}
}```
i made it like this but it always shows null
wait
== doesnt work on strings
still cant get the result i want
no == is for references
use .equals on objects
Yet I have a custom entity that needs to be loaded by the game on world start
ye still not working
So what would be the smartest approach of this
I can't rely on the vanilla loading mechanism anymore because I have no way to indicate wether or not the entity is my custom one or not
And as such cannot parse it as one
Unless there is a event for that
Send me all the code
what da dawg doing
I want a config file so I can save the data to link a discord account with a minecraft account
players:
minecraftids:
bf32bb0f-0345-4de8-9ae4-f7a759677746:
discordid: "468512709248548865"
nickname: "example_name"
verified: true
discordids:
468512709248548865:
minecraftid: "bf32bb0f-0345-4de8-9ae4-f7a759677746"
nickname: "example_name"
verified: true
I thought of this but there must be a better way to do it. If you have the discord id, you can get the minecraft id along with more info And If you have the minecraft id, you can get the discord id along with more info.
or is this really just the best way?
ye that too but hes asking for yml
alrighty then
if its small it doesnt matter that much
I mean it can be fine to use yml
like ifs a mock implementation for instance
of course you're rather limited with it
mysql sucks
then use sqlite
lol
but like postgresql
but no? there isn't like a yml notation that i dont know of to make this better?
he cant mute me
which h2 isnt the slightest
ah i dont know postgresql
and whilst mongo can be it isn't when it comes to advanced queries on relational data
i just saw that its a better alternative for mysql
someone pls help me
and ideally postgre
with
provide some context ^
I have a config directory and I want to get the values of a subnode in this directory
did you change the format now so it can be parsed?
because you were having invalid yml
wdym
Main.getInstance().getConfig().createSection(p.getUniqueId() + ".name: " + pName + ".surname: " + pSurName + ".id: " + id); I want to get surname from this.
you’re creating a configuration section instead of doing .set
also that path is completely redundant
i would recommend learning more about how yaml works
what is the difference
please look into yaml more
the way you are making it is completely incorrect
a configuration section is a section that holds values
set actually sets the values of attributes
im handicapped on yml
what?
I get confused when strings are involved to code
i would work on that then since strings come up a lot in coding
alright i will take a little bit help from my friends. Do you have any resources i can watch?
or is it legal to say idk
Learn how to use the config.yml! Finding known and unknown values from the config.yml file :)
------ Links ------
Download Eclipse: https://www.eclipse.org/downloads/packages/release/2019-03/r/eclipse-ide-java-developers
Download Spigot: https://getbukkit.org/download/spigot
Build Spigot: https://www.spigotmc.org/wiki/buildtools/
Starting S...
ty
I still don't get why he's always in a jungle
minecraft
That doesn't have isNewChunk() tho
hey i kinda need help on smth :
Then say it
so i need help : i m trying to make it so like when u do a certain command, it creates a world and the middle is a dark forest here is my code :
if(command.getName().equalsIgnoreCase("roofed")) {
Player player = (Player) sender;
System.out.println("1");
WorldCreator worldcreator = new WorldCreator("" + player.getUniqueId());
worldcreator.type(WorldType.NORMAL);
worldcreator.generateStructures(true);
worldcreator.createWorld();
int bx = 0;
int bz = 0;
World world = Bukkit.getWorld("" + player.getUniqueId());
for(int xx = bx; xx < bx+16; xx++) {
for(int zz = bz; zz < bz+16; zz++) {
for(int yy = 0; yy < 128; yy++) {
world.getBlockAt(xx,yy,zz).setBiome(Biome.ROOFED_FOREST);
}
}
}
p2.teleport(new Location(Bukkit.getWorld("" + player.getUniqueId()),0, 0, 0));
for(Player p3 : Bukkit.getOnlinePlayers()){
p3.teleport(new Location(Bukkit.getWorld("" + player.getUniqueId()), getRandomNumber(-200, 200), 200, getRandomNumber(-200, 200)));
}
System.out.println("2");
System.out.println("3");
WorldBorder worldborder = Bukkit.getWorld("" + player.getUniqueId()).getWorldBorder();
worldborder.setCenter(0, 0);
worldborder.setSize(500);
}
the problem here is the folowing
when it changes the biome, the world is already created
the problem is : it just changes ths biome, but does not generate anything
But chunk.getEntities doesn't work either
So why would that
why would it not work
Idk the entities aren't generated in ChunkLoadEvent
So getting the world in the event is gonna return it at that time
Before they spaen
if you listen for worldloadevent then get all the entities in the world it should work
at least in my experience
you could add a persistent data container to the end crystal
Wdym
i think that’s how it works in later versions
you’re sure entityspawnevent wouldn’t work as well?
But that still would generate the structure for player-built end crystals
Ig I'ma just get it using the bedrock
i wouldn’t do that
But idk how to filter out the middle bedrock
And it's only supposed to generate the first time the end is loaded
i haven’t really used persistent data containers since i usually work in earlier versions, but i’m pretty sure you could just add something like <“playerSpawed”: true> to the crystal
I guess but there's probably still a better way to do it
possibly
there’s a way to see the reason entities were spawned pretty sure
you could check that
if anyone knows how to generate a world with only one biome in 1.8.8 in spigot tell me
probably something with worldcreator
ik look at my code i used it but i cant find how to do that
BiomeProvider?
^^
and how do i use that?
like worldcreator.biomeprovider() ?
yeah
doesnt exist
declaration: package: org.bukkit, class: WorldCreator
not sure how you would do it then
thats why i asked lmao
One further reason to say away from out-of-date stuff
i dont have a choice
long story
you’re sure?
I also deved with 1.8/1.12 when I started, but it isn't pleasant to use and now I wouldn't go back
yeah same lol
no but rn i dont have a choice i told ya
quite sad as you'll be missing out on so much niceties
Are there events fired before a world is loaded, to intercept entity load calls?
ok wait
i have an idea... would it technicly be possible to generate worlds and check the coordonates of 0 0 0 to see the biome and delete it if its not correct?
Create a world with a biome
is placing entities like endcrystal part of BlockPlaceEvent?
ye
No they have their own event
what is it
Like the entire world being a single biome or just being centered around a biome?
Like at list in a range of like 300 blocks the middle beeing 1 biome
If it is the entire world you might be able to force the amplified world generator but idk how to do that
hmmmm
maybe i could generate the world and check where there is this biome and put the 0 0 there?
try just scrolling through the methods of WorldGenerator for a while and see if there’s anything that relates to biomes
if not then it might just not be implemented on 1.8
could require nms
imma be honnest i saw a few things but dont rly understand how they work
wdym
so the debug is logging, but when i tp to the coords, its just the end crystal without the structure
https://paste.md-5.net/gawixujefo.cs
is there something with my fill command?
Why does .getTPS() return an arraylist?
When I average it out it gets to be above 20
i figured it out
its tops from later 1min, 5min, 15min
Would this get the 1min value?
u can just get(0)
oh okay
yes
Hi! How can i convert a 2 digit number to match it from -1 to 1?
you can do x>0 and X<0
World world = plugin.getServer().getWorld(worldName);
plugin isnt null, server isnt null, worldName isnt null
but world is null
and the world exists
why is it null
the world isn't loaded then
uh maybe i said it wrongly.
I want to have the corrispondent decimal value from -1 to 1 equivalent to what a two digit number would be.
For example: I have 20 and i want to get the equivalent value from -1 to 1.
idk how to do that sorry
this happens a lot
try seeing if bukkit.getworlds has it
you trying to do 2 compliment will0mane?
?
lets have it clear. I'm making a Speed Stat and this is from 0 to 100. To set the actual player speed i need a float from -1 to 1. How can i convert the stat value to the equivalent speed value?
using division
how do i get the location of the dragon's head?
could you do an example?
it doesnt wtf
IM LITERALLY DOING
getworld("world")
HOLY SHIT
what are xb and xa?
final value and initial value
minecraft:overworld
which are?
like if i have Stat value: 10 what would speed value be?
depends how many decimals you are working with
wait, which one do you have loaded?
i don't understand
yes
how do i load a world
how many units do you have for the float value between -1 and 1 ?
?
are you using multicraft
no idk whats that
world plugin
i guess 100?
im using multiverse
let me try to check how i fixed it
the xb would be 100 and your result would be 10 , so you need the xa value
so the world management plugin
just got the names mixed up
well yeah then that is part of the problem
add them to the list
(100-?)/?
yeah
spigot only loads one world
you still have to import it with multiverse
idk why it works like that but it just does
what do i do then
/mv import <name> NORMAL
spigot really disappoints me sometimes
((100)/(20+1))/100
why would you expect it to load more than one world?
it load 3 dimensions by default
why?
how can you check if the world, which a player is in when he joins, actually still exists?
player().getLocation(). ?
isWorldLoaded() ?
is that what u need?
who else agrees that packets are pog
It throws this error in console, when a player joins who last was in a world that has been deleted
Could not call method 'public static org.bukkit.Location org.bukkit.Location.deserialize(java.util.Map)' of class org.bukkit.Location for deserialization
java.lang.IllegalArgumentException: unknown world
OnPlayerJoin and then TP them or respawn them
if you're talking about mojang packet classes, I agree
show the full error
im making a discord sync plugin with url endpoints
/link runs https://link.com/sync-rank/new/<UUID>
/unlink runs https://link.com/sync-rank/remove/<UUID>
I want to send all the person roles from luckperms to an api endpoint too so https://link.com/sync-rank/roles/<UUID>/{Server: Survival: "Roles","Roles"}
yes
can i do something like that
eeew
D:
I am disgusted
do i have to use their api
:(
I go back to my furry dc
:O
or can i just make console send that cmd
what are you trying to do anyway
you can just do Bukkit.createWorld("foldername");
load a world
^
it exists
he wants to load muliple worlds
oh cool
help
im using this
Block block = event.getClickedBlock().get();//the block the player right clicked
if (block.getState() instanceof Sign sign) {
sign.setGlowingText(true);
}
to make the sign glow
but im getting this
https://paste.md-5.net/eviqutegor.http
the block you clicked is not a sign
oh wait
wait, wrong code
should work just fine unless you imported the wrong sign, if there another one
?jd
u mean createWorld(WorldCreator.name(worldName))
Block block = event.getClickedBlock().get();//the block the player right clicked
if (block.getState() instanceof Sign) {
Sign sign = (Sign) block;
sign.setGlowingText(true);
}
the first code worked fine
instanceof casting
import looks good to me
cast the block, not the state
wait
no
they do that
import org.bukkit.block.Sign;
the code looks totally fine to me
wait
yeah the error message and the code don't really match up
forgot to restart server before test :p
nah ive done that plenty of times
you can waste your time trying to read this https://paste.md-5.net/ixaqajuxar.java
what the fuck
this is awesome
best coding I've ever seen
I definitely would not recommend ?learnjava to the dev who did that
no
i figured it out, thank you! thanks to you i searched the whole error-log (which was pretty long) and at line 40 or so it named one of my classes, where the error was actually originating from. lol.
ah, sign.update()
BlockState state = event.getClickedBlock().getState();
if (state instanceof Sign sign) {
sign.setGlowingText(true);
sign.update();
}
if block is a variable, i mean yeah
well
Block block = event.getClickedBlock().get();//the block the player right clicked
if (block.getState() instanceof Sign) {
Sign sign = (Sign) block;
sign.setGlowingText(true);
sign.update();
}
whats .get
hes using paper
might be an optional
but what event is it?
why would it return an optional and not just be nullable
exactly
nah ill try what you said to
idk. some people think its "cleaner"
String string = someFunc();
if (string == null) {
return;
}
yep, its optional. cant resolve method getState in Optional
i mean yea i agree. i would do it this way as well.
Optional looks better imo
Optional is just a fancy null check
Yes
pretty useless imo
Block block = event.getClickedBlock().get();
BlockState state = block.getState();
if (state instanceof Sign sign) {
sign.setGlowingText(true);
sign.update();
}
makes it fancier
isPresent btw
dont get() without isPresent
im using isPresent
u could also use ifPresent ig
public void setNeonLight(PlayerRightClickEvent event) {
if (event.getClickedBlock().isPresent()) {
Block block = event.getClickedBlock().get();
BlockState state = block.getState();
if (state instanceof Sign sign) {
sign.setGlowingText(true);
sign.update();
}
}
}
indents 💀
how do you make a projectile immune to a certain entity
one indent rlly doesnt matter
trying to spawn end fireballs but they keep exploding on the dragon
PlayerRightClickEvent is slimefun api thing, i cant explain, if you want to know go read its docs
u should indent ur code 500 times no i agree.
wait could i just cast the dragon to ProjectileSource?
why would u have 2
and use launchProjectile
well i might still work. but it makes it hard to read
not here tho
invert ur if statements and just return instead
there
no errors and no glow
it just makes the text blue since the item is a dye
nah
nnow its completely empty
bruh what the heck is that
xD
stairs
who the FUCK sent that
✋
this shoots the projectile into literal space, what would be the vector for the player?
((ProjectileSource) entity).launchProjectile(DragonFireball.class, closest.getLocation().toVector());
u couldve just looped it
why did u spam it
*whose
whos code is that
me
*whose
listen were not here to judge my grammar
no need to fix anymore
okay good
lmao emoji just yeeted
hehe Hyper
why does my :troll: not work
need booster role


spigot = p2w
its kinda funny
this actually angers me
here what it makes
loops?
i tried
WAIT WHAT THE
owo
LOOPS
thats so pretty
EXIST
yep, it made the shape instantly
Burchard you're the dude I chatted with about the AE API lol?!
yes LMAO
haha
whats AE API
AdvancedEnchantments API
you guys are lightnings to type

