Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🚀 Added %itemtypes% dyed %color% expression & ExprColorOf Improvements #4335

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
a7491ac
🚀 Added Dyed expression
AyhamAl-Ali Sep 17, 2021
aa815d3
🛠 Improved ExprColorOf to return RGB colors of RGB colored items
AyhamAl-Ali Sep 17, 2021
aeb0bcd
Apply suggestions from code review
AyhamAl-Ali Mar 5, 2022
7018d1a
Merge branch 'master' into feature/dyed-expr
AyhamAl-Ali Mar 5, 2022
b2e10db
Merge branch 'master' into feature/dyed-expr
AyhamAl-Ali Jun 24, 2022
feb5a1f
Update src/main/java/ch/njol/skript/expressions/ExprDyed.java
AyhamAl-Ali Aug 6, 2022
a2ce91f
Merge remote-tracking branch 'origin/master' into feature/dyed-expr
AyhamAl-Ali May 12, 2023
f268c81
Support grabbing color of blocks - beta
AyhamAl-Ali May 12, 2023
c1e924d
Update Since annotation
AyhamAl-Ali May 12, 2023
64d31c2
Fix the whole Skript literally :D
AyhamAl-Ali May 13, 2023
170207b
Clean up
AyhamAl-Ali May 13, 2023
920fae4
Update tests - restore light blue chat color
AyhamAl-Ali May 13, 2023
7397cdd
Clean up tests
AyhamAl-Ali May 13, 2023
a412d67
Fix tests
AyhamAl-Ali May 13, 2023
284c9f0
Add color comparator :)
AyhamAl-Ali May 13, 2023
5009ef9
Gotta sleep
AyhamAl-Ali May 14, 2023
73a606f
Fix tests for real - fix Adjective.toString()
AyhamAl-Ali May 14, 2023
b707236
Update src/main/java/ch/njol/skript/expressions/ExprDyed.java
AyhamAl-Ali Oct 3, 2023
b99a950
Update src/main/java/ch/njol/skript/expressions/ExprDyed.java
AyhamAl-Ali Oct 3, 2023
2a1748f
Address reviews
AyhamAl-Ali Apr 8, 2024
d040da2
Merge remote-tracking branch 'AyhamAl-Ali/feature/dyed-expr' into fea…
AyhamAl-Ali Apr 8, 2024
b382d48
Merge remote-tracking branch 'origin/dev/feature' into feature/dyed-expr
AyhamAl-Ali Apr 8, 2024
fbd6b62
Fix ExprDyed
AyhamAl-Ali Apr 8, 2024
e66ad6f
Improvements
AyhamAl-Ali Apr 8, 2024
83a896c
Revert last commit to not include color-color removal
AyhamAl-Ali Apr 8, 2024
e96f91d
Merge branch 'dev/feature' into feature/dyed-expr
Moderocky Apr 8, 2024
8599e0c
Address reviews
AyhamAl-Ali Apr 9, 2024
1710e82
fix comment
AyhamAl-Ali Apr 9, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
import ch.njol.skript.aliases.ItemData;
import ch.njol.skript.aliases.ItemType;
import ch.njol.skript.classes.ClassInfo;
import ch.njol.skript.util.Color;
import org.skriptlang.skript.lang.comparator.Comparator;
AyhamAl-Ali marked this conversation as resolved.
Show resolved Hide resolved
import ch.njol.skript.entity.BoatChestData;
import ch.njol.skript.entity.BoatData;
import ch.njol.skript.entity.EntityData;
Expand Down Expand Up @@ -60,7 +62,6 @@
import org.bukkit.event.inventory.InventoryType;
import org.bukkit.inventory.Inventory;
import org.bukkit.inventory.ItemStack;
import org.skriptlang.skript.lang.comparator.Comparator;
import org.skriptlang.skript.lang.comparator.Comparators;
import org.skriptlang.skript.lang.comparator.Relation;

Expand Down Expand Up @@ -653,6 +654,19 @@ public boolean supportsOrdering() {
return false;
}
});

// Color - Color
Comparators.registerComparator(Color.class, Color.class, new Comparator<Color, Color>() {
@Override
public Relation compare(Color color1, Color color2) {
return Relation.get(color1.getName().equals(color2.getName()));
}

@Override
public boolean supportsOrdering() {
return false;
}
});
AyhamAl-Ali marked this conversation as resolved.
Show resolved Hide resolved
}

}
Loading
Loading