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

Apply fixes from CodeFactor #43

Merged
merged 1 commit into from
Jul 4, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion scripts/commands/utility/give.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ export function give(message: BeforeChatEvent, args: string[]) {
* args[3] = data (optional)
*/
let confirmItem = false;
let itemStringConvert = toCamelCase(args[1])
let itemStringConvert = toCamelCase(args[1]);
for (let itemValidate in MinecraftItemTypes) {
if (itemStringConvert === itemValidate) {
confirmItem = true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ function illegalitemsb(object: BeforeItemUseOnEvent) {
// No need to ban when we can just remove it entirely and it's not officially listed as an illegal item at this moment
if (antiShulkerBoolean && item.id === "minecraft:shulker_box" || antiShulkerBoolean && item.id === "minecraft:undyed_shulker_box") {
object.cancel = true;
let invContainer = source.getComponent('minecraft:inventory') as EntityInventoryComponent
let invContainer = source.getComponent('minecraft:inventory') as EntityInventoryComponent;
invContainer.container.setItem(hand, new ItemStack(MinecraftItemTypes.air, 0));
sendMsg('@a[tag=notify]', `§r§4[§6Paradox§4]§r Removed ${item.id.replace("minecraft:", "")} from ${source.nameTag}.`);
sendMsgToPlayer(source, `§r§4[§6Paradox§4]§r Shulker Boxes are not allowed!`);
Expand Down
4 changes: 2 additions & 2 deletions scripts/penrose/entitycreateevent/crasher_b.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ const World = world;

function nearestPlayer(entity: Entity) {
if (!entity) {
return
};
return;
}

const allPlayers = World.getPlayers();

Expand Down
2 changes: 1 addition & 1 deletion scripts/penrose/tickevent/illegalitems/illegalitems_a.ts
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ function illegalitemsa() {
}
if (illegalEnchantmentBoolean) {
// We get a list of enchantments on this item
let enchantContainer = inventory_item.getComponent("minecraft:enchantments") as ItemEnchantsComponent
let enchantContainer = inventory_item.getComponent("minecraft:enchantments") as ItemEnchantsComponent;
let item_enchants = enchantContainer.enchantments;
// List of allowed enchantments on item
let enchantedSlot = enchantmentSlot[item_enchants.slot];
Expand Down