#help-development
1 messages · Page 1420 of 1
nice
so thanks for the help
i mean its the same like:
1: buying stuff to put into my fridge
2: wondering why i can't but it into my fridge, because i don't have a fridge
yes, i'm example-king
why spigot does not have org/apache/logging/log4j/spi/AbstractLoggerAdapter ?
I already tried to run worldedit & fawe with spigot and paperspigot but not works
spigot uses java logging
so yeah depending on slf4j when using spigot will ofc end with a NCDFE
ok probably another dumb question but, can i put the sword that i just created into a new recipe?
yes
how should i call it?
it requires an exactchoice
would it be like recipe.addIngrident(1, sharpXX)?
it requires an exactchoice as the recipechoice
look up a recipe guide
ok
ok, whenever i go to export the plugin i get this error no suitable method found for addIngredient(int,org.bukkit.inventory.ItemStack)
the code: sharpCCr.addIngredient(9, sharpCC);
did you read the error ?
did you read the guide?
@thorny bridge you used java addIngredient(ItemStack, int)
it want's a material, not an itemstack.
ok, what should i use then?
a material
not an itemStack
and because your sharpXX was an ItemStack, i guess your sharpCC is Too
i hate this formatting
yes
link the guide you read
how can i make the itemstack a material
do i need to make a namespaced key, then reference that key?
if i am not completely dumb, the guide is completely different from your code
it doesn't look like he actually read or followed the guide
public void onEnable() {
// Our custom variable which we will be changing around.
ItemStack item = new ItemStack(Material.DIAMOND_SWORD);
// The meta of the diamond sword where we can change the name, and properties of the item.
ItemMeta meta = item.getItemMeta();
// We will initialise the next variable after changing the properties of the sword
// This sets the name of the item.
meta.setDisplayName(ChatColor.GREEN + "Emerald Sword");
// Set the meta of the sword to the edited meta.
item.setItemMeta(meta);
// Add the custom enchantment to make the emerald sword special
// In this case, we're adding the permission that modifies the damage value on level 5
// Level 5 is represented by the second parameter. You can change this to anything compatible with a sword
item.addEnchantment(Enchantment.DAMAGE_ALL, 5);
// create a NamespacedKey for your recipe
NamespacedKey key = new NamespacedKey(this, "emerald_sword");
// Create our custom recipe variable
ShapedRecipe recipe = new ShapedRecipe(key, item);
// Here we will set the places. E and S can represent anything, and the letters can be anything. Beware; this is case sensitive.
recipe.shape(" E ", " E ", " S ");
// Set what the letters represent.
// E = Emerald, S = Stick
recipe.setIngredient('E', Material.EMERALD);
recipe.setIngredient('S', Material.STICK);
// Finally, add the recipe to the bukkit recipes
Bukkit.addRecipe(recipe);
}```
that's from the website
yes, i used a shapeless recipe
but you didn't follow anything in the guide
hi, should a plugin assert its own permissions? I tried to do this by using org.bukkit.permissions.Permissible.hasPermission(String) but it's not really working, so i thought maybe i shouldnt even be doing this? idk
define not working
nvm i gave up
thanks tho
i gave myself a permission on my testing server using LuckPerms, but bukkit doesn't recognize that i have that permission
what perm did you give and how exactly are you testing it
so now im confused on where .hasPermission even gets the data from
a perm node that i defined in my plugin.yml for usage of a command
@thorny bridge
ItemStack item = new ItemStack(Material.DIAMOND_SWORD);
ItemMeta meta = item.getItemMeta();
meta.setDisplayName(ChatColor.GREEN + "Emerald Sword");
item.setItemMeta(meta);
item.addEnchantment(Enchantment.DAMAGE_ALL, 5);
NamespacedKey key = new NamespacedKey(Main.getPlugin(), "emerald_sword");
ShapelessRecipe recipe = new ShapelessRecipe(key, item);
recipe.addIngredient(Material.EMERALD);
recipe.addIngredient(Material.STICK);
Bukkit.addRecipe(recipe);```
don't except more spoonfeeds
Show actual code
what's the exact node you added and the exact line of code you used to test
ik thanks
if i give more spoonfeeds, NNYaKNwhatever will hate me again
this is how i use bukkit's hasPermission
ok i dont think i will need them anymore. Thanks!
what is the node you gave, and the node you are testing
as to what node i added, just a plugin.foo.bar
which is defined exactly the same everywhere
in my plugin.yml, in my code, and in the way i assigned it to myself on server
that should work
How did you give yourself the permission?
i assigned the permission to a group, and parented that group to myself
You mean a LP group?
yeah
inb4 use groupmanager
Would it be bad practice to write to the plugin's config files/fetch a web api in an asyncrhonous chat event? I would like to have these things happen when a player chats, but I hate having the lag before it shows up in chat (because it's completing the event)
unless the return feedback of the api is important to how you handle the event, you should let the event continue without blocking it
and use the web api on a different thread
alright, so i just found out it DOES work, but only after i rejoined the server...
any way to not have to rejoin?
I guess if its not working you didn't assign it correctly in LP or you didn't define/check it correctly in your plugin.
If player.hasPermission returns false then you do not have the node.
No i'm simply logging chat outputs by sending a post request to a web api i've coded
yeah, no need to block on the web request then
Ok sounds good, thanks
schedule it to happen on a different thread and let the event proceed without blocking it
possibly batch the messages and only send them once you have x messages in a buffer, if necessary
as i said, turns out i did all that correctly and it does work, but only after i rejoin the server, which is kind of annoying
sounds like luckperms is doing something dumb, dunno
do other permission plugins not have this issue in your experience, then?
wdym?
GroupManager doesn;t 😉
it's also the only perms plugin I use because fuck everything else
gm gives me cancer
manuadd my ass
You can live with cancer
If your plugin is adding the permission to your player via code it soundls like you are not adding it correctly
luckperms after deprecating another important API feature
no thats not what i meant, all i did was try to read if a player has a permission, not write it
readd?
yeah... hasPermission
but... you said you don;t have the permission until you relog
well yeah, but i set the permission with LP
maybe i need to check the lp config again, idk
oh, you are adding the perm i using LP commands and its not updating to the player who's already online?
Then I'd suggest using a permission plugin that doesn't cache/reflect the player object like that.
luckperms is like the best perms plugin though so you probably don't need to change just because of that
yeah that doesnt sound like its worth it
depends on how attached he is and wht features he needs
kind of sounds dubious that luckperms is having that issue to begin with
perhaps ask them if there are any misconfiguration cases that could cause it
probably
I would be dubious if he was adding perms via the API or somethign, but via its own commands.
but i suppose this is turning into more of a #help-server issue and im not a server owner :P
you are very dubious yes
Seems so
the most dubious man
lol
How would I make something open on join? i have a custom item that is a book and quill
@EventHandler
public void onPlayerJoinBook(PlayerJoinEvent e) {
Player p = e.getPlayer();
p.getInventory().addItem(joinbook);
}
Player player = event.getPlayer();
PotionEffect absorptionEffect = new PotionEffect(PotionEffectType.ABSORPTION, 120 ,4);
PotionEffect regenerationEffect = new PotionEffect(PotionEffectType.REGENERATION, 30, 2);
PotionEffect fireResistEffect = new PotionEffect(PotionEffectType.FIRE_RESISTANCE, 300, 1);
PotionEffect resistanceEffect = new PotionEffect(PotionEffectType.DAMAGE_RESISTANCE, 300, 1);
player.addPotionEffect(regenerationEffect);
player.addPotionEffect(absorptionEffect);
player.addPotionEffect(fireResistEffect);
player.addPotionEffect(resistanceEffect);
}```
would this be how to give effects when a food is eaten
It does not seem to be working and want to make sure that there isnt something wrong with this part
my server has too many mv worlds loaded at once apparently
any way to like
compress the mv worlds?
declaration: package: org.bukkit.entity, interface: Player
hello someone know how to disabling mongodb logger?
cause it doesn't work
@Override
public void onEnable() {
// Plugin startup logic :d
System.setProperty("DEBUG.GO", "true");
System.setProperty("DB.TRACE", "true");
Logger mongoLogger = Logger.getLogger("org.mongodb.driver");
mongoLogger.setLevel(Level.WARNING);
luckPerms = getServer().getServicesManager().load(LuckPerms.class);
setupConfig();
setupLogging();
setupDatabase();
registerListeners();
}```
Event#getEntity instanceof Arrow
@brave glenHander?
register?
send code
the damager will never be an arrow
the damager would be the entity that fired the arrow
at least that is what I assume to be the case, haven't ever actually tried
bump
well I think ::getDamager could be an Arrow
mmmaybe
Damager would be the arrow, you cast to Projectile and getShooter
says the dubious man
dubious to be sure
thanks I have this:
@EventHandler
public void onPlayerJoinBook(PlayerJoinEvent e) {
Player p = e.getPlayer();
p.getInventory().addItem(book);
}
public static ItemStack book;
public static void init() {
book();
}
private static void book() {
Material type;
ItemStack item = new ItemStack(Material.WRITTEN_BOOK, 1);
BookMeta meta = (BookMeta) item.getItemMeta();
meta.setTitle("My really cool book");
meta.setAuthor("KeybordPiano459");
meta.setPage(1, "This will be page one.");
meta.setPage(2, "This will be page two.");
List<String> pages = new ArrayList<>();
pages.add("This will be page one.");
pages.add("This will be page two.");
meta.setPages(pages);
item.setItemMeta(meta);
book = item;
}
but how do I get it to open onJoin?
As I've said
there's a method somewhere that shows a book to a player
The method I sent was the way to open a book for the player
iirc on the player class
declaration: package: org.bukkit.entity, interface: Player
It's literally there
that's also what I sent earlier
k ty
that said the method is kind of hacky
it'll set the player's held item to that itemstack and then prompt them to open the book, and then set the held itemstack back
because of protocol limitations
poor guy tagged for no reason
did the eventhandler guy change his name
is there a better way of checking if a number is int than public static boolean isInt(String s){ try{ Integer.parseInt(s); }catch (NumberFormatException e){ return false; } return true; }
yes, see the javadocs
they provide you with a regex to check against a string to see if it can be parsed as an int
that said that method is fine
hello, is there anything on api that cancels any light update?
call it statically
don't call it on the object
call it on the class
VarType.isInt
basically, learn java
i'm a pretty toxic guy
what is wrong with this? why does it show an error?
<main class name>.getPlugin().getConfig().get("messagecolor");
what is the error
'getPlugin(java.lang.Class<org.bukkit.plugin.java.JavaPlugin>)' in 'org.bukkit.plugin.java.JavaPlugin' cannot be applied to '()'
the static getPlugin method as declared in JavaPlugin takes 1 parameter
that parameter is the class whose plugin should be returned
so what should I do?
you should write a static instance getter in your main class, or use dependency injection to pass your plugin instance around
no no no
?
that is the latter alternative, yes, DI
regrettably all di tutorials and guides are super overengineered and overcomplicate the sibject with gay shit like di frameworks
explain how plz
so good luck trying to find a coherent tutorial on it
To put it in simple English
Pass your plugin instance into the constructor of other classes
i can give u example w8
you would hate me then xd
for my second monitor
tf
because hdmi cables don't have screws
hdmi cables don't need screws.
i want screws
so the cable stays firmly attached
and doesn't break the fucking motherboard when I slip the laptop on top of something
most cheap laptop ports are directly welded onto the motherboard
i see
twisting them can cause the board to snap
well, imagine using a monitor with a laptop
by attaching the cable to the casing rather than the port, that happens less often
and not using a pc for that
i'm a pretty mobile guy
yeah, then having both is cool. but only using a laptop is pretty... dumb imo
i haven't had the effort to put money and time into finding me an actually good machine
i just use shit tier 200 buck laptops
a good pc isn't that expensive
i want a good machine and at the same time I don't want to get piss in my eye from shitty lying retailers
if you know what you need
and at the same time I don't have the effort to actually put time into researching what offers are scams and what are not
yeah, just look where you buy the stuff, and don't ever buy full pc's
and building a machine from scratch is out of the question because of lack of effort
buy the components, and build it yourself
yeah, no effort
tf
i'll do it later
Whats is the best way to send a title to a players screen in 1.8 witout using packets
no youre not
by not using 1.8
because you will always tell yourself you got no effort
well yes
Don't think you can without packets
but i'll do it later
Unless you use some external API
you wil never do that
right now though i'm gonna go dig up me a new vga cable
Dang. Thats what I thought
liar
thanks
Ok thanks
guiHandler.addGUI(this);```
```java
private References r = new References();
private GUIHandler guiHandler = r.guiHandler;```
References.java:
```java
public class References {
public GUIHandler guiHandler = new GUIHandler();
}
GUIHandler has a List, why does the list reset everytime I reference the guiHandler?
didn't fix it
@sullen dome got mad trying to debug kekw
why not calling guiHandler g lol
Or
i will change References eventually
Not a single letter variable
not really helpful :/
yeah sorry :/ i like to try to be funny
i mean.. there are people who do this
real men call their main class IIiIiiiI
i call mine asöäfujhaspfg
any1 could help plz
obviously in lowercase
it should work
because brrr
it doesnt D:
so no one has any ideas for my problem?
now to fucking resize and move all of my windows back to the second monitor
this new cable is slightly thinner and also black
Will more context help for my problem anyone?
i think because you initialize guiHandler everytime? idk
i think it's a good allegory for what's happening in the western world's population
@sullen dome i only initailize it once
unless initializing References is initalizing
it again
idk it confuses me
people are becoming limp dicked spaghetti wristed pencil necked pussies
i need a static reference to it
and also black
hello
hello
plus I can't exactly put together a laptop myself
and getting a well performing laptop is gay anyway
i want to make what a mob spawn in the player position with a delay
help me please
i use a laptop as well, but i use it to run my server-console and sftp stuff
because i dont like having thousands of windows open
i move around frequently and need my machine in a lot of places
i can't really bolt myself down to one workstation at a fixed location
how's the specs
probably better than mine
the processor is "fine" but because of the shitty passive ass heating, it's always throttled down to like 600mhz
i cant even use it rn
it feels like i'm back in 1990 something
it says please insert a proper boot device when booting. idk if my ssd is broken, or my laptop slot
and all the sysout are printing correctly
consider locating the fucking enter key on your keyboard
and then figuring out where the spacebar is
me? why
shift enter technically
and realizing they're not the same key
tf
still didn't fix it
i'm confused
talking to this frenzy fuck
damn
lol
who
speaks
like
this
someone's mad 😳
i'm perpetually mad
i can see that
NNYaKNwhatever get's mad pretty easily tho
lol
also do you realize how gay it is to link to some shady script ass website just to show an image
lolll
i haven't had the effort to make a sockpuppet account to verify with
not sure how that helps
this webpage literally doesn't work without javascripts
and all it does is display an image
it's trying to shove 3 cookies and several style sheets and a bunch of scripts up my ass just to display an image
ok well let me send my code
directly here
public void onRespawn(PlayerRespawnEvent e) {
Player player = e.getPlayer();
Fighter fighter = Fighter.getFighter(player.getName());
System.out.println("SUPPOSE BEFORE CHECK");
if(fighter.isInGame())
{
System.out.println("SUPPOSE TO RESPAWN");
Game game = Game.getGame(fighter.getGameId());
Random rand = new Random();
Spawn spawn= game.getSpawns().get(rand.nextInt(game.getSpawns().size()));
System.out.println("SETTING THE LCOATION");
e.setRespawnLocation(spawn.getLocation());
System.out.println("SET THE LCOATION");
player.getInventory().clear();
player.getInventory().addItem(new ItemStack(Material.BOW));
player.getInventory().addItem(new ItemStack(Material.STONE_SWORD));
player.getInventory().addItem(new ItemStack(Material.ARROW));
}
}
alternatively you can link the image directly here
no he cant because he's not verified
(If you verify)
thats why people use gyazo and shit
mhm
of rightclicking an image and copying the link to the image
who gives a shit
rather than the webpage the image is on
i give a shit cause this website is gay
the respawn location you set might get overridden by other plugins or game mechanics
i'm not totally sure how the ordering on that goes
then is there a way of respawning the player on a location?
i vaguely remember many people having issues with doing this same thing
the problem is that a lot of things also want to set the respawn location
beds, respawn anchors, other plugins
there is a way, but I don't remember what it is exactly
maybe try this
p.getInventory().setItem(p.getInventory().firstEmpty(), new ItemStack(Material.DIAMOND_SWORD));
i remember i had problems with addItem as well
mhm
(i guess firstEmpty is the first empty slot, but idk, test it)
Add a 1 tick delay for adding items
why that
yeah the respawn logic doesn't play nice with inventory changes
oh
Because the game doesn't like you doing things in the event
i think it like re-nukes the inventory or something when the player is actually popped back in the world
Potion effects don't work either IIRc
the whole game is kind of fucked around the whole respawning logic
no the problem is that he just doesnt respawn at the location i gave
but setitem definitely works tho
oh
i see
then add a 1tick delay, like coll said
run a delayed task
Bukkit.getScheduler().runTaskLater(Plugin, () -> {
//your task
}, 1L);
to put it in perspective
to deliver the 8kb payload of this image
the webpage is like 30kb
you're really on hate today
it fucking pisses me off how incompetent and complacent everyone is in this modern age
just ignore it lmao
depercated.
shit like electron is literally ruining this planet and this industry
if i would rage at incompetent people, i would probably die
tf
it infuriates me how fucking bad things are
Use BukkitRunnable class instead.
definitely not deprecated
it is not opening, anyone knows why?
which version?
i do reach the message tho.
you're talking about some other similar method that is deprecated
Uh I use 1.8.8
so instead of e.setRespawnLocation
if i would rage about such people, i would die
I just teleport the player 1 tick later
so i just let them be
You need to set the block data back
helps both me and them
i don't rage about 1.8 people
Hello! Can I extract spigot.jar, combine with my lib and complier run together in 1 jar?
i just kindly tell them to fuck off when they want help from me
kindly is a bit different lol
No point, and not easily
you haven't seen me not-kindly
well
thx, fixed
I already test, I can run it now
like
raving about global warming pisses me off
people virtue signalling by tweeting about "i donated $20 to this charity that plants trees" piss me off
i don't think the website has a gender
And I actually don't touch anything from spigot.jar
yeah second one is really dumb
if you actually gave a singular shit about global warming you'd strap yourself into a nuke and mail yourself to china and india
HOLY
I'm down
god
Can someone provide the nuke
What did mars do to you
I'm praying for a HUGE asteroid. Something like the dinosaurs might have seen.
global warming taxes and tariffs and charities are the new indulgence from the middle ages
where you pay money to get a place in heaven
it's just all bullshit, nobody actually gives a shit about anything
Oh I can buy that now? Cool
lol
What does god do with the money
look at this one fucking burger joint advertising that their employees' T shirts are manufactured from recycled plastic
now the people who buy the fucking burgers shipped from overseas at that joint feel good about themselves because they're supporting the fight against climate change
they feel like they've contributed something
they're fucking saints now
They told us 40 years ago we only have another 20 years of oil. That didn't pan out did it.
dude we recycle our ketchup barrels into stools and chairs and tables
look at us being eco friendly and pretending we're doing something about something
come consume some burgers here
you can do it with a clean conscience
The global economy is in crisis. The exponential exhaustion of natural resources, declining productivity, slow growth, rising unemployment, and steep inequality, forces us to rethink our economic models. Where do we go from here? In this feature-length documentary, social and economic theorist Jeremy Rifkin lays out a road map to usher in a new ...
Actually, we ship our ketchup bottles half way around the world to be recycled into furniture and clothes then shipped back and sold to us at extortionate prices.
the EU just banned plastic forks and shit
so now everybody is shipping their plastic forks and shit in small cardboard packages from russia and overseas
because that's how we save the environment
They banned plastic straws here.
and look at how EU mandates all websites to display a warning about cookies
what
the old crippled cum socks don't even fucking know what a cookie is
what did i missed
Actually in the UK they use biscuits
you know those "accept cookies to use the site" popups and banners?
those shits that started popping up on every site a few years ago?
well, the reason they exist is because the EU mandates that all sites have to warn the end users about the cookies
for the sake of privacy
that they need to get the consent of the end user to save cookies on their machine
sounds good on paper, right?
god
you should be allowed to opt out of tracking, right?
what are you telling now
well, nothing fucking changed
the only thing that changed was that now every site has an annoying fucking popup telling you to accept all cookies or you can't use the site
and everybody accepts the cookies because they have to, to use the site
well
the only thing that changed was that it's now way more fucking annoying to browse the internet
do you accept them without clicking on accept?
if not, you dont have to tho
i never clicked on that accept cookies button
if you want to use the site without cookies, 99% of the time you need to go into some arcane multi paged settings popup somewhere to individually toggle them off
or you just need to live with the accept cookies banner/popup forever
just accept the cookies and when you have finished cancel them...
see, this is the thing
idk if that helps that much
I didn't have to ignore this flashing fucking animated banner shit that covers 33% of the page before
I didn't have to click random ass buttons everywhere to get access to the site before
all of this is completely redundant and unnecessary
if it does that, i dont use the website
only accepted cookies on youtube, because you have to now
or you cant even access youtube website
never had that outside of google
and google can't take more data from me than they already have lol
they probably have everything about me
yeah but that's not the point
even without that fucking cookies
having access to control your privacy and cookies is good
@wraith rapids do you listen ted talks?
forcing everyone to have to click stupid buttons to use websites is not
the mandate was put in place with the pretext of privacy
because privacy is what the people want
privacy good
tracking bad
Then we got track n trace!
to use my pc i have to create a microsoft account
it didn't change anyone's life for the better
it just made the entire internet more cluttered and annoying to use
you know how much data microsoft has about me?
it's a prime example of how fucked up everything is these days
they probably know at which times i go pissing
They probably know your penis size and your dogs DNA
They would know that too 🙂
yeah probably
everything is covered in red tape and all the things that happen are made to happen just so that some corporate or political or governmental entity looks better
i mean they know at which times i use my pc
so they know for 90% at which time i'm at home
it's all just an enermous, pointless machine lubricated with shit
I laugh when people talk about their privacy. I bet they never opened up the Sceduler on their PC and checked what runs every day.
or whatever
and at the same time, people voted the "accept cookies pls" button into existence
for the very sake of privacy
i dont wanna know what these 213 processes are, running right now
I'm not sure anyone voted for it. The EU is a dictatorship
the old cum socks making the calls did
and we voted the old cum socks to be there
good old democracy
Thing is we didn;t. MEP's have zero power. all decisions are made by unelected officials in the EU
bruah
because they have no clue what that means
and they don't live anymore when shit happens
the fundamental problem with the modern world is that it's very complicated
back in the day, shit was simple
you shat some seeds into a field, and 6 months later, you went out to reap the shitty and undersized harvest
because theyre all agressive, and shit
then the king's officials would come and take half of what you have or you'd be taken behind the barn
the world exists of dumb people
Shit was only simple before the Internet because people had no clue what was really going on.
but the modern worls is super complicated
everywhere you look, it's set of complicated systems run by highly specialized people, who need a lifetime of experience and training and education to do their jobs properly
economy, logistics, politics, even the way how individual industries are run and how the world behaves
but germany is like
hey, let's implement an upload-filter, so you cannot upload stuff from other people
people cannot have those uploadfilters, because it's an fucking AI that costs so much money
it isn't physically possible for a person to understand comprehensively all of these things in a single lifetime
and a small website cannot afford that if theyre not even make profit
so people can't make well educated decisions
and since they don't understand how everything works, they're easily led astray or group under some single-issue banner
Yep, lets just ban it, then no one will do it 🙂
well
it's all going down in the next 50 years i'm telling you
i mean dude
I disagree
Fingers crossed
twitch would be dead
Big asteroid, I'm telling you!
It's especially fun because german politicians are the only people that said that there would be no upload filters
Yes
either way, everything is shit and nothing has any value
i'm content with just complaining about things because I can't fix them
fuck your shitty world, I'll just live my life and watch it drown in its own excrement from the sidelines
yeah pretty much
i won't partake in it but that doesn't stop me from being angery and complaining about it
Back in the 70-80's during the cold war (here in the UK) we had US nukes at our local air base. Everyone was fine with it as we knew if war started we'd be the first to go, so no pain there.
I got a copyright claim from using CC SA 3.0 licensed music on YT not so long ago; copyright is a joke nowadays
you know that germany helps at the war at east countries?
without germany the usa couldn't fly the drones in east
we're helping them killing civilians
good, the world is overpopulated anyway
aahhahaha
don't remind us about that
Germany is historically good at that though 😍
and parts of russia
what about south america?
Australlia too
because theyre so dumb, they cannot difference between a terrorist and a few cars of marrying people
they bombed a women, picking vegetables in their garden
LIKE WHAT TF
thats what i complain about
africa is going to be a serious issue in the future
And liveleak (the only site hosting videos of this) shut down yesterday
it's an enermous disease factory
its like the usa can say we did nothing wrong
AND GERMANY ACCEPTS THAT
the only reason we don't have 50 different kinds of pandemics and 300 more strains of covid going around right now is that what is in africa, stays in africa
theyre like
if they say they did nothing wrong, they're right
they don't have reliable means of transport to get out of the shitstain regions
but inevitably, that will change
Merkel wasn't too happy when she found the USA was spying on her phone though
in the schedule when i repeat the task how i can define the delay of the ticks
YEAH OBV
with the second parameter
because it affects jer
OOh, real questions. OTT off
but it doesnt affect her if civilians get bombed in east
that's barely a question
more like an admission of "i didn't bother to read the docs or use google"
You use the correct task, a repeating/delayed
can we move to general with this shit? lol
general doesn't exist
i dont think dev channel is the right place for politics lol
this is general now
well
I've muted general because of all the shitshow there
if you say so
post general in memes
spigotcraft is now serious, so general is now for memes, which is why help-dev is now general
Explain? You mean you want it to stop after a certain time?
no, i need what never stop
then use a repeating task
i'm confused
with the second parameter
my brain is like boom
declaration: package: org.bukkit.scheduler, interface: BukkitScheduler
like have you tried reading the scheduler documentation
Read the documentation
Ticks are 20 per second (https://hub.spigotmc.org/javadocs/spigot/org/bukkit/scheduler/BukkitRunnable.html#runTaskTimer(org.bukkit.plugin.Plugin,long,long))
declaration: package: org.bukkit.scheduler, class: BukkitRunnable
are you using BukkitRunnable or BukkitScheduler
}, 20 * 20, 2880);
god
just use a calculator if youre dumb at math
lol
it'll run every 2880 ticks with a delay of 20 * 20 ticks
The delay is the delay between the registration and the first start
what do you wanna do alejo
The period is the delay between runs
the first programming language people should learn is english
I want what have a delay of 12 hours
Thats a delay of 20 seconds, repeatign every 2.4 minutes?
Delay or period?
a delay
Bukkit.getScheduler.runTaskTimer(Plugin-Class, () -> {
//task
}, timeInTicks);```
then have ,20 * 60 * 60 * 12, 0);
if you use a calculator you can inline the maths into a single number
with this the delay is for 12 hours ?
ingles no is my native language
Yes, the delay to the first start, then it runs every tick
not 0 though, as that would repeat every tick after
sorry
god... google that lmaoi
so now take 43200 * 20
and you have your needed ticks-value
864000
I need what a task run with a delay of 12 hours
did you know that a kilogram of potatoes costs several dollars at the grocery store
am i the dumb one rn?
here you go
did you also know that a hectare of potatoes has an annual yield of about 40 tons
that's delaying your task in the time, you put in on timeInTicks
NVM
im dumb
runTaskTimer uses start, delay, but for start just use 0 i guess
did you know that fucking milk is cheaper per litre than soda drinks
Don't use task timer for something that should run only once
you know, that shit that comes out of a living animal
shouldn't it run every 12 hours?
why I can't only put }, }, 20 * 20, 2880);
that needs to be housed and fed and kept healthy
yeah okay, I'm getting confused
...
yet a bottle of fucking water and concentrated artificial flavors and shit is somehow more expensive to buy
}, 43200);
so Alejo, you want to run a task every 12 hours?
is there any event that allows me to delete an arrow when i lands?
yes
it's fucking incomprehensible
then
HitEvent. Look it up in teh javadocs
https://www.youtube.com/watch?v=QX3M8Ka9vUA @wraith rapids I think you should watch this
The global economy is in crisis. The exponential exhaustion of natural resources, declining productivity, slow growth, rising unemployment, and steep inequality, forces us to rethink our economic models. Where do we go from here? In this feature-length documentary, social and economic theorist Jeremy Rifkin lays out a road map to usher in a new ...
Bukkit.getScheduler.runTaskTimer(Plugin-Class, () -> {
//task
},0L, timeInTicks);
timeInTicks is 12 hours in ticks, so 43200 * 20
thats all you need
does it have something important or useful to say
thanks
or 864_000
He says how things should be
what does it matter how things should be
nah, it's capitalist propaganda
it doesnt matter how things should be
we can't change this collision course anymore anyway
Or communist
as long as no one does it how it should be
what matters is that shit is not as it should be
It's not impossible, this is how important it is
}, 43200 * 20, 10000); now is good ?
10000 is not every 12 hours
A Third Industrial Revolution is unfolding with the convergence of three pivotal technologies: an ultra-fast 5G communication internet, a renewable energy internet, and a driverless mobility internet, all connected to the Internet of Things embedded across society and the environment.
i hate it already
}, 0, 43200);```
0 is the time in ticks, after the task will start
so in this case, it starts instantly, and runs every 43200 ticks
We all know that nuclear power is best
and i personally don't like iot
Especially when it is used for spacecraft propulsion
we have literally not even reached true 4g yet
well look at germany's mobile internet
Why you say so? It's free energy
renewable energy? the issue is that it's not free
It's very costly
the initial investments and maintenance are significant
double that with the redundancy necessary and it comes at a cost
}, 0, 43200); with this the task repeat with a delay of 12 hours ?
Would you build a solar panel road because it gives free energy? No. It comes at a cost
oh my bad
Are you a moron
not just the solar panel, but the inverter, the battery, the mains hook, the everything
43200 * 20, my bad
How many times did we tell you it is 43200 * 20
i fucked up
Or simply 864_000
send a ss
WTF
nuclear and solar are also mutually incompatible
Then go with 864_000L
solar fluctuates continuously and significantly
use runTaskTimer instead of scheduleSyncRepeatingTask
while nuclear can't adjust its rate of production rapidly
solar fluctuates?
from day to night
I need what the task repeat multiple times
That isn't too rapid though
yeah
It is forseeable
but do you know how long it takes to drive a nuclear power plant up or down
it takes days
Though the most forseeable form of energy is tidal energy
the nuclear plants can't adjust their production rapidly enough and that will either result in net deficit or excess
Invest in that now, even though france had a monopoly on these for multiple decades with the Rance power plant
Bukkit.getScheduler.runTaskTimer(Plugin-Class, () -> {
//task
},0L, 864000);
THIS IS WHAT YOU NEED
which means that you're going to need plants that can freely adjust their output to make up for it
and //task is your task that you wanna run
and the only such plants we have right now are diesel and coal plants
whatever it is
the unintended consequence of using solar is increasing our dependency on coal and diesel plants
864_000L, best make stuff explicit
you can work with that? lol
same happens with wind as well, less so with hydro
didnt knew that
Java even accepts 1_8_55_4585 as a valid number
for renewable energy to be feasible, we need to come up with a better medium of storing energy
underscores are ignored by javac
so it would be the same like 18554585
for some areas things like dams and water pools and shit can suffice
but that's not doable everywhere
what's the difference then
and we literally don't have enough raw materials on earth to make enough lead acid batteries
it looks neat
1_000_000 is more readable than 1000000
but yeah point is that renewable energy isn't as free as people often think it to be
In the end, using energy at all is dumb
power is very cheap anyway
How is my plugin 8mbs? I just started using Spigot instead of paper and like I havent done anything that should make it 8mbs
you're probably shading in something stupidly big
Did you shade in spigot?
maven?
i think shading in spigot would result in like a 50mb jar though
That might be true
before while I was using paper it wasnt even going more than 10kb
it would only shade teh API if thats yoru depends
mmm true
Or go research better energy sources, which have the potential to fuck up something even more
once saw like a 200mb jar from a guy who had shaded in every dependency and dependency of dependency used by mojang and paper
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId>
<version>1.16.4-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>```
notice the scope
use provided wherever applicable
want me to send the jar
Just check your pom
Look at what it contains
this is my pom
hold uop
im dumb
imma paste it
oh and I get this error
from maven
- META-INF/LICENSE
- META-INF/NOTICE
- META-INF/licenses/ASM
- META-INF/maven/net.bytebuddy/byte-buddy-dep/pom.properties
- META-INF/maven/net.bytebuddy/byte-buddy-dep/pom.xml
- META-INF/maven/net.bytebuddy/byte-buddy/pom.properties
- META-INF/maven/net.bytebuddy/byte-buddy/pom.xml
maven-shade-plugin has detected that some class files are
present in two or more JARs. When this happens, only one
single version of the class is copied to the uber jar.
Usually this is not harmful and you can skip these warnings,
otherwise try to manually exclude artifacts based on
mvn dependency:tree -Ddetail=true and the above output.
See http://maven.apache.org/plugins/maven-shade-plugin/
pom looks okay at first glance, though there is something that should not be there
whats it
I'm trying to get the sent message and if it is equal to :heart: or whatever, it will display a heart. replaceAll() isn't the correct method
@EventHandler
public void onChat(AsyncPlayerChatEvent e) {
Player p = e.getPlayer();
if (e.getMessage().equalsIgnoreCase(":)")) {
e.getMessage().replaceAll(":smile:", "\uD83D\uDE0A");
} else if (e.getMessage().equalsIgnoreCase("<3")) {
e.getMessage().replaceAll(":heart:", "❤️");
}
}
Strings are immutable
?
whats not suppose to be there
i. e. use e.setMessage(e.getMessage().replaceAll())
ah k
ignore it, I might have said something dum
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
</resources>
gives me concerns, though it is likely needed
Ok so now I opened the jar as a rar file
and?
what is yoru package? com or net?
what is within the com and net folder?
oh, are you using Intelij? and Artifacts to build?
Wdym by artifacts?
Artifacts on teh left to build
on the right hand window?
Yes
what?
do you have any manually imported libs?
spigot bot warned me for spam
I do not believe so
I just added the protocollib dependancy
and added a update checker
Yeah, don;t do that
what can I do instead?
all libs you add in your pom.
you didn;t manually add any? Can you SS your dependencies in IJ?
nvm I did not put
<scope>provided</scope> for protocollib
in the pom
so it probably just downloaded it all
Sounds likely
its back to 6 kbs now
You did in the pom you sent to us
shh its fixed 🙂
Yep
fixed is fixed and nothing matters from now on
oh cool the maven error is gone too
difference of ReplaceALL and Replace?
replaceAll uses regex
How can I see if a plugin is enabled
From code?
without using depend
iirc Bukkit.getPluginManager.getPlugin(name) != null
Thanks
That may only be loaded, you might also want to check isEnabled
regex?
Ok so
if(Bukkit.getPluginManager().getPlugin("ProtocolLib") != null && Bukkit.getPluginManager().getPlugin("ProtocolLib").isEnabled())
?
new UpdateChecker(this, 91846).getVersion(version -> {
if (!this.getDescription().getVersion().equalsIgnoreCase(version)) {
logger.warning("There is a new update available. Please install it as soon as possible from the spigot page!");
}
});
``` how can I make it so it waits for the UpdateChecker to be done to continue?
It already does that if its on the main thread i believe
would ScoreboardManager manager = Bukkit.getScoreboardManager(); Scoreboard board = manager.getNewScoreboard(); Objective obj = board.registerNewObjective(String.valueOf(game.getId()) + "-arena", "dummy"); Score score = obj.getScore(ChatColor.GOLD + "One In The Chamber" + ChatColor.RED + " ID: " + game.getId()); score.setScore(0); System.out.println("SETTING SCOREBOARD"); for(int i=0; i<game.getFightersInGame().size(); i++) { Fighter f = game.getFightersInGame().get(i); Score score1 = obj.getScore(ChatColor.YELLOW + f.getName() + ": " + fighter.getKills() + " kills"); score1.setScore(i+1); } player.setScoreboard(board); work or would i need to use the third argument 100%?
It doesnt
the update respond comes like 5-6 seconds after the server is already started
and everytthing is done
after that
CompletableFuture?
You must be running it in a task or async?
Oh yes
The home of Spigot a high performance, no lag customized CraftBukkit Minecraft server API, and BungeeCord, the cloud server proxy.
getVersion waits for server to startup
I wouldnt advise for you to hault the server for it to complete... why would you want to?
?
but I just want the plugin to continue after the response is there
mhmmmhmm
You don;t prevent yoru plugin loading if there is an update.
you update check and notify them there is an update when teh response comes back
like there is a update or not
Thats not a very conventional way to do things
I advise against it
It means almsot nothing
If you prevent yoru plugin starting until it has a response your plugin will fail to start if there is any internet issues.
I do not want that