#help-development
1 messages · Page 2297 of 1
thats not gonna cause a npe
Its string.. Im only getting player name
Can I send you to PM?
just chuck it in a pastebin
doesnt really say
either Main.Database is null or e.getWhoClicked()
btw Main.Database is incorrect naming conventions
assuming that line is GUI:512 right?
so it must be Main.Database is null
or something in the prepareStatement is throwing
Eh.. I must check whole code probably.. anyway thanks for help 🙂
just tried
String aux = "";
for(int i=0;i<str.split("\n").length; i++) {
aux += str.split("\n")[i];
if(i < str.split("\n").length) aux += "\n";
}
return aux;
And got the same outcome 😦
idk why it doesn't want to do the line break lol
I feel like it has something to do with the string, maybe I can't use the color code and line break at the same time (?)
linebreak doesnt work for chat
it does
String a = "Hello blablabla {0} welcome on my server".replace("{0}", "\n");
p.sendMessage(a);
try this
doing sender.sendmessage("one line \nanother line") works
I'll try the situation with the color code and line break and then that
yeah that worked lol
I don't understand why it didnt work just with the \n directly lol
thanks (:
idk.. 😄 np
how old we talkin? i remember this behaviour since at least 7 or 8
If I have a custom entity and set it to persistent, will it stay loaded even with nobody in the chunk with it?
While it def uses the StringBuilder instance now I'd Not be Sure how efficently it uses it
Doesnt jit optimize it?
Since it only append chances are it goes smart about it
JIT does not optimize the object allocation Overhead of short lived objects from my experience
Hmm maybe Im thinking about a general jvm optimization of string concats then
I need Vein miner for 1.19 and I can’t find it
hello i was reading this
https://www.spigotmc.org/threads/creating-a-sphere.146338/#post-1553342
and i had a question
what will the arraylocation do
It probably works already on 1.19
Just use the latest build and you are fineee
its just an incrementing Index
oh ok
thanks
now i will go and cry about the fact that i understood nothing from the math
Does anyone know if the ProxyServer.getPlayer(UUID) can return null?
yes
if a player with that uuid does not exist (not online)
ok thanks
Check the nullabillity annotations
what are these LEGACY materials in spigot ?
pre 1.13
how can i send a updating message 15 times without doing 15 runTaskLater
15 times over a period?
i need send it every 1 second
You use RunTaskTimer so it repeats
so is LEGACY_IRON_INGOT the same as IRON_INGOT ?
keep count in teh task of how many times it has repeated
then this.cancel() when finished
and how can i make the updating message
Legaacy materials are used when you forget to put a valid API version in your plugin.yml
so is there anyway so i can support multi version material support without XMaterial ?
Probably, but I've never tried
Bro
does anyone know how i can simulate killing an entity with a looting weapon?
or alternatively how i can make it so LivingEntity#attack() always attacks with a full "attack cooldown"
guys will 8000 objects with a string and a byte in it in a set cause any problem ?
if you're trying to do something like storing a bunch of byte values under a string id why arent you using a map
a set
two byte values might be needed
Set<MyObject>
MyObject
byte anotherThing;
byte moreThings;
somemethods
and maybe call the methods on the command
maybe i could just
Map<String, MyObject>
yeah
will map cause any problem ?
Are you adding to the set in the command
Or just using contains() on it?
A HashSet uses a HashMap anyway fyi
If there will be a problem, map is most probably not the cause
With a Set??
I'm trying to change the effectiveness of the respiration enchantment with a plugin. I found the code in nms that handles respiration (m() which is actually getNextAirUnderwater inside EntityLiving), although I can't figure out a way to bypass it/change it. Is it possible to change this method during runtime, or do I need to use a different approach
Map
Yeah should be fine using remove, put and containsKey
I wanted to publish my plugin (basically a LIB) to maven central so that I don't need to shade it in, however they discourage using <repositories>, is it fine even if I just publish?
<repositories>
<repository>
<id>spigotmc-repo</id>
<url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
</repository>
<repository>
<id>sonatype</id>
<url>https://oss.sonatype.org/content/groups/public/</url>
</repository>
<repository>
<id>placeholderapi</id>
<url>https://repo.extendedclip.com/content/repositories/placeholderapi/</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>
<dependency>
<groupId>me.clip</groupId>
<artifactId>placeholderapi</artifactId>
<version>2.11.2</version>
<scope>provided</scope>
</dependency>
</dependencies>
```This is my repositories/dependencies
Assuming the underlying hashCode implementation isnt shit
Suggestion: use remove rather than containsKey, so you can get and remove, and then just check if the returned value is not null
remove rather than containsKey?
Do you mean get() + null check instead of containsKey?
Hmm yes but contains doesnt remove
Else sure if you’re gonna remove something use remove 👍
if (map.containsKey(key)) {
Object value = map.get(key);
map.remove(key);
}
can be simplified to
Object value = map.remove(key);
if (value != null) {
// do stuff
}
I think you're talking about just normal concatenations
1 call vs 3
They’re not necessarily equivalent
how not?
In a multithreaded scenario they might yield different results
i mean the underlying implementations arent the same but the 2nd method is certainly better
Additionally, the contains check is redundant
and using != null in the latter example wouldnt tell you if the value was null
Altho adopting null in data structures is a sin
Indeed
What scenario for the need of nullable
ConcurrentHashMap uses it iirc for some internal atomic reasons
but else its pretty much always discouraged
Or do you mean the Optional?
You can do some eventhandler kind of shit on ‘EntityAirChangeEvent’
Probably if you wanna more expressive in terms of absence of values
Rather than using null
oh I didn't see that on the event list the first time, thanks
Map<Customer, PaymentMethod> map;
PaymentMethod method = map.get(customer);
if (method == null) {
// Well the payment method is null, but does the map at least have this customer registered?
// This results in one extra check, map#contains().
}
Map<Customer, Optional<PaymentMethod>> map;
Optional<PaymentMethod> methodOptional = map.get(customer);
if (methodOptional == null) {
customer.send("You are not registered to our program!");
return;
}
if (!methodOptional.isPresent()) {
customer.send("You have not created a payment method!");
customer.send("Defaulting to VISA...");
}
PaymentMethod method = methodOptional.orElse(PaymentMethod.VISA);
// ... //
My argument for this would be to check if the customer is registered through other means
how so
Well, null is a sin I think thats where Imajin is getting at mostly
It is hideous because null inherently cannot be expressed in type level
There is Void for that more or less
Whut
Void is an inflexible option Id say
But that is a Hacky workaround
How is dat relevant
tbh languages that have good null support are good
you wouldnt store Void in a map
kt is a good start, it is null-safe
You dont have absence and presence derivatives of an optional type with Void for instance, not that Optional actually has that either but whatever
Rust
yes but kotlin doesnt have null the same way java has it
Kotlin expresses null in types
I store a hashmap in a hashmap of lists of hashmaps
which is the good way
With presence and absence derivatives of nullable types
The info on whether a customer is registered or have a payment method shouldnt be expressed through a single map like this imo
bast
bast con rust
(play on words, sounds like "stop, stop with rust")
Example code
Kotlin essentially uses java Optional, just has syntactic suger for it in some aspects
that's the good way
Yes
HashMap<Object, Void> is a fully viable alternative to HashSet<Object>
Why you would want to do that is beyond me regardless
but usually when point at null/nil we mean the value
Which often ends up trolling us
Kotlin got it figured out tho :>
As well as some other cool languages, not Java tho
But why is there such a design choice?
java is a base, and other languages just build on top of it
I know js has that
js has null, undefined, [], {}, NaN etc
java is basically "Yo we made really cool vm, our lang sucks"
Well no one was able to predict that the representation of absence in a language at value level was gonna lead to deplorable frustration
NaN is a floating Point standard
yes
but you get the point
JS has 15 ways to say something doesn't exist
including void
I meant in js there is a difference when a variable is declared undefined then unassigned kind of undefined
Half of those actually mean something else
[] {} have values no?
JavaScript is messy and will probably stay messy due to retro compat
Enlighten me
not when empty
empty array
Altho it has introduced better features in newer versions
I mean it is a value effectively but doesnt contain any values 
yea
Then js tried to have these values to be falsy
Baffling
wtf
FFS 80% of stacktraces people send me is because they disable AE at runtime and then wonder why AngelChest throws exceptions...
Stupid people
why do you throw stack traces
They have stupid brain
oh

no, that'd be a pain in the ass
bro it's an if statement
No it is partially your problem tbf
i hope thats sarcasm
I mean you could tell them in the console
it's not. When people use Plugman to disable a plugin that other plugins softdepend on, it's their problem
If they wanna disable a plugin, they should restart the server and remove it properly
Users always prefer a more direct info/steps to follow
Oh
LOGGER.error("You dumdum dont use plugman and dont just yeet plugins, now this plugin wont work >:(") or sth
if i take the carberator out of my car while its running what do ppl expect it to do to the other components of the car
like what do u expect
boolean isAdvancedEnchantsInstalled;
if (isAdvancedEnchantsInstalled = (Bukkit.getPluginManager().getPlugin("AdvancedEnchantments") != null)) {
// do stuff
}
yeah I'll do that. Including the insult lol
make the insult very mean
Ok then it is not your fault nor the users fault
"Stupid dumbass quit disabling plugins at runtime"
no. I only wanna check once. I don't wanna worsen performance for "normal" users
actually, just run that check only if plugman is installed
since plugman can't really disable itself
or
Wait cant it?
it can't
Lol
it blocks you
Insult realEntity303
if (plugMan.isInstlalled()) disablePlugin()
it would have to check this for every inventory slot on every death. So yeah, not very often but still, I don't see a reason to do this. People cannot expect to just e.g. disable WorldEdit and then expect all plugins to check "is this plugin STILL installed?" everytime
"[PlugMan] this plugin cannot be disabled" or smt
If a plugin is enabled on startup, it should keep stay enabled until shutdown
if not, the admin is stupid
just run the every time check if plugman is installed
otherwise don't
punishment only for plugman users
wait
wait
PlugWoman exists
^^?
yes
wtf
Wtf
bahahahaa
idr
Its better because it does a recursive reload at least
plugman doesn't?
We gonna meme spigot plugins now eh
Dont think so
on it
At least I experienced a wholesome classloader fucketry with it
fun fact - don't google "plug woman" and then click on "images"
bet
💀
haha
What does it show
nice
Women or plug
well
plugs with diamonds etc
What>
lol
imma need some strong ones for this
wtf
I'll just
it opens up like a inch
commit oof
help-development
trivia
Especially at night times lol
Excuse me what the fuck
how do I use libraries
step 1: leave your house
Which ones? The ones that are plugins or the ones that are not plugins?
jda
i mean if theyre plugins that means theyre apis arent they
cause my plugin is 17mb
They offer apis then probably, but hopefully an api is offered regardless
They have An API just add it as dependency
wihy if its jda you might wanna shade it
To make sure a class is present when you need it
Assuming no one else provides it to the jvm
so that u dont get ClassNotFoundException
lol
Hmm right
and i dont think the server owner will have it in their server
Thats actually for reflection
Oh righy
You’d get a NoClassDefFoundError
But pretty much identical ye
what does it mean?
It's currently a maven dependency in my plugin
Shading means that you include the classes of the library in your own jar
classnotfoundexception isnt only for reflection tho
Oh so only the classes I need instead of implementing everything?
Might be class loading also idr exactly
Well, there are two types of dependencies
yeah
its as of version 1.4 i believe
Those that are needed at compile time. That is when you write the code in your ide, and then those at runtime which is that the classes you’re using during when the server is running
As some jar must provide the classes so the jvm knows how everything works
Normally you set the scope to provided for lets say placeholder api or spigot api
But thats because other jars are including them (as the classes of spigot and placeholderapi) at runtime
so that's what it means?
Yes it means you are only depending on the dependency at compile time, merely to make the classes visible in your ide
If I wanted to make my plugin weight less, how would I go about doing so?
But the classes of the dependency wont be included in your jar because some other jar will probably include them and load them in
You could add jda as a library in your plugin yml I believe?
Yes that's what I was asking in the first place
I tried but it didn't seem to work
do I add a library and remove the dependency?
how does it work
You have the dependency set to scope provided
In your pom xml
And then you add it under libraries in plugin.yml
As such
Nice
Test if it actually works :>

Keep in mind that will only work on modern versions
My server is 1.17 - 1.19 so it's fine I think
Yeah that's fine
kk what do i change
settings:
debug: false
sample-count: 12
bungeecord: false
player-shuffle: 0
user-cache-size: 1000
save-user-cache-on-stop-only: false
moved-wrongly-threshold: 0.0625
moved-too-quickly-multiplier: 10.0
timeout-time: 60
restart-on-crash: true
restart-script: ./start.sh
netty-threads: 4
attribute:
maxHealth:
max: 2048.0
movementSpeed:
max: 2048.0
attackDamage:
max: 2048.0
log-villager-deaths: true
log-named-deaths: true
messages:
whitelist: &4&l Server under mantainance! Please come back on july 25th 16PM CEST!
unknown-command: Unknown command. Type "/help" for help.
server-full: The server is full!
outdated-client: Outdated client! Please use {0}
outdated-server: Outdated server! I'm still on {0}
restart: Server is restarting
advancements:
disable-saving: false
disabled:
- minecraft:story/disabled
players:
disable-saving: false
commands:
spam-exclusions: - /skill
silent-commandblock-console: false
replace-commands: - setblock
- summon
- testforblock
- tellraw
log: true
tab-complete: 0
send-namespaced: true
world-settings:
default:
hopper-can-load-chunks: false
below-zero-generation-in-existing-chunks: true
verbose: false
entity-activation-range:
animals: 40
monsters: 60
raiders: 70
misc: 15
water: 16
villagers: 45
flying-monsters: 24
wake-up-inactive:
animals-max-per-tick: 4
animals-every: 1200
animals-for: 100
monsters-max-per-tick: 8
monsters-every: 400
monsters-for: 100
villagers-max-per-tick: 4
villagers-every: 600
villagers-for: 100
flying-monsters-max-per-tick: 8
flying-monsters-every: 200
flying-monsters-for: 100
villagers-work-immunity-after: 100
villagers-work-immunity-for: 20
villagers-active-for-panic: true
tick-inactive-villagers: false
ignore-spectators: false
entity-tracking-range:
players: 48
animals: 48
monsters: 48
misc: 32
other: 64
ticks-per:
hopper-transfer: 8
hopper-check: 1
hopper-amount: 1
dragon-death-sound-radius: 0
seed-village: 10387312
seed-desert: 14357617
seed-igloo: 14357618
seed-jungle: 14357619
seed-swamp: 14357620
seed-monument: 10387313
seed-shipwreck: 165745295
seed-ocean: 14357621
seed-outpost: 165745296
seed-endcity: 10387313
seed-slime: 987234911
seed-nether: 30084232
seed-mansion: 10387319
seed-fossil: 14357921
seed-portal: 34222645
seed-stronghold: default
hunger:
jump-walk-exhaustion: 0.05
jump-sprint-exhaustion: 0.2
combat-exhaustion: 0.1
regen-exhaustion: 6.0
swim-multiplier: 0.01
sprint-multiplier: 0.1
other-multiplier: 0.0
max-tnt-per-tick: 100
max-tick-time:
tile: 50
entity: 50
growth:
cactus-modifier: 100
cane-modifier: 100
melon-modifier: 100
mushroom-modifier: 100
pumpkin-modifier: 100
sapling-modifier: 100
beetroot-modifier: 100
carrot-modifier: 100
potato-modifier: 100
wheat-modifier: 100
netherwart-modifier: 100
vine-modifier: 100
cocoa-modifier: 100
bamboo-modifier: 100
sweetberry-modifier: 100
kelp-modifier: 100
twistingvines-modifier: 100
weepingvines-modifier: 100
cavevines-modifier: 100
glowberry-modifier: 100
merge-radius:
exp: 6.0
item: 4.0
item-despawn-rate: 6000
view-distance: default
simulation-distance: default
thunder-chance: 100000
enable-zombie-pigmen-portal-spawns: true
wither-spawn-sound-radius: 0
arrow-despawn-rate: 300
trident-despawn-rate: 1200
hanging-tick-frequency: 100
zombie-aggressive-towards-villager: true
nerf-spawner-mobs: false
mob-spawn-range: 6
end-portal-sound-radius: 0
worldeditregentempworld:
verbose: false
config-version: 12
stats:
disable-saving: false
forced-stats: {}
ye what is it tho
help
i sent
@eternal oxide how do i dix it
Also don't put "" in the middle of your message
you only have a single space indent on each of the messages: entries. yaml requires multiple of 2
And have patience
wdym
- use the right channel
You have single space indenting on the whole file
and what does this do
??
whitelist: &4&l Server under mantainance! Please come back on july 25th 16PM CEST!```This is indented by a single space
You put your config there instead of flooding chat
|I think
I put it there
now what
perhaps not, Discord formatting
so what do I change
kk done
This channel is for teh development of plugins
install IntelliJ (or eclipse if you're into BDSM, or Netbeans if you're from kangaroo country) and start coding, then you're in the correct channel
I like me a little leather
EntityPlayer npc = new EntityPlayer(nmsServer, nmsWorld, gameProfile, new PlayerInteractManager(nmsWorld)); at the PlayerInteractManager you must use EntityPlayer. A few years ago this was not like this. Does someone know how to do this now?
EntityPlayer? Are you still on 1.16 or older?
It's called ServerPlayer in mojang mappings
okay
Is there a way to fix corrupted plugins?
there is no server player
I am using gradle and have installed buildtools
pretty sure that gradle should also be able to remap
if you use mojang mappings, everything will be so much easier
ima check the link out
and you dont need to adjust your code for every new version
its only for maven :/ no idea how it works in gradle
i guess you can use every maven stuff in gradle
Does anyone know if there a way to fix corrupted plugins?
you just need to translate it ig
fix what
yeah but spigotmc officially only provides a maven plugin to remap stuff
there definitely is a gradle plugin that does the same thing but no idea whats it called. for maven it's the "specialsource" plugin
You should add a properties to that tutorial so you only have a single point to edit for version https://paste.md-5.net/oxotucewis.xml
good idea
someone add this to my todo list pls lol
I forgot my password
lol
on my server I just ping @Todo and then someone else adds stuff
😄
so is there any way for gradle @tender shard ?
I don't know
I never voluntarily used gradle so I don't know much about it
well
I am sure that gradle has sth like the "maven-exec-plugin"
so you can just run nthe special source jar manually
1 sec
?remapping
?1.17
Install 1.17 with BuildTools: https://www.spigotmc.org/wiki/buildtools/
Spigot is Maven. Paper is Gradle. I believe they have somethign called Paperweight for mapping
yeah but doesn't that also require to use their API that deprecates every method and even removes some?
Never used it and no idea how though. Also Paper is a fork so not much support for it in here
just undo their patches 
If using Spigot and NMS its probably best to stick with Maven
just make gradle execute those commands from the screenshot after "packaging" your jar
private HashMap<UUID, Long> cooldown = new HashMap<>();
public void onAsyncPlayerChatEvent(AsyncPlayerChatEvent e){
Player p = e.getPlayer();
if (!cooldown.containsKey(p.getUniqueId())) {
cooldown.put(p.getUniqueId(), System.currentTimeMillis());
return;
}
long timeElapsed = System.currentTimeMillis() - cooldown.get(p.getUniqueId());
if (timeElapsed >= getConfig().getInt("chat-cooldown")) {
cooldown.put(p.getUniqueId(), System.currentTimeMillis());
return;
}
int remaining = getConfig().getInt("chat-cooldown");
e.setCancelled(true);
p.sendMessage(Long.toString(timeElapsed));
Utils.color(getConfig().getString("chat-cooldown-reached").replace("%seconds%", String.valueOf(Math.round(remaining/1000))));
}```
any idea why i can still spam on chat?
huh? i am using spigot with gradle
Another one that uses the cooldown tutorial
ofc you can, it's just that all those useful things like the specialsource plugin naren't providedd for gradle
cooldown tutorial?
is that a problem?
Not really
just use my Cooldown class 😛
https://github.com/JEFF-Media-GbR/JeffLib/blob/master/core/src/main/java/com/jeff_media/jefflib/data/Cooldown.java
is chat cooldown time (config option) in seconds or milliseconds
milliseconds
What value is getConfig().getInt("chat-cooldown")?
3000
why are you returning if the map doesn't contain the UUID yet?
Not using TimeUnit :(
currentTimeMillis
also your cooldown thing should be a separate class / object
Ah the time they can chat again
lol right
Im sorry just awake and it's 12 am smh
the whole listener doesn't run lmao
why the fuck did discord think yeah let me edit that to add a ping
fuck this stupid ass platform
ohhhh yeah thanks xD!
public class Ender {
private static Main main;
public static void setup(Main Main){
main = Main;
}
public static void teleport(Entity e){
}
}
``` is this kind of class ok?
probably changed name as he got so many pingsd
No

?di
Guide to dependency injection: https://www.spigotmc.org/wiki/using-dependency-injection/
I smell static abuse
ye
he was only on github IIRC
I pinged him there all the time until I switched to javax annotations
Oh right on chocos gh thing
Nonnull
@EventHandler
try reading point 1
Oh it doesn't do it on mobile
@fresh templethandler
Hahaha
did it to me on mobile
@fresh templethandler
Tf
Lmao
@eventhandler
maybe it's different between ios / android
@fresh templetHandler
I want to kill aitocorrection
ios superior, we can @fresh templethandler all the time
im just on it to try it out 😞
how is that? without static i'd have to create the class once and share with parameters for each class
Never
might switch to a pixel or something after
Ngl the pixels do look nice
What the
If you ever only need one instance, no problem to make it static. However the "setup" method is fucked up
is there a way to get newstate's drops in BlockGrowEvent?
I go back to sleep i woke up and just needed to we ewhat yall doing
just do a private static final field of your main instance
sometimes its actually great, because usually when your screen is horizontal and you type something the keyboard covers the whole screen

10% left and I don't have a proper USB-C cable with me 🥲
I hate discord on phone
the worst was when android used to show a whole screen dedicated to a textbox and the keyboard
Erheblicher Energieverbrauch 💪
yeah fuck discord D:
ha, imagine not being a magsafe user
aber wirklich
so umm now I have this
private HashMap<UUID, Long> cooldown = new HashMap<>();
@EventHandler
public void onAsyncPlayerChatEvent(AsyncPlayerChatEvent e){
Player p = e.getPlayer();
if (!cooldown.containsKey(p.getUniqueId())) {
cooldown.put(p.getUniqueId(), System.currentTimeMillis());
return;
}
long timeElapsed = System.currentTimeMillis() - cooldown.get(p.getUniqueId());
if (timeElapsed >= getConfig().getInt("chat-cooldown")) {
cooldown.put(p.getUniqueId(), System.currentTimeMillis());
return;
}
int remaining = getConfig().getInt("chat-cooldown");
e.setCancelled(true);
p.sendMessage(Long.toString(timeElapsed));
Utils.color(getConfig().getString("chat-cooldown-reached").replace("%seconds%", String.valueOf(Math.round(remaining/1000))));
}
and it only responds the number instead of the whole message from config, and instead of showing how much time is remaining, it actually shows it going up until it reaches 3000
bump
Get the state one tick later
the only message ur sending is a number
wait what why where
well then I'd be even more fucked. Right now I can at least use a normal USB-C to USB cable so I can charge at least a tiny bit 😄
thanks
which line is it xD
Might need to get the whole Block again doo idk if Block instances live updates
u have one sendMessage call snd its Long.toString
Too*
shit i found the problem thx xD
mac is so beautiful compared to windows
mac is better looking than a lot of things
it doesn't even have any activation thing 🥲
at least windows11 is not that bad
lol 11 is terrible
win 11 sucks. You cannot even drag and drop to taskbar lmao
i think the first thing i said when i booted into windows 11 was "wow, this looks like macos"
I stay on 7 as 10 and 11 are so bad
rounded corners out the ass
yep
7 is still widely used by a lot of people
gone are the days of rectangles ☹️
public class Ender {
private final Main main;
private static Ender ender;
private Ender(){
main = Main.getInstance();
}
public static Ender getInstance(){
if(ender == null){
ender = new Ender();
}
return ender;
}
public void teleport(Entity e){
}
}
``` is this ok
7 rocks, you update to just before they added all that upgrade nag shit, then disable all updates
no? Now you need an instance
but the looks and animations are better than w10
private static final Main main = Main.getInstance();
on Mac, IntelliJ supports several projects in tabs / in one window :3
i turn off any animations the second i first boot into my OS
do it like this @quiet hearth
I thought we cant do that xD thanks
how? I only have 2 options but no "disable"
although funnily enough a certain microsoft app will break if u turn off ALL animations (im looking at you, [Xbox] Insider)
technically i just have it set to linear
but i basically consider that off
ah kk
this was the worst half an hour wasted of my life btw, just wanted to enroll in RTX bedrock beta and it xbox insider kept crashing when i hit enroll or whatever because i had animations turned off in windows performance settings
oh wow, all these years and I never knew teh snipping tool was in Win 7
Ofc
snipping tool my beloved
discord shows all the emojis so tinny, you gotta send them to see what they are actually like lol
Shift+Cmd+4 ❤️
cmd+shift+5 >
I like the 4 version better
4 is just for selection area isnt it
5 is effectively the equivalent to win shift s
I think Cmd+Shift+5 is the only thing I ever used the touchbar for lol
nvm

LOL
cries in 2013 macbook air 🥲
no touchbar for me
just an expensive lap heater
Touchbar is sooo useless
Well its fancy to have but thats it
Oh no
Probably lmao
I have a piano app for it
But its hard to hit the black keys
Theyre too small
When i got my new apartment i finally have enough space for my real piano
Right now its at my parents
private HashMap<UUID, Long> cooldown = new HashMap<>();
@EventHandler
public void onAsyncPlayerChatEvent(AsyncPlayerChatEvent e){
Player p = e.getPlayer();
if (!cooldown.containsKey(p.getUniqueId())) {
cooldown.put(p.getUniqueId(), System.currentTimeMillis());
return;
}
long timeElapsed = System.currentTimeMillis() - cooldown.get(p.getUniqueId());
if (timeElapsed >= getConfig().getInt("chat-cooldown")) {
cooldown.put(p.getUniqueId(), System.currentTimeMillis());
return;
}
int remaining = getConfig().getInt("chat-cooldown");
e.setCancelled(true);
timeElapsed = remaining - timeElapsed;
p.sendMessage(Utils.color(getConfig().getString("chat-cooldown-reached").replace("%seconds%", String.valueOf(Math.round(remaining/1000)))));
}```
last thing for cooldown
turns out it doesnt work correctly and when i am on cooldown and i send a message it actually cancells the event but doesnt say anything except for this error in the console https://pastebin.com/wARyV11H
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
How to check if player has no permissions
in a command:
if(sender.hasPermission("permission.node")){
//do something
}else
//show error
}
do if(sender.isOp()) instead of hasPermission
because technically op gives all permissions
and have permissions
oh
tried this
doesnt work
you pinged a notnull guy
so .isEmpty()
boomp
Why? o0
Just do size() if you need the „length“
alr







