#development
1 messages · Page 115 of 1
That is not what i mean.
If i have 6 players online
And i have for example 3 teams
I want 2 people per team
ah the max teams is set else where
#The settings for the teams. (CASE SENSITIVE)
Team_Settings:
Rood:
Name: 'Rood'
Prefix: '&7[&cRood&7]'
Tab: '&7[&cR&7] &c'
Display: '&cRood'
Block: 'REDSTONE_BLOCK'
Title: '&7Team &c&lrood'
Slot: 10
Lore:
- '&7'
- '&7Klik hier om team &cRood &7te joinen!'
Blauw:
Name: 'Blauw'
Prefix: '&7[&9Blauw&7]'
Tab: '&7[&9B&7] &9'
Display: '&9Blauw'
Block: 'LAPIS_BLOCK'
Title: '&7Team &9&lblauw'
Slot: 13
Lore:
- '&7'
- '&7Klik hier om team &9Blauw &7te joinen!'
Groen:
Name: 'Groen'
Prefix: '&7[&2Groen&7]'
Tab: '&7[&2G&7] &2'
Display: '&2Groen'
Block: 'EMERALD_BLOCK'
Title: '&7Team &2&lgroen'
Slot: 16
Lore:
- '&7'
- '&7Klik hier om team &2Groen &7te joinen!'```
Yes
Now you see how en what
int teammax = config.getteams.size();
int playerarrayslot = 0;
int teamnum = 0;
boolean finished = false;
while (!finished) {
if (teamnum == teammax-1) {teamnum = 0}
teams.putplayer(queuedPlayer[playerarrayslot],teams.getTeamname(teamnum));
if (playerarrayslot == queuedPlayer.length+1) {
finished = true;
}
playerarrayslot++;
teamnum++;
}
@sharp cove something like this.
this works if you dont set a players team right when they join the game
Havn't made plugins in a while, if I create a 1.18.1 plugin I need to build it with java 17 right? Or is it just server-sided at runtime
Well you don't have to, but there's no reason not to (unless you want backwards compatibility)
you would have to build it against whatever the highest java level is required based on what you have done.
if your using the mojang mappings for nms stuff then you would require 17
^
if your using a newer java feature such as multiple arguments in switch cases then it would be either 11 or 14
i cant remember
But if I build it using java 17, all servers that run it need java 17 right? Or do they also need java 17 for servers in 1.18.1 even if I built the plugin using Java 11?
case string1,string2:
instead of
case string1:
case string2:
yes
Ik that in Java 11 you can create immutable lists, so I've been using J11 instead of 8 when I have to use Java
To which part? All servers running 1.18.1 need java 17 installed?
Mc 1.18 requires Java 17 anyway
if you build your plugin against java 17 then servers would require that too
Server sided or client sided though
Server side
both
Though clients should automatically have it installed
yeah minecraft client installs java 17 in some weird way
i remember the days before mojang included java in their launcher
Paper's new way to download the API is so confusing lol
I think this is the correct url but not sure https://papermc.io/api/v2/projects/paper/versions/1.18.1/builds/145/downloads/paper-1.18.1-145.jar
For some reason IntelliJ can't set it up automatically
tf
But
Oh bruhhhh
Where's that?
ofc... Oh my
It's been too long since I used paper lol
So it's not destroystokyo anymore?
Nope. They moved from 1.17 iirc
IntelliJ still thinks it's destroyerstokyo for some reason
change repository
I want to copy a block and include the meta data. But I don't get how it works and google isn't very helpful. What I found is what I already knew, "Add a string and a boolean". What do they do though, and how do I use them?
Is possible to access this field https://hub.spigotmc.org/stash/projects/SPIGOT/repos/craftbukkit/browse/src/main/java/org/bukkit/craftbukkit/CraftSound.java?at=refs%2Fheads%2Fversion%2F1.9.4#456 trough org.bukkit.Sound or I need the NMS class?
on 1.13 Sound implements Keyed and I can use that, but on older versions there's no such thing
😂
I have a option that people can vote on maps for a game. The user of the plugin van decide himself how many maps there are in the plugin. And i want to get the map with the highest vote.. how can i do this?
You can access the votes by: OorlogSimulatie.instance.kgetWorldManager.getWorld(world).getVotes();
Please @ me if you have an idea
@lyric gyro I got it working, had to use CraftSound
val craftSound = ServerVersion.getCraftClass("CraftSound")
val field = craftSound.getDeclaredField("minecraftKey")
field.isAccessible = true
return craftSound.enumConstants.map { field.get(it) as String }```
yeeee
Hmm, wonder if is enough to catch ReflectiveOperationException 🤔
@pulsar ferry thoughts?
😅?
How can i make my block break event override Factions UUID? I tried load first and event priority highest
Make your plugin load after Factions UUID, unless you mean cancelling the block break event?
What im trying to do is allow break of a specific block inside warzone
I depended on Factions but it still says i cant break
Hi um so i have this weird thing to where when the entity takes damage, instead of replacing its name it just adds on to it...
heres code
double damage = event.getFinalDamage(), health = entity.getHealth() + entity.getAbsorptionAmount();
if (health > damage) {
// If the entity survived the hit
health -= damage;
entity.setCustomName(color(entity.getName() + " &r&c" + (int) health + "/" + (int) entity.getMaxHealth() + "❤"));
}
Whats your question?
like
whenever i punch a zombie
it just adds a #/# health thing
every time it takes damage
instead of replacing
the entire name
ok, one thing it may be is you dont have to cast int since it is a string anyways
ok ill try that
nope that made it worse now its showing massive decimals
lol
perhaps setCustomName is bugged
mabye
what server jar are you using for your test build?
not for the build but the test server
paper
well, you do have entity.getName() + " text"
what about entity.getName()?
couldnt you just do setCustomName(ChatColor.translateAlternateColorCodes('&',entity.getName() + " &r&c" + (int) health + "/" + (int) entity.getMaxHealth() + "❤"))
or Wither Skeleton
yeah
but the colors work anyways
what does your entity's name look like when you hit it a few times
exactly what it looks like
ok
wait
put it in text, not just a description
ok
"Zombie 19/20 18/20"
thats when i hit it 2 times
try using setCustomName(ChatColor.translateAlternateColorCodes('&',entity.getName() + " &r&c" + (int) health + "/" + (int) entity.getMaxHealth() + "❤"))
thats just weird tbh
idk why its happening
idk if this causes it but
When i downloaded 1.18 for spigot developing
on there
bc i dont use maven yet
but anyways
use maven or gradle
it doesnt even allow me to import JavaPlugin
so it doesnt work
im gonna remove it and retry and see if that works
but its super weird
imma switch to it when this is done im just making it on eclipse before installing inteliji
Any ideas for this?
how do you know if the player is inside warzone?
set your blockbreakevent's priority to highest and then check if your in warzone, if so e.setcancelled=true
before you setcancelled to true check if e.getblock.gettype is equal to that block type you want
Ik they are in warzone bc im in warzone. But i have it set to highest and ignore canclled. and it works find when op, it sounds the boolean, but if im not op it doesnt even run the event
no, i mean how does your plugin know that they are in warzone
im pretty sure they meant in spigot when there checking
Faction f = Board.getInstance().getFactionAt(fl);
Faction warzone = Factions.getInstance().getWarZone();
System.out.println(f.equals(warzone));
if(f.equals(warzone)) {
e.setCancelled(false);
}```
and it souts true if im opped
whats your breakblock listener like?
wym
would mabye changing spigot versions work?
you could do
like instead of running buildtools latest mabye 1.18.1?
and then it actually works or smth
I check if the block is null, or if the type isnt Sugarcane and if so return, then i get the item in hand and get its nbt and if it has a specific nbt tag i run that code there
do you check it all in 1 if statement or multiple?
1
if(p == null || hoe == null || !e.getBlock().getType().equals(Material.SUGAR_CANE_BLOCK)) return;
try doing it in multiple and putting debug pmessages
ok
well, ik the event isnt even running bc i have a debug sout at the top and its not sent
in your event listener
i call it when i check if the player is in warzone
your blockbreakevent specifically
but it doesnt make it that far
i have it setup like this, and 1 doesnt even sout if im not op
p.sendmessage("1")
according to factionsuuid they use that listener
ok, ill take a look. p.sendmessasge didnt do anything
your onbreak in your plugin doesnt do anything?
not unless im op
it is registered bc it works if im op
or outside of warzone
actually i cant break blocks anywhere when im deopped
are you using any other plugin other then factions?
I have multiple plugins, but none that should do that. I may go through and disable them all and see
yeah sounds like another plugin is doing the same thing as yours for whatever reason
e
https://paste.helpch.at/tacoziwape.sql
my plugin is giving error. tell me which class has problems i will send it here
im making a thepit addon
ThePitAddon.java Show this class
do this after onEnable()
ThePitAPI thepit = Bukkit.getServicesManager().getRegistration(ThePitAPI .class).getProvider();
ok
@night ice https://paste.helpch.at/ofurecoyuq.css
new error
what is in line 18?
ThePitAPI thepit = Bukkit.getServicesManager().getRegistration(ThePitAPI .class).getProvider();
is the plugin PitAPI enabled?
yes
its in onEnable
@night ice ?
Main thepit = Bukkit.getServicesManager().getRegistration(Main .class).getProvider();
ThePitAPI api = Bukkit.getServicesManager().getRegistration(ThePitAPI .class).getProvider();
Bukkit.getPluginManager().registerEvents(new PlayerKillEvent(this), this);
new StatsCommand(this);
check whether the pit plugin is enabled before loading its class and also if not added, add it as depend or soft dependent on plugin.yml...
The most obvious reason for that not work is that your plugin is loading before the other plugin
no i added that depend before
the addon is loading after plugin
Then ask to the owner of the plugin maybe
k
how can i check if the TextComponent's content is same with another TextComponent
Its an object right, you can check #equals() IG
pinned msg
Why is Lombok bad?
- It's a compiler hack - the Java compiler isn't designed to modify code, so it can cause difficult to debug errors, or worse
- It requires an IDE plugin, so unless you've properly configured Maven, Gradle and your IDE, you'll get hundreds of compilation errors. This process takes time too, it's not easy
- Lombok'd code won't show in Javadocs
- The code generation is often unpredictable and difficult to debug, and often you'll have to do it "the hard way" anyway
- Java is supposed to be explicit, Lombok hides a lot of key functionality into a subtle annotation which can be easy to miss
- While IDEs support it with a plugin, it's usually more difficult to find specific things, like usages of a getter because they don't exist in the source code
- Finally, Lombok'd bytecode doesn't match the source code, so it causes a pretty annoying warning in IntelliJ
Hi
String ItemDura = "e";
if(i.hasItemMeta() && i.getItemMeta().hasDisplayName()) {
ItemName = i.getItemMeta().getDisplayName();
if(i.getItemMeta() instanceof Damageable) {
Damageable ItemDamageable = (Damageable) i.getItemMeta();
ItemDura = String.valueOf(ItemDamageable.getDamage());
}
}
When i try ItemDura still be "e" and on't change i try wit ha goldensword with 28 durabilty a ston sword with all durablity and with gunpowder
what
well then most likely, the item does not have a display name
Spellcheck be like: 😴
already checked the equals method but it just returns obj == this
useless

ohh
i thought we talking ab strings lol
is it bad to shade mysql connector in my plugin? (so it works when using spigot 1.8 in mysql 8.x?

Where did you see that? If we're talking about Bungee chat stupid TextComponent then it's a lot more than that
Try Adventure, it's actually good unlike that one 
this$text
Decompiled
if you say so
Isn't that lombok generated?
Why..
because md5
i was talking about adventure's textcomponents
didnt check the github, i pressed middle button to see equals method and i saw obj == this
probably something went wrong while decompiling the code but im not sure
well the interface doesn't have the equals method, the implementation does, you work with the API which are the interfaces
why do you need to check components for equality tho?
i need to check an item's displayname
don't do that
#equalcomponentrights
ah
components (display names, lore, etc) is for the client to render and see
it always was
even when it was a string
but very badly misused
yeah good idea. didnt think of that, thank you
Just to confirm though, yes it does add equals https://github.com/KyoriPowered/adventure/blob/master/api/src/main/java/net/kyori/adventure/text/TextComponentImpl.java#L96
it's still not something one should use for any particular reason 
Yeah
Hmm. I've got this option in my settings.yml (yes yml 😦 )
option: "<yellow>----<red><hover:show_text:\"<gold>Click!\"><click:run_command:/help %prev%><< Previous</click></hover> | <hover:show_text:\"<gold>Click!\"><click:run_command:/help %next%>Next >></click></hover><yellow>----"
but it looks like this when I use the default minimessage parser. It has something to do with the << from << Previous? Can I maybe escape those things somehow? \<\< doesn't work.
ok. now I get this
the thing is the same thing <yellow>----<red><hover:show_text:"<gold>Click!"><click:run_command:/help %prev%><< Previous</click></hover> | <hover:show_text:"<gold>Click!"><click:run_command:/help %next%>Next >></click></hover><yellow>---- works on adventure's online parser https://webui.adventure.kyori.net/
I saw that
dkim stop deleting your messages. smh xD
20
Close enough :kek:
and I forgot that there are 60 seconds in a minute, not 100 seconds D:
I was expecting this to be 07:41 🥴
but then i realized it
and deleted my message
ok
yes
now pls help me. lol
?help
» Give the helpers some details
» Ask suitable questions
» Be polite
» Wait
send help
😃
I want to die
☹️
fuck you... you made my message go up
here
I apologize
@broken elbow just use the double arrow symbol
Or \\<
I'll just join kyori discord tomorrow if they do have one and see if its actually a bug
didn't work.
its like the escape wasn't there at all
good night
Gn
gn
That's your best option, yes
By a thousand miles
Try surrounding the stuff you don’t want formatted in <pre> I think it is?
What is in Java the difference between System.out.println() and System.out.print()?
hey
does anyone know how to set priority to tabs
like some players get moved up in the tabs plugin
if you use the basic spigot method like setPrefix you just need to apply numbers
Like 1 or what ever
oh. so would it be <pre><<</pre>?
well... after I get configurate to work lol. switched to it and its not going very well
yeah nah.. didn't help lol. will just contact them. thank you tho
Hello, I'm making a custom scoreboard plugin with PlaceholderAPI's placeholders. I cant seem to color any of the placeholders?
public void createBoard(Player p){
String configLineOne = PlaceholderAPI.setPlaceholders(p, getConfig().getString("LineOne"));
ScoreboardManager manager = Bukkit.getScoreboardManager();
org.bukkit.scoreboard.Scoreboard scoreboard = manager.getNewScoreboard();
Objective objective = scoreboard.registerNewObjective("MainBoard", "dummy", ColorUtils.translateColorCodes(configTitle));
objective.setDisplaySlot(DisplaySlot.SIDEBAR);
Score s6 = objective.getScore(ColorUtils.translateColorCodes(configLineOne));
s6.setScore(5);
p.setScoreboard(scoreboard);
}
Config
#PlaceholderAPI Supported
#HexColor Codes Supported usage: &#(hexNumbers)
LineOne: "Ⴟf5Association #92eb34%mmocore_class%"
Ⴟf5 Works
#92eb34 Has no effect
what is your translateColorCodes method?
Regular color codes have no effect either.
public static String translateColorCodes(String text){
String[] texts = text.split(String.format(WITH_DELIMITER, "&"));
StringBuilder finalText = new StringBuilder();
for (int i = 0; i < texts.length; i++){
if (texts[i].equalsIgnoreCase("&")){
//get the next string
i++;
if (texts[i].charAt(0) == '#'){
finalText.append(net.md_5.bungee.api.ChatColor.of(texts[i].substring(0, 7)) + texts[i].substring(7));
}else{
finalText.append(ChatColor.translateAlternateColorCodes('&', "&" + texts[i]));
}
}else{
finalText.append(texts[i]);
}
}
return finalText.toString();
}
Does anyone know what's wrong with our economy plugin? When trying to purchase an item while using https://www.spigotmc.org/resources/1-14-1-18-shopkeepers-addon-navigation-economy-plotsquared-vault-integration.98400/, for some reason it adds money instead of taking money. We get some other issues when attempting to use essentials eco commands, but I don't have a demonstration of that right now
Vault implementation and database handler:
https://paste.gg/p/anonymous/5ad56582e485443694c39b8be2ee65ea
(ping please)
The logic for remove() is weird ngl
uuid = uuid and balance >= toRemove why do you need the balance check? Or is it not your plugin
Am i the only dumb guy here or why am not finding this
jetbrains exposed
Ye
Well, then the cache will have a different value that the database
will it?
Because the cache gets updated even if the balance is not greater than toRemove

val player = DatabasePlayer(
uuid,
if (cache.containsKey(uuid)) cache[uuid]!!.bankBalance - toRemove else 0,
System.currentTimeMillis()
)
cache[uuid] = player```
I'm on mobile so the format is probably weird
does anything else seem cringe
@surreal lynx can you send CachedBankAPI.removeFromBankBalance?
Optional.of(Constant...add(player, balance))
That doesnt look right @surreal lynx 3rd line from bottom to top
Indeed
Thanks for the help 
what would be the regex to be able to have 0 or more spaces?
[ ]+? is not it since it requires 1 ore more.
oh its * instead of +
\s*
you can get rid of the brackets and the ?
ah right. thanks
Is there a reliable way to slow down world time?
Thread.sleep 👌
TRUE
pretty sure he means the entire world. I was thinking a time machine.
like if I have a repeating task
that would set back the time by x ticks
would that be dumb?
I imagine the sun movement would be kind of jerky
i remember there was a plugin that had a feature like that
a feature that had a feature that had another feature that also had a feature
what
a feature that had a feature that had another feature that also had a feature
I think it uh changed the doDaylightCycle gamerule constantly lol
lol
if I have a regex patter, is there to check if a string has parts that don't match the regex? the regex is 2 groups basically. this is a good example ([0-9]+)|([a-zA-Z]+). If I try it on the text ABC(23) is there a way to see if there is parts of the string that don't match any of the groups? in this case it would be the ()'s but it could be anything else really. don't need to match them just to need to know if they exist or not
matches() checks if the string is 1:1 with the regex, if that's what you mean
while find() checks if the regex matches any part of the string
ok. now. I want to match numbers. but also negative numbers.
so
this should not work 32 but
32
-32
and - 32 should work. how would I go about doing this?
I was thinking (\-\s*\d+) but this would take 32 as a valid answer.
((-\s*)?\d+) - the minus and space are optional ? and there can be between 0 and n spaces *
-1 - 1 - 1 1
np
private final String configlore;
this.configlore = section.getString("lore");
//The itemstack
List<String> lore = new ArrayList<>();
if(configlore != null) {
lore.add(ChatColor.translateAlternateColorCodes('&', configlore));
}
itemMeta.setLore(lore);
I honestly dont know what went wrong...
Move setLore to the if statement
ok
it worked thanks
Np
for some reason Block.getDrops() no longer seems to include the contence of containers such as chests
then again im not even sure if it originally did or if its just cause my event would break
u can check if the blockstate implements InventoryHolder and if it does, cast it to that and add the items in the inventory
but if it worked before, try debugging or smth to prevent duplicate items 👀
im not sure if it did work before
i dont actually know how to extract the drops from the container
i figured it out
if (block.getState() instanceof Container) {
Container container = (Container) block.getState();
if (container instanceof Chest) {
for (ItemStack item : ((Chest) container).getBlockInventory().getContents()) {
if (item != null) {
item = em.updateItemWithEnchantLore(item);
drops.add(item);
}
}
} else if (!(container instanceof ShulkerBox)){
for (ItemStack item : container.getInventory().getContents()) {
if (item != null) {
item = em.updateItemWithEnchantLore(item);
drops.add(item);
}
}
}
}
```it works ig
no it doesn't 
public static String color(String text){
ChatColor.translateAlternateColorCodes('&', text);
return text;
}
how can I make it so when I'm doing Colors.color(text) it'll work?
Strings are immutable/unmodifiable
ChatColor.translateAlternateColorCodes returns the "colorized" string, so you want to return that instead
what?
what what?
how do I return it?
return ChatColor...
public static String color(String text){
ChatColor.translateAlternateColorCodes('&', text);
return ChatColor.translateAlternateColorCodes('&', text);
}
like this?
you can omit the first call, you're not doing anything with it since you're ignoring the returned value
public static String color(String text){
return ChatColor.translateAlternateColorCodes('&', text);
}
like this right?
yep!
thanks 🙂
yw
I have a claim plugin you could take a look at for reference: https://github.com/Redempt/RedClaims
You have to use some sort of spatial partitioning
And you will also want to make sure that you don't have each claim registering its own personal listeners, because that will get very slow with lots of claims
Best to make sure that every claim is in a map, and when an event is fired, you determine what claim it's in and then figure out what to do about it
You can do that with something like this https://github.com/Redempt/RedLib/blob/master/src/redempt/redlib/region/RegionMap.java
Ok you want to get nearby cuboids to another cuboid
Spatial partitioning is probably the best way
How to get player name by uuid?
is your server online or offline
anyway, Bukkit.getOfflinePlayer(UUID).getName()
Thank you.
there is another efficient way to get player's name if your server is offline moded
but this will work too
That method returns an OfflinePlayer regardless the type of the server, premium or not
yeah
Glad you agree with mee
ah sorry i was confused, that was for the uuid, not the name
Anybody here that knows how to fix this?
Your build is currently configured to use Java 17.0.1 and Gradle 7.1.1.
Possib
- Use Java 16 as Gradle JVM: Open Gradle settings
- Open Gradle wrapper settings, change `distributionUrl` property to use compatible Gradle version and reload the projectle solution:```
no, update gradle to 7.3.x
I'm an operator on my server, and I'm using permissions checking in my plugin. For some reason, even though I'm an operator it still doesn't think I have the permission node. Anyone know the issue?
I'm using 1.18.1
make a owner group with only permission *
God, if only this error said exactly what the problem was and what you could do to fix it
Would be very convenient
I feel offended by that xd, since i suck at these things
at reading?
https://paste.helpch.at/agetufunak.cpp
I honestly dont know why this is happening,
Whever i summon a boss whenever I hit it the boss' name goes from "Doge the Great 500/500" to "Doge the Great 500/500 499/500", And a regular mob has no custom name when I hit it
Have you checked console for errors?
#bot-commands message
getCustomName is nullable
uh trying to use papi api and I am kinda confused, what's the difference between With a Plugin (Internal Class) and With a Plugin (External Jar)?
let me rephrase that, when should I use which?
Internal class means you have a class inside your plugin that extends PlaceholderExpansion, and external jar means the expansion is in its own jar and (optional) can be published to the ecloud
oh ok thx
uh kinda fully followed the guide on github yet I get this https://paste.helpch.at/ovoxuvulap.cs
I am kinda unsure why it's happening, I mean, I do see it's a nullpointer
but ye
Yup, just rechecked and everything is looking the same
@Override
public boolean canRegister() {
return (plugin = (ArmorDisplay) Bukkit.getPluginManager().getPlugin(getRequiredPlugin())) != null;
}
```try removing this
and see if it works
unsure if this is the cause but I am unable to parse my placeholder
unless I forgot something..
do I need to register it or smt
thats for if it's not in your plugin
im guessing getRequiredPlugin is null
which is causingthe error
wdym
is there an error?
🤔
show me the class that extens PlaceholderExpansion please
ah found it.
ye
ok. so removing canRegister will register the expansion but the placeholder doesn't work you're saying?
well my first guess would be that return plugin.getListArmor(p); returns null.
try returning a random string "test" for example
in that if block
ok
you're not overriding the actual onRequest method
this is yours
this is what you should have
oh fk
it takes in an offline palyer. and you need to annotate it with override
ye testing rn
having trouble figuring out hooking into LastLogin https://paste.helpch.at/inodewereq.css
i need a hug
all I can give is a virtual hug
I'm a bit confused, why not use the offered method to get the instance of llapi?
pretty sure this line is my issuethis.lastLonginAPI = (LastLoginAPI)plugin;
they have a LastLogin.getApi(); method
trying to make it work within the plugin I have forked
which returns an instance of LastLoginAPI
yes. but according to LastLoginAPI's docs, you can just use LastLogin.getApi(); to get an instance of LastLoginAPI. so just change this line from casting to the method offered by them.
I used this line,LastLoginAPI api = LastLogin.getApi(); but most likely in wrong spot
I figured it out, thanks for the help
Hey i have a doubt Location#equals(Location lo) considers yaw and pitch?
When I get inventory with event.getSource(),event.getDestination() and so on. it only log the first item as one on hoppermoveevent. is it way around this?
I look on this more and you have to delay the task one tick.
could someone please respond to #placeholder-api
yeah, seams like the event not check amount of first stack from 1 tick later. I don´t know if consciously or not.
[INFO]
[INFO] ----------------< nl.gamerjoep.bankoverval:BankOverval >----------------
[INFO] Building BankOverval 1.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[WARNING] The POM for com.sk89q.spigot:bukkit-classloader-check:jar:1.8-R0.1-SNAPSHOT is missing, no dependency information available
How to fix?
So i guess, i would need to write my own
You can see if spigot itself has a similar function
Or find out which plugin adds that and add it as a dependency
A member of staff has requested I move your message to a paste,
Most likely because it contains a config/error/code snippet.
Add worldguard as a dependency in your plugin.yml
That might fix the original issue
I have no clue about the other error
This one
I have worldguard in it
entity.setCustomName(" ");
entity.setCustomName(entity.getName());
entity.setCustomName(ChatColor.translateAlternateColorCodes('&', " &r&c" + (int) health + "/" + (int) entity.getMaxHealth() + "❤"));
Hi so I have a weird bug or issue where when i hit an entity, their name does not pop up but the health does, but if I have the code like this
entity.setCustomName(ChatColor.translateAlternateColorCodes('&', entity.getName() + " &r&c" + (int) health + "/" + (int) entity.getMaxHealth() + "❤"));
It adds the health part to it like "Zombie 20/20 19/20" which i dont want
there is no error.
what do you want?
like
whenever I hit the mob I want it to show (in this example a zombie) Zombie 19/20
or with a custom named mob Knight 17/20
well yea you use entity#getName, which will keep appending everything together
Hello, I'm not here to look for code nor to be spoonfed, but I would like to make an undo command for my paper/bukkit/spigot plugin.
So, what would be the best way to store the previous states of known areas. Should I like save it to a schematic file or something else?
Thanks.
How do I make a plugin run on 1.16 and 1.18? Since 1.18 require Java 17
Or can you run 1.16 plugins in Java 17?
Oh you can? I just can't make it work
Noop
Gotta find out why
Cuz obv it can
Tnx
oh wait i'm wrong
Wat
are you compiling it into java 17?
are you the developer of the plugin?
you might be compiling the plugin into the wrong version
What do you mean? Wrong java?
What should I compile it with, for 1.18?
It works fine on 1.18 servers with Java 17?
1.16 supports java 16
yeah thats what i mean
How do I make it run on both 1.16 and 1.18 if they can run the same Java version then?
Do I make one 1.17+ copy and one 1.16 copy?
Do I need two versions then?
Of the plugin I mean
Or can I just make one 1.18 copy, and make it run on a 1.16 server somehow?
If so, how?
Hi, Here my mistake
public String GetRarity(ItemStack itm) {
net.minecraft.world.item.ItemStack item = CraftItemStack.asNMSCopy(itm);
NBTTagCompound Tag = item.getOrCreateTag();
String Rarity = Tag.getString("Rarity");
System.out.println(Rarity); ////1
return Rarity;
}
public ItemStack SetRarityNbtTag(ItemStack itm, String Rarity) {
net.minecraft.world.item.ItemStack item = CraftItemStack.asNMSCopy(itm);
NBTTagCompound Tag = item.getOrCreateTag();
Tag.setString("Rarity", Rarity);
System.out.println(Tag.getString("Rarity")); ////2
item.setTag(Tag);
return CraftItemStack.asBukkitCopy(item);
}
setRarity(ItemLore, item, RarityLore);
item = SetRarityNbtTag(item, RarityLore);
the outpout in the console are
[STDOUT] ////1
[STDOUT] [Common] ////2
i don't know why can anyone help me ?
(i try with the same item)
Heyo, I am generating JWT Tokens for a Webservice I am working on, it works fine and during runtime I can reload the Page Infinitly and it works fine, but once I restart the Plugin all Tokens are suddenly Invalid. Here is the code for generating and decoding : https://paste.sentinalcoding.eu/MA4NyGA8Lk
is it possible to add a drunk effect to a player?
you mean nausea?
https://paste.helpch.at/yomowejufe.cs
I fixed the first part for the normal entities but now for the boss it does the other thing for non-custom entities. I tried with a event.setCanceled() but it did not work.
Anyone worked with CORS and Ktor? My root domain is trying to send a request to the api subdomain, which gets blocked with the error (from firefox) The Same Origin Policy disallows reading the remote resource: CORS preflight did not succeed. If I look at the preflight request, it seems to have sent an options request as it should, the api subdomain has responded with the correct Access-Control-Allow-Methods header set, but with a code 500 internal server error too? Ktor logs show an unhandled OPTIONS request. Maybe I'm blind but the ktor docs don't seem to mention this, any ideas?
Do you have the CORS feature installed?
Yeah, I think this is the correct configuration
Yeah that looks fine, i am not sure then
Damn
Hi, is there any way, how to check, if player has open inventory with Player object?
I cant find anything like that
hm?
but wdym with
player has open inventory with Player object
so you wana check if that specific player has an open inventory right?
https://hub.spigotmc.org/javadocs/spigot/org/bukkit/entity/HumanEntity.html#getOpenInventory()
yw
then ask that 
lol
but anyways
if(health > damage) {
health -= damage;
if (entity.getCustomName().contains("&6Doge the Great")) {
entity.setCustomName(" ");
entity.setCustomName(ChatColor.translateAlternateColorCodes('&', "&6Doge the Great" + " &r&c" + (int) entity.getHealth() + "/" + (int) entity.getMaxHealth() + "❤"));
return;
}
entity.setCustomName(" ");
entity.setCustomName(ChatColor.translateAlternateColorCodes('&', "&6" + entity.getType().name().toLowerCase() + " &r&c" + (int) health + "/" + (int) entity.getMaxHealth() + "❤"));
}
}
I feel like ive done something stupid here... the doge boss thingy wont register instead it does the other code meant for vanilla mobs
because the name is probably §6Doge the Great instead of &
no i just checked it is &
i used a translatealternatecolorcodes there too
thats the thing
translate alternate color codes changes it
to §
and youre checking for &6

👍
btw
i have another issue :/
@EventHandler
public void bossDeath(EntityDeathEvent event) {
if(event.getEntity().getCustomName().equals("§6Doge the Great")) {
LivingEntity entity = event.getEntity();
entity.getLocation().getBlock().setType(Material.CHEST);
}
}
wont set block, im pretty sure this works
btw i added this part ```java
if (event.getEntity().getCustomName() != null) {
Try using:
entity.getLocation().getBlock().setType(new ItemStack(Material.CHEST));
@drowsy edge
i dont play around with block like that, it might just be for invs
not sure
ill try it thanks
i dont think that will work
because that will think that the block is a item and it cant set a block to a item
true it does ask for Material
try and set it with getBlock().setTypeId()?
you could try to change
@EventHandler
public void bossDeath(EntityDeathEvent event) {
if(event.getEntity().getCustomName().equals("§6Doge the Great")) {
LivingEntity entity = event.getEntity();
entity.getLocation().getBlock().setType(Material.CHEST);
}
}
to:
@EventHandler
public void bossDeath(EntityDeathEvent event) {
if(event.getEntity().getCustomName().equals("Doge the Great")) {
LivingEntity entity = event.getEntity();
entity.getLocation().getBlock().setType(Material.CHEST);
}
}
if there's a color, im pretty sure u have to include it
there is a color
yeah
wait can you send me the entire source code? then i can try some different things that i may come up with
the entire class?
just send the entire src folder

:/
are you looking for any special classes??? why do you need that im confused
have you tried to log to chat/console when the boss dies to see if it actually gets to the logic in the if statement?
the reason it doesnt set it is probably because it died already
and it doesnt have a real location
then how would I catch that
no not yet but I had a similar issue earlier and Skyslycer's advice fixed that
same line of code
you could try adding the position in a move event
hm
I have a damage event mabye I can log It in that
that might work better
hm well see
i created this
private Location locate;
Then put the loc in the event
Location location = event.getLocation();
location = locate;
Then in death event
Block block = locate.getBlock();
btw i have just tested if you kill a entity and try to get his location using event.getEntity().getLocation() you actually get the location that entity died at
huh
so its the block setting method
then
Block block = loc.getBlock();
block.setType(Material.CHEST);
loc is my location thing
this should work idk
i found the problem i think
?
try changing
@EventHandler
public void bossDeath(EntityDeathEvent event) {
if(event.getEntity().getCustomName().equals("§6Doge the Great")) {
LivingEntity entity = event.getEntity();
entity.getLocation().getBlock().setType(Material.CHEST);
}
}
to:
@EventHandler
public void bossDeath(EntityDeathEvent event) {
if(event.getEntity().getCustomName().equals(ChatColor.translateAlternateColorCodes('&', "&6Doge the Great")) {
LivingEntity entity = event.getEntity();
entity.getLocation().getBlock().setType(Material.CHEST);
}
}
ok ill see
i dont think that will change anything but ill try
because first you only did that for entities named exactly §6Doge the Great
And not contains
Just do #contains("Doge the Great")

it worked
im so dumb
now to go tourture myself for 5 hours to change meta
and make a custom name

idk if this would work but
do you think i can just make a chest item and then place that instead
bc applying meta to an item is easier than block
this should work: ```java
event.getEntity().getWorld().dropItemNaturally(event.getEntity().getLocation(), ItemStack);
just replace ItemStack to the predefined itemstack
ok
i decided on block state instead
ok
and just giving the block a custom name then checking
PlayerInteractEvent is firing twice when you pass it through from the listener to a seperate class.
Its firing the same hand, not different hands and i dont know why.
if you dont pass through the event to another class then it works as intended
hello i am trying to create custom enchants the hard way becaus i like torturing myself 🙂 currently when i apply the enchant twice it also gets added to the lore twice while i want it to replace the previous lore line of that enchantment my current code for that entire command: https://www.toptal.com/developers/hastebin/bemicaloca.kotlin
wait so you want to replace the previous lore line with the new one? and there the same enchants correct?
yeah
your better off just clearing the lore and starting over every time
i mean yeah but if i want also to have a normal lore i will have to add that again every time
mabye check for the old lore and if its there remove it then re-add new level?
thats pretty much what i am doing now
k
Here is the entire code: https://www.toptal.com/developers/hastebin/bemicaloca.kotlin if it maybe could help
mabye
Lore.remove(ChatColor.translateAlternateColorCodes('&', "&r&7Advanced sharpness I"))
then set the line
good idea
it works
actually i just realised setting the lore wasnt the problem the problem was that even though there already is that enchant on there it doesnt recognise it
ok
Chest chest = (Chest) block.getState();
chest.setCustomName("§cDungeon Chest");
this is in the death event
in my custom chest manager thing
Chest chest = (Chest) holder;
if(chest.getCustomName() != null) {
if (chest.getCustomName().equals("§cDungeon Chest")) {
This is in a InventoryOpenEvent
and it no work now
honestly i think the problem is the inventory open event but sad
i gtg sleep imma destroy my brain tommorow again
lucky i still have 7 hours to burn
ya know what im done with custom names for the day
Does anyone know how to spawn packet armor stands with armor using ProtocolLib?
I am able to spawn the packet for the armor stand but not the armor, and when I try to get the entity it gives
an error saying the entity id is null.
when i right click on any block with a stick in my hand it fires 2 of the same hand
cuz you need break;
same result
add it at the end of each case
same result
i just said that
LEFT_CLICK_AIR, LEFT_CLICK_BLOCK, RIGHT_CLICK_AIR are all giving the correct output, RIGHT_CLICK_BLOCK runs it twice.
public class PlayerInteractEvent
extends PlayerEvent
implements Cancellable```
PlayerInteractEvent has 4 fields, 1 all implementations, 18 methods, 1 implementations, and 1 extensions.
Represents an event that is called when a player interacts with an object or air, potentially fired once for each hand. The hand can be determined using getHand().
This event will fire as cancelled if the vanilla behavior is to do nothing (e.g interacting with air). For the purpose of avoiding doubt, this means that the event will only be in the cancelled state if it is fired as a result of some prediction made by the server where no subsequent code will run, rather than when the subsequent interaction activity (e.g. placing a block in an illegal position (BlockCanBuildEvent) will fail.
the problem is the same hand is being run twice

it is
Expected
HAND
OFF_HAND
Returns
HAND
HAND
when right clicking a block with the stick
could someone help me with this please? i get an error saying "The type com.google.common.collect.ImmutableSet cannot be resolved. It is indirectly referenced from required .class files" because of the net.minecraft.world.entity.EntityTypes import. how do i fix this?
The problem was with my teleport some how effecting the 2nd hand type or causing it to duplicate the original task
if i delay the teleport task by 1 tick then its fine and it gives intended results
Does anyone know how to set an entities rotation with packets, while they are a passenger?
I can do it when they are not a passenger, but after I make them a passenger they stop rotating
Question, so im creating a enchant that has a chance to run some code, but the chance isnt actuallt working. Max level = 4 and nbt.getInt() = 4 so it should be %1 chance of it happening, but it happens more often
if(new Random().nextInt(100) < chance) {
int rand = new Random().nextInt(cmdsToken.size());
String cmd = cmdsToken.get(rand);
Bukkit.getServer().dispatchCommand(Bukkit.getConsoleSender(), cmd.replace("{player}", p.getName()));
}```
a few things here, first is not entirely relevant to the functionality
but you should consider only having a single Random() and just calling nextInt() on it, instead of making a new one each time
creating a new Random is relatively expensive
ok
i'm also pretty sure your rounding is not happening the way you want it to
as it is now, any value of nbt.getInt("tokenFinder") that is less than that of Double.valueOf(maxLevelToken)/2 will result in a chance of zero
and any others will be rounded to one
which means you really only have two probabilities instead of 4 (assuming you wanted 4)
does anyone know how i would get the duration and lvl of a potion?
i tried both
itemMeta.basePotionData - only gives name
&&
itemMeta.customEffect - only contains extra effects
honestly this code is a little funky with all the casting and stuff, i would recommend sysout'ing the values inside nbt.getInt("tokenFinder"), Double.valueOf(maxLevelToken), chance and making sure they are what you expect
ok
i also recommend you store then sysout the results of each new Random().nextInt(___) to make sure they line up to what you want
with that you should easily be able to tell what's going on
Alright thank you
i heard using new Random is bad?
ThreadLocalRandom.current() instead?
correct
.
well
i suppose ThreadLocalRandom is safer overall
but since we aren't generating random values over multiple threads it shouldnt be relevant
you cant simply load shared library from inside your jar
you have to copy it to an actual file then load it
an easier way to do this is probably JNA by the way
Oh nvm I see
does the JAR even have the shared library?
Wait yeah, i thought you were going to do this in an actual user env
hm
imma be honest i personally think jna is much easier to work with
maybe could you show some code?
maybe that could help
well JNA doesnt require you have all the dumb JNIExport functions and stuff and it doesnt require you to have the weird method names
and you can use the normal types in C or C++
public interface LibSomething extends Library {
LibSomething INSTANCE = Native.load("libsomething", CMath.class);
double doSomething(double value);
}
Hey for PlaceholderAPI how can I make it so that my plugin uses [plugin-name].%player%.[placeholder]
Hmm?
put identifier as the plugin name may be
Do someone has a good tutorial on changing mob target AI ?
Hi, Here my mistake
public String GetRarity(ItemStack itm) {
net.minecraft.world.item.ItemStack item = CraftItemStack.asNMSCopy(itm);
NBTTagCompound Tag = item.getOrCreateTag();
String Rarity = Tag.getString("Rarity");
System.out.println(Rarity); ////1
return Rarity;
}
public ItemStack SetRarityNbtTag(ItemStack itm, String Rarity) {
net.minecraft.world.item.ItemStack item = CraftItemStack.asNMSCopy(itm);
NBTTagCompound Tag = item.getOrCreateTag();
Tag.setString("Rarity", Rarity);
System.out.println(Tag.getString("Rarity")); ////2
item.setTag(Tag);
return CraftItemStack.asBukkitCopy(item);
}
setRarity(ItemLore, item, RarityLore);
item = SetRarityNbtTag(item, RarityLore);
the outpout in the console are
[STDOUT] ////1
[STDOUT] [Common] ////2
i don't know why can anyone help me ?
I try with the same item
uh first things first as a general java tip, make sure function names are lowerCamelCase and the same with variable names but also, not entirely sure what the issue
i assume getRarity is just not printing anything but i feel like you might be doing the setRarityNbtTag after the getRarity which in that case its because the item nbt hasnt been set yet
To make your life easier, if you're using a more recent version, use PDC
Currently having trouble with ONLY redstone. I'm making an ore regen plugin for a friend but like i mentioned redstone seems to the be the only one thats not giving to the player when the block is being broken. Here is my code that adds items to the droplist when you mine a block:
switch (block.getType()) {
case COAL_ORE:
for (int i = 0; i < (hand == null ? 1 : ItemUtils.fortuneAmount(hand) + 1); i++) dropList.add(new ItemStack(Material.COAL));
return dropList;
case IRON_ORE:
for (int i = 0; i < (hand == null ? 1 : ItemUtils.fortuneAmount(hand) + 1); i++) dropList.add(new ItemStack(Material.IRON_INGOT));
return dropList;
case GOLD_ORE:
for (int i = 0; i < (hand == null ? 1 : ItemUtils.fortuneAmount(hand) + 1); i++) dropList.add(new ItemStack(Material.GOLD_INGOT));
return dropList;
case REDSTONE_ORE:
for (int i = 0; i < (hand == null ? 1 : ItemUtils.fortuneAmount(hand) + 1); i++) dropList.add(new ItemStack(Material.REDSTONE));
return dropList;
case LAPIS_ORE:
for (int i = 0; i < (hand == null ? 1 : ItemUtils.fortuneAmount(hand) + 1); i++) dropList.add(new ItemStack(Material.INK_SACK, 1, (short) 4));
return dropList;
case DIAMOND_ORE:
for (int i = 0; i < (hand == null ? 1 : ItemUtils.fortuneAmount(hand) + 1); i++) dropList.add(new ItemStack(Material.DIAMOND));
return dropList;
case EMERALD_ORE:
for (int i = 0; i < (hand == null ? 1 : ItemUtils.fortuneAmount(hand) + 1); i++) dropList.add(new ItemStack(Material.EMERALD));
return dropList;
default:
return dropList;
Everything else seems to work, even lapis, but not redstone? any ideas? (1.8.8 spigot btw, sadly)
cant help but feel this code could be much more simplified
Yeah, ig so
Is it normal, that team.setPrefix(prefixadmin) does absolutely nothing, or I really should change the server type to Paper (current: Spigot 1.18.1 (event extends JavaPlugin is unavailable))?
(ingame command does the same)
How do I change the export folder for a maven project in eclipse?
Guess just export it. 😛
Hmm?
Export the jar
Yeah, I am. I use the run configuration. But I don't see an option to change the export directory, and google isn't very helpful
wat
I'm gonna export it a lot of times, so I want it to end up in my server folder directly
Click on the File options
At up
At action bars (File, Edit, Source, etc)
Then select Export
Then Java > JAR file
I'm exporting it with Maven tho
Can you still export using the "regular" export method? Don't you need to export it with maven?
Don't think so.
Then why are you telling me this?
Which one?
Confused
I told you how to export it
I think it will export the mavem too
Oh
you have to use mvn clean package
eclipse has a button for it i think, but i don't use eclipse so I'm not sure
Well, the devs of Maven should have been making Maven easier then. >:c
gradle 😌
I don't understand both
Once
I tried to import PAPI into my plugin
and it was just a hilarious failure
👀
Both Maven and Gradle sucks in my life.
I have this, should I export using the "Maven Clean"?
I'm new to Maven so idk what I'm doing really
Well. Both of our solutions are a bit "same hard", I guess. I cannot manage to set the player's nametag. 😛
The fun fact that the /team command does nothing too.
What else can I do then? c.c
I'll have a try ty
can be but just thought of this on a whim and worked so
Absolute legend, worked tysm, never thought about it
np :)
It's not that hard, it feels hard because you don't know it yet
wat
Isn't 632ms more than 2 secs?
@Override
protected void initPathfinder() {
this.goalSelector.a(0, new PathfinderGoalFloat(this));
this.goalSelector.a(1, new PathfinderGoalLookAtPlayer(this, EntityHuman.class, 15.0F));
this.goalSelector.a(1, new PathfinderGoalMeleeAttack(this, 1.0,true));
this.targetSelector.a(1, new PathfinderGoalNearestAttackableTarget<EntityHuman>(this, EntityHuman.class, true));
}
how can I make so even if the player is a bit far or seperated by walls the entity still try to find the nearest player ?
Wat?
1000ms = 1 second
dkim
so matt's is 0.632s
hi
How did you say that I would change the export directory for the maven projcet?
I didn't understand 😦
I have this: https://imgur.com/a/NcuPOPn
And you said to use clean install?
Oh. I probalby though ms is ticks xD
'cause 20 ticks equals 1 second
ticks != ms
Sorry to hear that
ticks aren't a static time measure like if your serv is laging then 1 sec can be equal to 23 ticks or even 18
Gradle caching 😌
Is anyone able to answer this?
how do you use nms?
Is there a good way to verify that a minecraft user has ownership of a discord account? I want to check if the discord account entered in a config file actually belongs to the minecraft user. I've seen TechsCode use it for UltraPermissions in-game updater via some discord verification link or smth.
you could save accounts with a random code + database but also if its directly using discord theres an authorized apps section
Is there any javadoc for nms
Maybe I should have elaborated further on what I want. When my plugin starts, I want it to check in a dc server if the discord account entered in a config file has a specific role. If the account does not, the plugin will disable itself. So I want to verify that the server owner actually owns the discord account from the cfg file, and doesn't just pretend that they do. What is the best way to do that?
You could hook with something like JDA or JavaCord and get a bot in the server...
if you're suggesting that the plugin gets a bot in the server that's ridiculous, you do not want to package the secret into the jar
then how does DiscordSRV or EssentialsX Discord works?
they use a user - provided discord bot i believe
the user makes their own bot, and gives the plugin the secret key for that
thats the same i mentioned
no, there would be no point for that in his plugin
he wants to check the status of users in his own discord, which other people should not be allowed to add a discord bot to for multiple reasons
and having your plugin users create their own discord bot is pointless if the bot doesnt have access to the role information you want
hmm..yeah mb upon reading it again, i understood that he need somekind of licensing system or so...
yeah, no worries
the most reasonable way to achieve this would be to host your own verification server that accepts some secret key you give the plugin owners in order to decide whether the plugin is allowed to be run or not
but this carries a few issues with it as well, namely:
- you have to worry about people sharing secret keys
- you (always) have to worry about people modifying your source code to remove your drm
Ig, advanced license does that
Open source it and don't care about any of that 
make it super expensive and have a super strict drm but also open source it so people think they're getting a sweet deal by building and using your plugin for free 🧠
how bad of an idea is this
Can someone please help me fix this? I'm not sure what I'm supposed to do exactly to fix it
Can you not do batch statements?
you could also read the answers you got...
i can but eh they're kinda wack
and that specifically is saving a byte array and i'm not entirely sure how much String#format likes a byte array
Why do you need to format a String?
We're you asking me how I use it or how to use it?
iirc batch only supports adding a string
Because I didn't see any other responses, sorry about that
how are you accessing/using it
I used BuiltTools jar to get the unobfuscated version
The name said "original spigot something something"
Is there a better way?
I only know that spigot sucks, paperweight works pretty good for me
It doesn’t
I’ve used it for things other than Strings
wait...does it support anything else?
yeah...
and i dont believe String#format supports byte arrays which is my issue
yeah lmao
When you add the batch
It’s like executing a statement but you execute the batch after adding multiple
i know how batch statements work
There should be a method with no parameters
This is a Statement not a PreparedStatement
okay
Probably not different
who knows who cares
nope
Are you sure
I checked and it’s not in Statement
But it’s definitely in PreparedStatement
nope dont know why 
Can you show it again?
maybe
Okay but i try multiple Time and have the same result (with the same item)
https://paste.helpch.at/adexiquyil.cs
Which out of the two is better?
hi everyone!
I'm making registering a placeholder which allows you to format other placeholders using java.util.Formatter
so you can have left/right alignment and other nice stuff
however, the Formatter uses parenthesis to do that, and papi removes the parenthesis and messes up the placeholder lol
Is there any way to "escape" the parenthesis? Sort of like this %formatter_{%-15s %n}{%sussy_balls%}%
I mean, I can manually accomplish this with some string magic
but I'm wondering if papi will allow me to just escape parenthesis bc it's really annoying and treats them all as separate placeholders
ugh
id actually say first
%sussy_balls%
😂
SUS
am I crazy? this was working 2 seconds ago...
Why is ```java
Bukkit.getLogger().info(strings[1]);
Bukkit.getLogger().info(strings[1].replace("\{", ""));
outputting
{item}
{item}
outplayed i guess
huh?
public String replace(CharSequence target, CharSequence replacement)```
Replaces each substring of this string that matches the literal target sequence with the specified literal replacement sequence. The replacement proceeds from the beginning of the string to the end, for example, replacing "aa" with "b" in the string "aaa" will result in "ba" rather than "ab".
1.5
target - The sequence of char values to be replaced
replacement - The replacement sequence of char values
The resulting string
i'm so confused
replaceAll takes a regex
